diff options
author | Andrew Tridgell <tridge@samba.org> | 2009-10-25 23:14:56 +1100 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2009-10-25 23:14:56 +1100 |
commit | 98a3725252aabeece2b31f87e1c6cfc543fc716d (patch) | |
tree | 2365b53965e23fff5f703be80329799eec3b630a /source4/lib | |
parent | 12c9af78179b71721e30b03ae9fc0edd7cda940b (diff) | |
parent | 1ea460b0b0dc4ee8a14c764e81f368d4f7e9ff45 (diff) | |
download | samba-98a3725252aabeece2b31f87e1c6cfc543fc716d.tar.gz samba-98a3725252aabeece2b31f87e1c6cfc543fc716d.tar.bz2 samba-98a3725252aabeece2b31f87e1c6cfc543fc716d.zip |
Merge branch 'master' of ssh://git.samba.org/data/git/samba
Diffstat (limited to 'source4/lib')
-rw-r--r-- | source4/lib/ldb/ldb_ildap/ldb_ildap.c | 6 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_ldap/ldb_ldap.c | 6 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c | 6 | ||||
-rw-r--r-- | source4/lib/ldb/ldb_tdb/ldb_tdb.c | 12 |
4 files changed, 15 insertions, 15 deletions
diff --git a/source4/lib/ldb/ldb_ildap/ldb_ildap.c b/source4/lib/ldb/ldb_ildap/ldb_ildap.c index 352b7696d6..061238b277 100644 --- a/source4/lib/ldb/ldb_ildap/ldb_ildap.c +++ b/source4/lib/ldb/ldb_ildap/ldb_ildap.c @@ -771,7 +771,7 @@ static int ildb_connect(struct ldb_context *ldb, const char *url, struct loadparm_context *lp_ctx; module = ldb_module_new(ldb, ldb, "ldb_ildap backend", &ildb_ops); - if (!module) return -1; + if (!module) return LDB_ERR_OPERATIONS_ERROR; ildb = talloc(module, struct ildb_private); if (!ildb) { @@ -833,11 +833,11 @@ static int ildb_connect(struct ldb_context *ldb, const char *url, } *_module = module; - return 0; + return LDB_SUCCESS; failed: talloc_free(module); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } _PUBLIC_ const struct ldb_backend_ops ldb_ldap_backend_ops = { diff --git a/source4/lib/ldb/ldb_ldap/ldb_ldap.c b/source4/lib/ldb/ldb_ldap/ldb_ldap.c index 3775738101..0d75491e91 100644 --- a/source4/lib/ldb/ldb_ldap/ldb_ldap.c +++ b/source4/lib/ldb/ldb_ldap/ldb_ldap.c @@ -860,7 +860,7 @@ static int lldb_connect(struct ldb_context *ldb, int ret; module = ldb_module_new(ldb, ldb, "ldb_ldap backend", &lldb_ops); - if (!module) return -1; + if (!module) return LDB_ERR_OPERATIONS_ERROR; lldb = talloc_zero(module, struct lldb_private); if (!lldb) { @@ -886,11 +886,11 @@ static int lldb_connect(struct ldb_context *ldb, } *_module = module; - return 0; + return LDB_SUCCESS; failed: talloc_free(module); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } const struct ldb_backend_ops ldb_ldap_backend_ops = { diff --git a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c index 7e420e4ceb..f07b330a8b 100644 --- a/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c +++ b/source4/lib/ldb/ldb_sqlite3/ldb_sqlite3.c @@ -1897,7 +1897,7 @@ static int lsqlite3_connect(struct ldb_context *ldb, int i, ret; module = ldb_module_new(ldb, ldb, "ldb_sqlite3 backend", &lsqlite3_ops); - if (!module) return -1; + if (!module) return LDB_ERR_OPERATIONS_ERROR; lsqlite3 = talloc(module, struct lsqlite3_private); if (!lsqlite3) { @@ -1941,14 +1941,14 @@ static int lsqlite3_connect(struct ldb_context *ldb, } *_module = module; - return 0; + return LDB_SUCCESS; failed: if (lsqlite3 && lsqlite3->sqlite != NULL) { (void) sqlite3_close(lsqlite3->sqlite); } talloc_free(lsqlite3); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } const struct ldb_backend_ops ldb_sqlite3_backend_ops = { diff --git a/source4/lib/ldb/ldb_tdb/ldb_tdb.c b/source4/lib/ldb/ldb_tdb/ldb_tdb.c index d6175863da..f1364d5875 100644 --- a/source4/lib/ldb/ldb_tdb/ldb_tdb.c +++ b/source4/lib/ldb/ldb_tdb/ldb_tdb.c @@ -1319,7 +1319,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, if (strncmp(url, "tdb://", 6) != 0) { ldb_debug(ldb, LDB_DEBUG_ERROR, "Invalid tdb URL '%s'", url); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } path = url+6; } else { @@ -1347,7 +1347,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, ltdb = talloc_zero(ldb, struct ltdb_private); if (!ltdb) { ldb_oom(ldb); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } /* note that we use quite a large default hash size */ @@ -1358,7 +1358,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, ldb_debug(ldb, LDB_DEBUG_ERROR, "Unable to open tdb '%s'", path); talloc_free(ltdb); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } ltdb->sequence_number = 0; @@ -1366,7 +1366,7 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, module = ldb_module_new(ldb, ldb, "ldb_tdb backend", <db_ops); if (!module) { talloc_free(ltdb); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } ldb_module_set_private(module, ltdb); talloc_steal(module, ltdb); @@ -1374,11 +1374,11 @@ static int ltdb_connect(struct ldb_context *ldb, const char *url, if (ltdb_cache_load(module) != 0) { talloc_free(module); talloc_free(ltdb); - return -1; + return LDB_ERR_OPERATIONS_ERROR; } *_module = module; - return 0; + return LDB_SUCCESS; } const struct ldb_backend_ops ldb_tdb_backend_ops = { |