diff options
author | Jeremy Allison <jra@samba.org> | 2009-03-05 09:03:48 -0800 |
---|---|---|
committer | Karolin Seeger <kseeger@samba.org> | 2009-03-06 08:28:30 +0100 |
commit | af56d80f4475f1025b318facf6f26445243e4dc7 (patch) | |
tree | 74ce810f6f250e1b8529ad8813fa5806f068c544 /source/smbd | |
parent | 34a2082e68b24694d28598e14265b57a7b4a9769 (diff) | |
download | samba-af56d80f4475f1025b318facf6f26445243e4dc7.tar.gz samba-af56d80f4475f1025b318facf6f26445243e4dc7.tar.xz samba-af56d80f4475f1025b318facf6f26445243e4dc7.zip |
Fix bug #6160 - Office 2007 fails saving files to a Samba mapped drive.
Confirmed by reporters.
Jeremy.
(cherry picked from commit 2cc696192fbc66b10fa6377d84cdebd23a045284)
Diffstat (limited to 'source/smbd')
-rw-r--r-- | source/smbd/open.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/source/smbd/open.c b/source/smbd/open.c index d2f85ce521a..c89a5f61785 100644 --- a/source/smbd/open.c +++ b/source/smbd/open.c @@ -2391,6 +2391,14 @@ NTSTATUS open_directory(connection_struct *conn, return status; } + /* We need to support SeSecurityPrivilege for this. */ + if (access_mask & SEC_RIGHT_SYSTEM_SECURITY) { + DEBUG(10, ("open_directory: open on %s " + "failed - SEC_RIGHT_SYSTEM_SECURITY denied.\n", + fname)); + return NT_STATUS_PRIVILEGE_NOT_HELD; + } + switch( create_disposition ) { case FILE_OPEN: @@ -2924,6 +2932,20 @@ NTSTATUS create_file_unixpath(connection_struct *conn, status = NT_STATUS_PRIVILEGE_NOT_HELD; goto fail; } +#else + /* We need to support SeSecurityPrivilege for this. */ + if (access_mask & SEC_RIGHT_SYSTEM_SECURITY) { + status = NT_STATUS_PRIVILEGE_NOT_HELD; + goto fail; + } + /* Don't allow a SACL set from an NTtrans create until we + * support SeSecurityPrivilege. */ + if (!VALID_STAT(sbuf) && + lp_nt_acl_support(SNUM(conn)) && + sd && (sd->sacl != NULL)) { + status = NT_STATUS_PRIVILEGE_NOT_HELD; + goto fail; + } #endif if ((conn->fs_capabilities & FILE_NAMED_STREAMS) |