From: Andrew Tridgell Date: Fri, 5 Mar 2010 06:50:18 +0000 (+1100) Subject: s4-pvfs: added new pvfs flag PVFS_FLAG_PERM_OVERRIDE X-Git-Tag: samba-3.6.0pre1~4769 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=edd5a572d8f5d94511013e55744fcde48b16a3eb;p=thirdparty%2Fsamba.git s4-pvfs: added new pvfs flag PVFS_FLAG_PERM_OVERRIDE 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 --- diff --git a/source4/ntvfs/posix/vfs_posix.c b/source4/ntvfs/posix/vfs_posix.c index 5134c0a6088..f22f1d48172 100644 --- a/source4/ntvfs/posix/vfs_posix.c +++ b/source4/ntvfs/posix/vfs_posix.c @@ -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, diff --git a/source4/ntvfs/posix/vfs_posix.h b/source4/ntvfs/posix/vfs_posix.h index 86e95327c1b..70e4c90d7a7 100644 --- a/source4/ntvfs/posix/vfs_posix.h +++ b/source4/ntvfs/posix/vfs_posix.h @@ -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