summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-12-16 10:09:11 -0800
committerJeremy Allison <jra@samba.org>2009-12-16 10:09:11 -0800
commitb8c87c43dd9309b3d2fed5d5db5b38057a8e4e90 (patch)
treeb6054bdcc63b1c26dd331c2181da9416f485992b /source3/smbd
parent64e588f868c23bf4c836f4029a285885db5d087e (diff)
downloadsamba-b8c87c43dd9309b3d2fed5d5db5b38057a8e4e90.tar.gz
samba-b8c87c43dd9309b3d2fed5d5db5b38057a8e4e90.tar.bz2
samba-b8c87c43dd9309b3d2fed5d5db5b38057a8e4e90.zip
Add helpful debug of DACL for errors on ACL access.
Jeremy.
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/open.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/source3/smbd/open.c b/source3/smbd/open.c
index 9dc8320b68..120de0f21a 100644
--- a/source3/smbd/open.c
+++ b/source3/smbd/open.c
@@ -102,8 +102,6 @@ NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
access_mask,
access_granted);
- TALLOC_FREE(sd);
-
DEBUG(10,("smbd_check_open_rights: file %s requesting "
"0x%x returning 0x%x (%s)\n",
smb_fname_str_dbg(smb_fname),
@@ -111,6 +109,16 @@ NTSTATUS smbd_check_open_rights(struct connection_struct *conn,
(unsigned int)*access_granted,
nt_errstr(status) ));
+ if (!NT_STATUS_IS_OK(status)) {
+ if (DEBUGLEVEL >= 10) {
+ DEBUG(10,("smbd_check_open_rights: acl for %s is:\n",
+ smb_fname_str_dbg(smb_fname) ));
+ NDR_PRINT_DEBUG(security_descriptor, sd);
+ }
+ }
+
+ TALLOC_FREE(sd);
+
return status;
}