summaryrefslogtreecommitdiff
path: root/source4/ntvfs/posix/pvfs_setfileinfo.c
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2006-04-12 16:27:53 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:04:04 -0500
commitf347be4c738450e910d8453cef03c273069899a3 (patch)
tree2f81c7950a197b00268349038e90a958f131f19a /source4/ntvfs/posix/pvfs_setfileinfo.c
parente91394ceccd762a204e3b59d379173fd1090ff41 (diff)
downloadsamba-f347be4c738450e910d8453cef03c273069899a3.tar.gz
samba-f347be4c738450e910d8453cef03c273069899a3.tar.bz2
samba-f347be4c738450e910d8453cef03c273069899a3.zip
r15057: fix access masks for getting and setting security_descriptors
I'll add some torture tests later... metze (This used to be commit ce045f4df37b6740f2bf849fd06ab51c682ea0b7)
Diffstat (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c')
-rw-r--r--source4/ntvfs/posix/pvfs_setfileinfo.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/ntvfs/posix/pvfs_setfileinfo.c b/source4/ntvfs/posix/pvfs_setfileinfo.c
index 7661d1eb45..e85f52fc2c 100644
--- a/source4/ntvfs/posix/pvfs_setfileinfo.c
+++ b/source4/ntvfs/posix/pvfs_setfileinfo.c
@@ -53,16 +53,23 @@ static uint32_t pvfs_setfileinfo_access(union smb_setfileinfo *info)
case RAW_SFILEINFO_SEC_DESC:
needed = 0;
- if (info->set_secdesc.in.secinfo_flags & (SECINFO_DACL|SECINFO_SACL)) {
+ if (info->set_secdesc.in.secinfo_flags & (SECINFO_OWNER|SECINFO_GROUP)) {
+ needed |= SEC_STD_WRITE_OWNER;
+ }
+ if (info->set_secdesc.in.secinfo_flags & SECINFO_DACL) {
needed |= SEC_STD_WRITE_DAC;
}
+ if (info->set_secdesc.in.secinfo_flags & SECINFO_SACL) {
+ needed |= SEC_FLAG_SYSTEM_SECURITY;
+ }
break;
default:
needed = SEC_FILE_WRITE_ATTRIBUTE;
break;
}
- return needed;
+
+ return needed;
}
/*