From 1a69e536465459e4d59661338c07def847e8efc5 Mon Sep 17 00:00:00 2001 From: Sumit Bose Date: Tue, 27 Nov 2012 12:42:02 +0100 Subject: [PATCH 09/11] 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. --- src/db/sysdb.c | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/src/db/sysdb.c b/src/db/sysdb.c index a49fa50..b0bea9a 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: -- 1.7.7.6