summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2004-09-23 00:19:18 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:52:46 -0500
commit5c34aebc0f48bdaf7b8f020ef78424f391efb04e (patch)
tree4d56e85ac223fed756e3fc0cfcf2e84a5d494058 /source3/smbd
parentcf32220e416f06c077099efc0e2adf41a9568dda (diff)
downloadsamba-5c34aebc0f48bdaf7b8f020ef78424f391efb04e.tar.gz
samba-5c34aebc0f48bdaf7b8f020ef78424f391efb04e.tar.bz2
samba-5c34aebc0f48bdaf7b8f020ef78424f391efb04e.zip
r2548: Fix for bug reported by Edward Spragins <spragins@gmail.com> - don't try to
set security descriptors on shares where this has been turned off. Jeremy. (This used to be commit 9cbe685d02fa1d3778958a3ade4965b64e5d0169)
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/nttrans.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c
index 5e17f76e69..d9e321fd96 100644
--- a/source3/smbd/nttrans.c
+++ b/source3/smbd/nttrans.c
@@ -1080,7 +1080,7 @@ static NTSTATUS set_sd(files_struct *fsp, char *data, uint32 sd_len, uint32 secu
TALLOC_CTX *mem_ctx;
BOOL ret;
- if (sd_len == 0) {
+ if (sd_len == 0 || !lp_nt_acl_support(SNUM(fsp->conn))) {
return NT_STATUS_OK;
}
@@ -1414,7 +1414,8 @@ static int call_nt_transact_create(connection_struct *conn, char *inbuf, char *o
* Now try and apply the desired SD.
*/
- if (sd_len && !NT_STATUS_IS_OK(status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION))) {
+ if (lp_nt_acl_support(SNUM(conn)) && sd_len &&
+ !NT_STATUS_IS_OK(status = set_sd( fsp, data, sd_len, ALL_SECURITY_INFORMATION))) {
close_file(fsp,False);
restore_case_semantics(conn, file_attributes);
return ERROR_NT(status);