s4-pvfs: added new pvfs flag PVFS_FLAG_PERM_OVERRIDE
authorAndrew Tridgell <tridge@samba.org>
Fri, 5 Mar 2010 06:50:18 +0000 (17:50 +1100)
committerAndrew Tridgell <tridge@samba.org>
Fri, 5 Mar 2010 12:07:31 +0000 (23:07 +1100)
This flag indicates that we should use root privileges to override
unix permissions when the NT ACLs indicate that access should be
granted

Pair-Programmed-With: Andrew Bartlett <abartlet@samba.org>

source4/ntvfs/posix/vfs_posix.c
source4/ntvfs/posix/vfs_posix.h

index 5134c0a6088f52347e36accaf4069f347d98a5c5..f22f1d48172ea0022da2171e92ea5ac24abafef0 100644 (file)
@@ -58,6 +58,8 @@ static void pvfs_setup_options(struct pvfs_state *pvfs)
                pvfs->flags |= PVFS_FLAG_FAKE_OPLOCKS;
        if (share_bool_option(scfg, PVFS_AIO, false))
                pvfs->flags |= PVFS_FLAG_LINUX_AIO;
+       if (share_bool_option(scfg, PVFS_PERM_OVERRIDE, true))
+               pvfs->flags |= PVFS_FLAG_PERM_OVERRIDE;
 
        /* file perm options */
        pvfs->options.create_mask       = share_int_option(scfg,
index 86e95327c1bab02a432cf4b188e551f39718a145..70e4c90d7a7aebfb68ee0306a0a5748b95df8be1 100644 (file)
@@ -246,6 +246,7 @@ struct pvfs_search_state {
 #define PVFS_FLAG_XATTR_ENABLE   (1<<7)
 #define PVFS_FLAG_FAKE_OPLOCKS   (1<<8)
 #define PVFS_FLAG_LINUX_AIO      (1<<9)
+#define PVFS_FLAG_PERM_OVERRIDE  (1<<10)
 
 /* forward declare some anonymous structures */
 struct pvfs_dir;
@@ -268,6 +269,7 @@ struct pvfs_odb_retry;
 #define PVFS_SEARCH_INACTIVITY         "posix:searchinactivity"
 #define PVFS_ACL                       "posix:acl"
 #define PVFS_AIO                       "posix:aio"
+#define PVFS_PERM_OVERRIDE             "posix:permission override"
 
 #define PVFS_XATTR_DEFAULT                     true
 #define PVFS_FAKE_OPLOCKS_DEFAULT              false