diff options
author | Uri Simchoni <uri@samba.org> | 2016-08-02 09:37:00 +0300 |
---|---|---|
committer | Uri Simchoni <uri@samba.org> | 2016-08-10 08:18:17 +0200 |
commit | 1dfd8df23d63f786788bc24ebb71039feaf34d91 (patch) | |
tree | 701348847f09d20391c7bcde4b71c7c27f1aec44 /source3/smbd/posix_acls.c | |
parent | ebb3b34ec5d323692e59dad1bf8559920eee1fcf (diff) | |
download | samba-1dfd8df23d63f786788bc24ebb71039feaf34d91.tar.gz |
smbd: add an option to inherit only the UNIX owner
This can be used to emulate folder quotas, as explained in the
modified manpage.
Signed-off-by: Uri Simchoni <uri@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Diffstat (limited to 'source3/smbd/posix_acls.c')
-rw-r--r-- | source3/smbd/posix_acls.c | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/source3/smbd/posix_acls.c b/source3/smbd/posix_acls.c index c5755683658..e8e819c7eeb 100644 --- a/source3/smbd/posix_acls.c +++ b/source3/smbd/posix_acls.c @@ -3754,6 +3754,14 @@ NTSTATUS set_nt_acl(files_struct *fsp, uint32_t security_info_sent, const struct security_info_sent &= ~SECINFO_GROUP; } + /* If UNIX owner is inherited and Windows isn't, then + * setting the UNIX owner based on Windows owner conflicts + * with the inheritance rule + */ + if (lp_inherit_owner(SNUM(conn)) == INHERIT_OWNER_UNIX_ONLY) { + security_info_sent &= ~SECINFO_OWNER; + } + status = unpack_nt_owners( conn, &user, &grp, security_info_sent, psd); if (!NT_STATUS_IS_OK(status)) { return status; |