From 42e1556bd92092caf997a87964d65d4ce6d0cc39 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Mon, 7 Jul 2014 11:49:49 +0000 Subject: [PATCH] smbd: Add debugs to smbXsrv_open.c At one point it was pretty difficult to track a failure. Add more DEBUG to avoid gdb Signed-off-by: Volker Lendecke Reviewed-by: Jeremy Allison Autobuild-User(master): Jeremy Allison Autobuild-Date(master): Mon Aug 11 23:32:45 CEST 2014 on sn-devel-104 --- source3/smbd/smbXsrv_open.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/source3/smbd/smbXsrv_open.c b/source3/smbd/smbXsrv_open.c index c3ff3bb5b33..6133e5648bc 100644 --- a/source3/smbd/smbXsrv_open.c +++ b/source3/smbd/smbXsrv_open.c @@ -580,6 +580,7 @@ static void smbXsrv_open_global_verify_record(struct db_record *db_rec, val = dbwrap_record_get_value(db_rec); if (val.dsize == 0) { + DEBUG(10, ("%s: empty value\n", __func__)); TALLOC_FREE(frame); *is_free = true; if (was_free) { @@ -740,6 +741,7 @@ static NTSTATUS smbXsrv_open_global_lookup(struct smbXsrv_open_table *table, mem_ctx, _global); if (is_free) { + DEBUG(10, ("%s: is_free=true\n", __func__)); talloc_free(global_rec); return NT_STATUS_OBJECT_NAME_NOT_FOUND; } @@ -1186,15 +1188,18 @@ NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn, struct security_token *current_token = NULL; if (session_info == NULL) { + DEBUG(10, ("session_info=NULL\n")); return NT_STATUS_INVALID_HANDLE; } current_token = session_info->security_token; if (current_token == NULL) { + DEBUG(10, ("current_token=NULL\n")); return NT_STATUS_INVALID_HANDLE; } if (global_zeros != 0) { + DEBUG(10, ("global_zeros!=0\n")); return NT_STATUS_OBJECT_NAME_NOT_FOUND; } @@ -1207,6 +1212,8 @@ NTSTATUS smb2srv_open_recreate(struct smbXsrv_connection *conn, status = smbXsrv_open_global_lookup(table, global_id, op, &op->global); if (!NT_STATUS_IS_OK(status)) { TALLOC_FREE(op); + DEBUG(10, ("smbXsrv_open_global_lookup returned %s\n", + nt_errstr(status))); return status; } -- 2.11.4.GIT