r15978: - pass the error code back to the caller...
authorStefan Metzmacher <metze@samba.org>
Wed, 31 May 2006 10:17:05 +0000 (10:17 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 19:08:45 +0000 (14:08 -0500)
- we were giving OPERATIONS_ERROR in all cases:-(
- we now pass ALREADY_EXIST fine to the caller,
  and the code in libnet_site.c is happy again.
- this bug wasn't noticed for a long time because
  the ldb_ildap code always passed SUCCESS to it's caller

metze
(This used to be commit 7b9d7119205c442f338deab07122ce1548bad9b6)

source4/lib/ldb/ldb_tdb/ldb_tdb.c

index 629a18b9c67b7a4806fa1d4ee2313786ea0690f5..29c2703644a727042523bd317ef33a56c9555bc0 100644 (file)
@@ -262,7 +262,7 @@ static int ltdb_add_internal(struct ldb_module *module, const struct ldb_message
        
        ret = ltdb_check_special_dn(module, msg);
        if (ret != LDB_SUCCESS) {
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ret;
        }
        
        if (ltdb_cache_load(module) != 0) {
@@ -271,7 +271,7 @@ static int ltdb_add_internal(struct ldb_module *module, const struct ldb_message
 
        ret = ltdb_store(module, msg, TDB_INSERT);
        if (ret != LDB_SUCCESS) {
-               return LDB_ERR_OPERATIONS_ERROR;
+               return ret;
        }
 
        ret = ltdb_modified(module, msg->dn);