summaryrefslogtreecommitdiff
path: root/libcli
diff options
context:
space:
mode:
authorAndreas Schneider <asn@samba.org>2012-12-14 18:21:26 +0100
committerGünther Deschner <gd@samba.org>2012-12-21 13:56:00 +0100
commit9981b857a5cfba3d55e25541afcfe1fda1bc4338 (patch)
tree581135d19af68f497dfb436ebfb9a567a5a2b4dc /libcli
parente41f0ccdd280f18e3b4f72f1f20cd768c4572427 (diff)
downloadsamba-9981b857a5cfba3d55e25541afcfe1fda1bc4338.tar.gz
samba-9981b857a5cfba3d55e25541afcfe1fda1bc4338.tar.bz2
samba-9981b857a5cfba3d55e25541afcfe1fda1bc4338.zip
libcli: Check schannel state return value of tdb_transaction_commit().
Found by Coverity. Signed-off-by: Andreas Schneider <asn@samba.org> Reviewed-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'libcli')
-rw-r--r--libcli/auth/schannel_state_tdb.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/libcli/auth/schannel_state_tdb.c b/libcli/auth/schannel_state_tdb.c
index 6abb69b2e1..bc91104f71 100644
--- a/libcli/auth/schannel_state_tdb.c
+++ b/libcli/auth/schannel_state_tdb.c
@@ -328,7 +328,11 @@ NTSTATUS schannel_check_creds_state(TALLOC_CTX *mem_ctx,
goto done;
}
- tdb_transaction_commit(tdb_sc->tdb);
+ ret = tdb_transaction_commit(tdb_sc->tdb);
+ if (ret != 0) {
+ status = NT_STATUS_INTERNAL_DB_CORRUPTION;
+ goto done;
+ }
if (creds_out) {
*creds_out = talloc_steal(mem_ctx, creds);