From b5efa8990ffc6e09a09605108d06fcde97127a08 Mon Sep 17 00:00:00 2001 From: Corinna Vinschen Date: Sat, 17 Apr 2010 15:51:09 +0000 Subject: * sec_helper.cc (get_null_sd): Make static. Use PSECURITY_DESCRIPTOR instead of SECURITY_DESCRIPTOR *. (sec_acl): Fix fomratting. * security.h (get_null_sd): Drop declaration. --- winsup/cygwin/sec_helper.cc | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'winsup/cygwin/sec_helper.cc') diff --git a/winsup/cygwin/sec_helper.cc b/winsup/cygwin/sec_helper.cc index cab2feddb..a29900166 100644 --- a/winsup/cygwin/sec_helper.cc +++ b/winsup/cygwin/sec_helper.cc @@ -444,17 +444,16 @@ set_cygwin_privileges (HANDLE token) /* Function to return a common SECURITY_DESCRIPTOR that allows all access. */ - -SECURITY_DESCRIPTOR *__stdcall +static inline PSECURITY_DESCRIPTOR get_null_sd () { static NO_COPY SECURITY_DESCRIPTOR sd; - static NO_COPY SECURITY_DESCRIPTOR *null_sdp; + static NO_COPY PSECURITY_DESCRIPTOR null_sdp; if (!null_sdp) { InitializeSecurityDescriptor (&sd, SECURITY_DESCRIPTOR_REVISION); - SetSecurityDescriptorDacl (&sd, TRUE, 0, FALSE); + SetSecurityDescriptorDacl (&sd, TRUE, NULL, FALSE); null_sdp = &sd; } return null_sdp; @@ -478,7 +477,7 @@ init_global_security () bool sec_acl (PACL acl, bool original, bool admins, PSID sid1, PSID sid2, DWORD access2) { - size_t acl_len = MAX_DACL_LEN(5); + size_t acl_len = MAX_DACL_LEN (5); LPVOID pAce; cygpsid psid; -- cgit v1.2.3