equal
deleted
inserted
replaced
1 /* |
1 /* |
2 * Copyright (c) 2001, 2018, Oracle and/or its affiliates. All rights reserved. |
2 * Copyright (c) 2001, 2019, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * |
4 * |
5 * This code is free software; you can redistribute it and/or modify it |
5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as |
6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. |
7 * published by the Free Software Foundation. |
762 // free the contained security descriptor and the ACL |
762 // free the contained security descriptor and the ACL |
763 free_security_desc(lpSA->lpSecurityDescriptor); |
763 free_security_desc(lpSA->lpSecurityDescriptor); |
764 lpSA->lpSecurityDescriptor = NULL; |
764 lpSA->lpSecurityDescriptor = NULL; |
765 |
765 |
766 // free the security attributes structure |
766 // free the security attributes structure |
767 FREE_C_HEAP_ARRAY(char, lpSA); |
767 FREE_C_HEAP_OBJ(lpSA); |
768 } |
768 } |
769 } |
769 } |
770 |
770 |
771 // get the user SID for the process indicated by the process handle |
771 // get the user SID for the process indicated by the process handle |
772 // |
772 // |
1071 } |
1071 } |
1072 |
1072 |
1073 // allocate and initialize the security attributes structure and |
1073 // allocate and initialize the security attributes structure and |
1074 // return it to the caller. |
1074 // return it to the caller. |
1075 // |
1075 // |
1076 LPSECURITY_ATTRIBUTES lpSA = (LPSECURITY_ATTRIBUTES) |
1076 LPSECURITY_ATTRIBUTES lpSA = |
1077 NEW_C_HEAP_ARRAY(char, sizeof(SECURITY_ATTRIBUTES), mtInternal); |
1077 NEW_C_HEAP_OBJ(SECURITY_ATTRIBUTES, mtInternal); |
1078 lpSA->nLength = sizeof(SECURITY_ATTRIBUTES); |
1078 lpSA->nLength = sizeof(SECURITY_ATTRIBUTES); |
1079 lpSA->lpSecurityDescriptor = pSD; |
1079 lpSA->lpSecurityDescriptor = pSD; |
1080 lpSA->bInheritHandle = FALSE; |
1080 lpSA->bInheritHandle = FALSE; |
1081 |
1081 |
1082 return(lpSA); |
1082 return(lpSA); |