summaryrefslogtreecommitdiffstats
path: root/src/providers/ipa/ipa_hbac_common.c
diff options
context:
space:
mode:
authorMichal Zidek <mzidek@redhat.com>2012-08-16 18:48:53 +0200
committerJakub Hrozek <jhrozek@redhat.com>2012-08-23 18:09:18 +0200
commit21d485184df986e1a123f70c689517386e51a5ce (patch)
tree7b2165fdc4dadcc632d402866b704df04ede852f /src/providers/ipa/ipa_hbac_common.c
parent0051296f67bd7d8e2e3094638ddff4e641324d04 (diff)
downloadsssd-21d485184df986e1a123f70c689517386e51a5ce.tar.gz
sssd-21d485184df986e1a123f70c689517386e51a5ce.tar.xz
sssd-21d485184df986e1a123f70c689517386e51a5ce.zip
Unify usage of sysdb transactions
Removing bad examples of usage of sysdb_transaction_start/commit/end functions and making it more consistent (all files except of src/db/sysdb_*.c).
Diffstat (limited to 'src/providers/ipa/ipa_hbac_common.c')
-rw-r--r--src/providers/ipa/ipa_hbac_common.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/providers/ipa/ipa_hbac_common.c b/src/providers/ipa/ipa_hbac_common.c
index af0000cff..341b56223 100644
--- a/src/providers/ipa/ipa_hbac_common.c
+++ b/src/providers/ipa/ipa_hbac_common.c
@@ -111,7 +111,10 @@ ipa_hbac_sysdb_save(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
/* Save the entries and groups to the cache */
ret = sysdb_transaction_start(sysdb);
- if (ret != EOK) return ret;
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to start transaction\n"));
+ goto done;
+ };
in_transaction = true;
/* First, save the specific entries */
@@ -143,7 +146,10 @@ ipa_hbac_sysdb_save(struct sysdb_ctx *sysdb, struct sss_domain_info *domain,
}
ret = sysdb_transaction_commit(sysdb);
- if (ret != EOK) goto done;
+ if (ret != EOK) {
+ DEBUG(SSSDBG_CRIT_FAILURE, ("Failed to commit transaction\n"));
+ goto done;
+ }
in_transaction = false;
done: