summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStephen Gallagher <sgallagh@redhat.com>2012-05-08 14:48:14 -0400
committerStephen Gallagher <sgallagh@redhat.com>2012-05-10 11:34:46 -0400
commite2a59ba258ab98a6f50a1af627bc4cdceaa59101 (patch)
tree156c4f318b67153fcf6f3acd45f1fcb274c299f6
parent312818233ce48471c56d1a7589579892d9726e3b (diff)
downloadsssd-e2a59ba258ab98a6f50a1af627bc4cdceaa59101.tar.gz
sssd-e2a59ba258ab98a6f50a1af627bc4cdceaa59101.tar.bz2
sssd-e2a59ba258ab98a6f50a1af627bc4cdceaa59101.zip
SYSDB: Add better error logging to sysdb_set_entry_attr()
-rw-r--r--src/db/sysdb_ops.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/db/sysdb_ops.c b/src/db/sysdb_ops.c
index 7e9b7ce5..bedd8cfa 100644
--- a/src/db/sysdb_ops.c
+++ b/src/db/sysdb_ops.c
@@ -455,6 +455,7 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
{
struct ldb_message *msg;
int i, ret;
+ int lret;
TALLOC_CTX *tmp_ctx;
tmp_ctx = talloc_new(NULL);
@@ -488,8 +489,13 @@ int sysdb_set_entry_attr(struct sysdb_ctx *sysdb,
msg->num_elements = attrs->num;
- ret = ldb_modify(sysdb->ldb, msg);
- ret = sysdb_error_to_errno(ret);
+ lret = ldb_modify(sysdb->ldb, msg);
+ if (lret != LDB_SUCCESS) {
+ DEBUG(SSSDBG_MINOR_FAILURE,
+ ("ldb_modify failed: [%s]\n", ldb_strerror(lret)));
+ }
+
+ ret = sysdb_error_to_errno(lret);
done:
if (ret == ENOENT) {