summaryrefslogtreecommitdiff
path: root/source3/smbd
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2013-02-12 17:44:51 +0100
committerStefan Metzmacher <metze@samba.org>2013-02-18 17:42:45 +0100
commitcfebce3c56474ac914474b57ed94f93418b0564b (patch)
tree49df1eed25ef40feb6ce789382c340ad16e2e540 /source3/smbd
parent295444266d33863e3a8b7c8ffa5d193123db6132 (diff)
downloadsamba-cfebce3c56474ac914474b57ed94f93418b0564b.tar.gz
samba-cfebce3c56474ac914474b57ed94f93418b0564b.tar.bz2
samba-cfebce3c56474ac914474b57ed94f93418b0564b.zip
s3:smbd: add debugging to close code (regarding disconnect of a durable)
Signed-off-by: Michael Adam <obnox@samba.org> Reviewed-by: Stefan Metzmacher <metze@samba.org> Autobuild-User(master): Stefan Metzmacher <metze@samba.org> Autobuild-Date(master): Mon Feb 18 17:42:45 CET 2013 on sn-devel-104
Diffstat (limited to 'source3/smbd')
-rw-r--r--source3/smbd/close.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/source3/smbd/close.c b/source3/smbd/close.c
index 9e7ccc7c05..df3ae23a92 100644
--- a/source3/smbd/close.c
+++ b/source3/smbd/close.c
@@ -783,6 +783,17 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
fsp->op->global->backend_cookie = new_cookie;
tmp = smbXsrv_open_close(fsp->op, now);
+ if (!NT_STATUS_IS_OK(tmp)) {
+ DEBUG(1, ("Failed to update smbXsrv_open "
+ "record when disconnecting durable "
+ "handle for file %s: %s - "
+ "proceeding with normal close\n",
+ fsp_str_dbg(fsp), nt_errstr(tmp)));
+ }
+ } else {
+ DEBUG(1, ("Failed to disconnect durable handle for "
+ "file %s: %s - proceeding with normal "
+ "close\n", fsp_str_dbg(fsp), nt_errstr(tmp)));
}
if (!NT_STATUS_IS_OK(tmp)) {
is_durable = false;
@@ -795,6 +806,9 @@ static NTSTATUS close_normal_file(struct smb_request *req, files_struct *fsp,
* a durable handle and closed the underlying file.
* In all other cases, we proceed with a genuine close.
*/
+ DEBUG(10, ("%s disconnected durable handle for file %s\n",
+ conn->session_info->unix_info->unix_name,
+ fsp_str_dbg(fsp)));
file_free(req, fsp);
return NT_STATUS_OK;
}