From f347be4c738450e910d8453cef03c273069899a3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Wed, 12 Apr 2006 16:27:53 +0000 Subject: r15057: fix access masks for getting and setting security_descriptors I'll add some torture tests later... metze (This used to be commit ce045f4df37b6740f2bf849fd06ab51c682ea0b7) --- source4/ntvfs/posix/pvfs_setfileinfo.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'source4/ntvfs/posix/pvfs_setfileinfo.c') 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; } /* -- cgit