summaryrefslogtreecommitdiff
path: root/source4/auth
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2006-11-07 00:19:16 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 14:24:59 -0500
commit97aec1a70c260f19e21d56ed08b155f80370e71b (patch)
treed3a0a56517aa2d84565c64e70d2f46dfce99de99 /source4/auth
parent48f1ed1cc94980a7d286d93d02f85b851b2c1719 (diff)
downloadsamba-97aec1a70c260f19e21d56ed08b155f80370e71b.tar.gz
samba-97aec1a70c260f19e21d56ed08b155f80370e71b.tar.bz2
samba-97aec1a70c260f19e21d56ed08b155f80370e71b.zip
r19595: Seperate debug messages between database failure and simple lack of
records. Andrew Bartlett (This used to be commit 163f75372792b0afa72f48d64d78d82b72d8eda5)
Diffstat (limited to 'source4/auth')
-rw-r--r--source4/auth/gensec/schannel_state.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/source4/auth/gensec/schannel_state.c b/source4/auth/gensec/schannel_state.c
index 2f33b12a8d..e9c81f370c 100644
--- a/source4/auth/gensec/schannel_state.c
+++ b/source4/auth/gensec/schannel_state.c
@@ -196,8 +196,15 @@ NTSTATUS schannel_fetch_session_key_ldb(TALLOC_CTX *mem_ctx,
}
ret = ldb_search(ldb, NULL, LDB_SCOPE_SUBTREE, expr, NULL, &res);
- if (ret != LDB_SUCCESS || res->count != 1) {
- DEBUG(3,("schannel: Failed to find a record for client: %s\n", computer_name));
+ talloc_free(expr);
+ if (ret != LDB_SUCCESS) {
+ DEBUG(3,("schannel: Failed to find a record for client %s: %s\n", computer_name, ldb_errstring(ldb)));
+ talloc_free(res);
+ return NT_STATUS_INVALID_HANDLE;
+ }
+ talloc_steal(mem_ctx, res);
+ if (res->count != 1) {
+ DEBUG(3,("schannel: Failed to find a record for client: %s (found %d records)\n", computer_name, res->count));
talloc_free(res);
return NT_STATUS_INVALID_HANDLE;
}