[SSSD] [PATCH] KRB5: cancel the sysdb transaction on one place only

Jakub Hrozek jhrozek at redhat.com
Sun Sep 9 19:53:29 UTC 2012


Found by Coverity.
-------------- next part --------------
>From 1283d723452de63ea0ad6bcd9fa75950c854b923 Mon Sep 17 00:00:00 2001
From: Jakub Hrozek <jhrozek at redhat.com>
Date: Sun, 9 Sep 2012 21:39:25 +0200
Subject: [PATCH] KRB5: cancel the sysdb transaction on one place only

https://fedorahosted.org/sssd/ticket/1516

If sysdb_set_user_attr failed, we would cancel the transaction, then go
to the error handler and attempt to close it again.
---
 src/providers/krb5/krb5_auth.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/src/providers/krb5/krb5_auth.c b/src/providers/krb5/krb5_auth.c
index c3a9e62de37baece56d36106313989026cb9ddbd..18209d7177c45008ec083354ad358f16698e6a2c 100644
--- a/src/providers/krb5/krb5_auth.c
+++ b/src/providers/krb5/krb5_auth.c
@@ -165,7 +165,6 @@ static int krb5_mod_ccname(TALLOC_CTX *mem_ctx,
     ret = sysdb_set_user_attr(sysdb, name, attrs, mod_op);
     if (ret != EOK) {
         DEBUG(6, ("Error: %d (%s)\n", ret, strerror(ret)));
-        sysdb_transaction_cancel(sysdb);
         goto done;
     }
 
-- 
1.7.11.4



More information about the sssd-devel mailing list