summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSumit Bose <sbose@redhat.com>2012-11-27 12:42:02 +0100
committerJakub Hrozek <jhrozek@redhat.com>2013-01-08 14:57:29 +0100
commit5965c32714996ab3670b838f5d6e392d6110def4 (patch)
treec6d4fd8b5d149d0873e161f9973187aa84097b9f
parent2c18f0bb16d9f37c2edcf99a888d1e3f31976f69 (diff)
downloadsssd-5965c32714996ab3670b838f5d6e392d6110def4.tar.gz
sssd-5965c32714996ab3670b838f5d6e392d6110def4.tar.xz
sssd-5965c32714996ab3670b838f5d6e392d6110def4.zip
Translate LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS to EEXIST
Currently only the LDB error code indicating that an entry already exists is translated to EEXIST. To make debugging easier and return a better indication of the reason for an error in the logs this patch translates the LDB error code for an already existing attribute or value to EEXIST as well.
-rw-r--r--src/db/sysdb.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/db/sysdb.c b/src/db/sysdb.c
index a49fa50d7..b0bea9a73 100644
--- a/src/db/sysdb.c
+++ b/src/db/sysdb.c
@@ -737,6 +737,7 @@ int sysdb_error_to_errno(int ldberr)
return ENOENT;
case LDB_ERR_BUSY:
return EBUSY;
+ case LDB_ERR_ATTRIBUTE_OR_VALUE_EXISTS:
case LDB_ERR_ENTRY_ALREADY_EXISTS:
return EEXIST;
case LDB_ERR_INVALID_ATTRIBUTE_SYNTAX: