From 5c34aebc0f48bdaf7b8f020ef78424f391efb04e Mon Sep 17 00:00:00 2001 From: Jeremy Allison Date: Thu, 23 Sep 2004 00:19:18 +0000 Subject: r2548: Fix for bug reported by Edward Spragins - don't try to set security descriptors on shares where this has been turned off. Jeremy. (This used to be commit 9cbe685d02fa1d3778958a3ade4965b64e5d0169) --- source3/smbd/nttrans.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'source3/smbd') diff --git a/source3/smbd/nttrans.c b/source3/smbd/nttrans.c index 5e17f76e697..d9e321fd968 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); -- cgit v1.2.1