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>2012-06-03 20:46:53 +0400
committerCorinna Vinschen <corinna@vinschen.de>2012-06-03 20:46:53 +0400
commit115d74b99e5beba493bff58384d0d167bcaf77c3 (patch)
tree32ef7edb03be8b1bff16ab06277fe6dd5dc994ef /winsup/cygwin/security.h
parent6a713dabad2091f4a95f6ad567a5bb0dd2834b4b (diff)
* globals.cc (ro_u_refs): New R/O unicode string.
* mount.cc (fs_info::update): Recognize ReFS. * mount.h (enum fs_info_type): Add refs. (class fs_info): Add refs flag and accessor methods. * ntdll.h (RtlAddAccessAllowedAceEx): Declare. (RtlAddAccessDeniedAceEx): Declare. * path.h (path_conv::fs_is_refs): Define. * sec_helper.cc (_recycler_sd): New function to create security descriptors suitable for the recycler bin starting with Vista. * security.cc (add_access_allowed_ace): Use RtlAddAccessAllowedAceEx and drop code to set AceFlags explicitely. (add_access_denied_ace): Use RtlAddAccessDeniedAceEx and drop code to set AceFlags explicitely. * security.h (_recycler_sd): Declare. (recycler_sd): Define. * syscalls.cc (desktop_ini): Change formatting. (desktop_ini_ext): Define third line of recycler desktop.ini file since Vista, (try_to_bin): Handle ReFS just like NTFS. Write Vista and later Recycler in all uppercase, just like shell32 does when recreating it. Fix comments to include ReFS. Don't implicitely reuse object attributes from earlier NtOpenFile call, rather recreate it for safety. Use recycler_sd call when creating security descriptor for Recycler dirs and files on Vista and later. Write third line of desktop.ini when on Vista and later.
Diffstat (limited to 'winsup/cygwin/security.h')
-rw-r--r--winsup/cygwin/security.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/winsup/cygwin/security.h b/winsup/cygwin/security.h
index 907cbe766..f80dcfbd7 100644
--- a/winsup/cygwin/security.h
+++ b/winsup/cygwin/security.h
@@ -476,6 +476,13 @@ extern SECURITY_ATTRIBUTES sec_none, sec_none_nih, sec_all, sec_all_nih;
extern SECURITY_ATTRIBUTES *__stdcall __sec_user (PVOID, PSID, PSID,
DWORD, BOOL)
__attribute__ ((regparm (3)));
+
+extern PSECURITY_DESCRIPTOR _recycler_sd (void *buf, bool users, bool dir);
+#define recycler_sd(users,dir) \
+ (_recycler_sd (alloca (sizeof (SECURITY_DESCRIPTOR) + MAX_DACL_LEN (3)), \
+ (users), \
+ (dir)))
+
extern PSECURITY_DESCRIPTOR _everyone_sd (void *buf, ACCESS_MASK access);
#define everyone_sd(access) (_everyone_sd (alloca (SD_MIN_SIZE), (access)))