OSDN Git Service

* sec_helper.cc (security_descriptor::free): If sd_size is 0, call
authorcorinna <corinna>
Sat, 31 Oct 2009 04:58:51 +0000 (04:58 +0000)
committercorinna <corinna>
Sat, 31 Oct 2009 04:58:51 +0000 (04:58 +0000)
commitbcf70c2ef655ab479739e3a1d6a1495558276479
treea0f22f682738c6f59b06ffdb6e328c74c38207cb
parentee9f03f3b901ef842f70c3d68667db898e082a95
* sec_helper.cc (security_descriptor::free): If sd_size is 0, call
LocalFree instead of ::free.

* sec_acl.cc: Throughout replace old ACE flag definitions with current
definitions as used in MSDN man pages.
* security.cc: Ditto.

* fhandler.cc (fhandler_base::open): Make sure file has really been
just created before fixing file permissions.  Add S_JUSTCREATED
attribute to set_file_attribute call.
* fhandler_disk_file.cc (fhandler_disk_file::mkdir): Always create dir
with default security descriptor and fix descriptor afterwards.
Add S_JUSTCREATED flag to set_file_attribute call.
* fhandler_socket.cc (fhandler_socket::bind): Ditto for AF_LOCAL
socket files.
* path.cc (symlink_worker): Ditto for symlinks.
* security.cc (get_file_sd): Call GetSecurityInfo rather than
NtQuerySecurityObject.  Explain why.  Change error handling accordingly.
(alloc_sd): Skip non-inherited, non-standard entries in ACL if
S_JUSTCREATED attribute is set.  Explain why.  Minor format fixes.
* security.h (S_JUSTCREATED): New define.
(security_descriptor::operator=): New operator.
winsup/cygwin/ChangeLog
winsup/cygwin/fhandler.cc
winsup/cygwin/fhandler_disk_file.cc
winsup/cygwin/fhandler_socket.cc
winsup/cygwin/path.cc
winsup/cygwin/sec_acl.cc
winsup/cygwin/sec_helper.cc
winsup/cygwin/security.cc
winsup/cygwin/security.h