Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCorinna Vinschen <corinna@vinschen.de>2010-09-10 13:32:13 +0400
committerCorinna Vinschen <corinna@vinschen.de>2010-09-10 13:32:13 +0400
commit67a9307898f94346cbd4c83b6bae4f9611607818 (patch)
tree89c139fb02e34b2fbae48cbc34888148c5ce50d5 /winsup/cygwin/sec_acl.cc
parent28e19bafa0e3398a3e346effd4917db6ec8b5c85 (diff)
* security.cc (get_file_sd): Add bool parameter justcreated. Use
GetSecurityInfo only if justcreated is true, NtQuerySecurityObject otherwise. Add comment to explain why. Don't waste time to call NtQuerySecurityObject twice, just allocate big enough area. (get_file_attribute): Call get_file_sd with justcreated set to false. (set_file_attribute): Call get_file_sd with justcreated depending on S_JUSTCREATED pseudo file attribute. (check_file_access): Call get_file_sd with justcreated set to false. * sec_acl.cc (setacl): Ditto. (getacl): Ditto. * security.h: Convert many functions to regparm functions. (get_file_sd): Declare with extra bool parameter.
Diffstat (limited to 'winsup/cygwin/sec_acl.cc')
-rw-r--r--winsup/cygwin/sec_acl.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/winsup/cygwin/sec_acl.cc b/winsup/cygwin/sec_acl.cc
index 88abac46a..fbf2bffa7 100644
--- a/winsup/cygwin/sec_acl.cc
+++ b/winsup/cygwin/sec_acl.cc
@@ -41,7 +41,7 @@ setacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp,
{
security_descriptor sd_ret;
- if (get_file_sd (handle, pc, sd_ret))
+ if (get_file_sd (handle, pc, sd_ret, false))
return -1;
BOOL dummy;
@@ -272,7 +272,7 @@ getacl (HANDLE handle, path_conv &pc, int nentries, __aclent32_t *aclbufp)
{
security_descriptor sd;
- if (get_file_sd (handle, pc, sd))
+ if (get_file_sd (handle, pc, sd, false))
return -1;
cygpsid owner_sid;