smbcacls: Use defines for security flags
authorChristof Schmitt <cs@samba.org>
Fri, 24 Apr 2015 15:51:32 +0000 (08:51 -0700)
committerJeremy Allison <jra@samba.org>
Fri, 24 Apr 2015 22:04:23 +0000 (00:04 +0200)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=11237

Signed-off-by: Christof Schmitt <cs@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
source3/utils/smbcacls.c

index 742b822047471719d42d53616936a97b98ab5b7b..f3e0eb521269a3b6afbf8f50a55e0ee04e22033f 100644 (file)
@@ -54,19 +54,20 @@ struct perm_value {
 /* These values discovered by inspection */
 
 static const struct perm_value special_values[] = {
-       { "R", 0x00120089 },
-       { "W", 0x00120116 },
-       { "X", 0x001200a0 },
-       { "D", 0x00010000 },
-       { "P", 0x00040000 },
-       { "O", 0x00080000 },
+       { "R", SEC_RIGHTS_FILE_READ },
+       { "W", SEC_RIGHTS_FILE_WRITE },
+       { "X", SEC_RIGHTS_FILE_EXECUTE },
+       { "D", SEC_STD_DELETE },
+       { "P", SEC_STD_WRITE_DAC },
+       { "O", SEC_STD_WRITE_OWNER },
        { NULL, 0 },
 };
 
 static const struct perm_value standard_values[] = {
-       { "READ",   0x001200a9 },
-       { "CHANGE", 0x001301bf },
-       { "FULL",   0x001f01ff },
+       { "READ",   SEC_RIGHTS_DIR_READ|SEC_DIR_TRAVERSE },
+       { "CHANGE", SEC_RIGHTS_DIR_READ|SEC_STD_DELETE|\
+         SEC_RIGHTS_DIR_WRITE|SEC_DIR_TRAVERSE },
+       { "FULL",   SEC_RIGHTS_DIR_ALL },
        { NULL, 0 },
 };