summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-09 19:45:45 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-08-10 19:08:56 +0200
commite53fc1228f12ff2ce2c84936e38fef3b5ae311c4 (patch)
tree4c2881b0e7ed8aeef0393aeb9cf5ff8f96cb433a /source4/dsdb
parent75adca63f21ab4b415e0f909a54972d8dd57a153 (diff)
downloadsamba-e53fc1228f12ff2ce2c84936e38fef3b5ae311c4.tar.gz
samba-e53fc1228f12ff2ce2c84936e38fef3b5ae311c4.tar.bz2
samba-e53fc1228f12ff2ce2c84936e38fef3b5ae311c4.zip
s4:dsdb/common/util.c - use LDB constants whenever possible
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/common/util.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c
index 52ba81d975..685c94a411 100644
--- a/source4/dsdb/common/util.c
+++ b/source4/dsdb/common/util.c
@@ -1831,7 +1831,7 @@ bool samdb_is_pdc(struct ldb_context *ldb)
}
ret = ldb_search(ldb, tmp_ctx, &dom_res, ldb_get_default_basedn(ldb), LDB_SCOPE_BASE, dom_attrs, NULL);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
DEBUG(1,("Searching for fSMORoleOwner in %s failed: %s\n",
ldb_dn_get_linearized(ldb_get_default_basedn(ldb)),
ldb_errstring(ldb)));
@@ -1877,7 +1877,7 @@ bool samdb_is_gc(struct ldb_context *ldb)
/* Query cn=ntds settings,.... */
ret = ldb_search(ldb, tmp_ctx, &res, samdb_ntds_settings_dn(ldb), LDB_SCOPE_BASE, attrs, NULL);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
talloc_free(tmp_ctx);
return false;
}
@@ -1903,7 +1903,7 @@ int samdb_search_for_parent_domain(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
TALLOC_CTX *local_ctx;
struct ldb_dn *sdn = dn;
struct ldb_result *res = NULL;
- int ret = 0;
+ int ret = LDB_SUCCESS;
const char *attrs[] = { NULL };
local_ctx = talloc_new(mem_ctx);
@@ -2350,7 +2350,7 @@ struct ldb_dn *samdb_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
domain_ref_attrs,
"(&(nETBIOSName=%s)(objectclass=crossRef))",
escaped_domain);
- if (ret_domain != 0) {
+ if (ret_domain != LDB_SUCCESS) {
return NULL;
}
@@ -2361,7 +2361,7 @@ struct ldb_dn *samdb_domain_to_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
LDB_SCOPE_BASE,
domain_ref2_attrs,
"(objectclass=domain)");
- if (ret_domain != 0) {
+ if (ret_domain != LDB_SUCCESS) {
return NULL;
}
@@ -2895,7 +2895,7 @@ int samdb_ntds_options(struct ldb_context *ldb, uint32_t *options)
}
ret = ldb_search(ldb, tmp_ctx, &res, samdb_ntds_settings_dn(ldb), LDB_SCOPE_BASE, attrs, NULL);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
goto failed;
}
@@ -2922,7 +2922,7 @@ const char* samdb_ntds_object_category(TALLOC_CTX *tmp_ctx, struct ldb_context *
struct ldb_result *res;
ret = ldb_search(ldb, tmp_ctx, &res, samdb_ntds_settings_dn(ldb), LDB_SCOPE_BASE, attrs, NULL);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
goto failed;
}
@@ -3209,7 +3209,7 @@ int dsdb_find_nc_root(struct ldb_context *samdb, TALLOC_CTX *mem_ctx, struct ldb
ret = ldb_search(samdb, tmp_ctx, &root_res,
ldb_dn_new(tmp_ctx, samdb, ""), LDB_SCOPE_BASE, root_attrs, NULL);
- if (ret) {
+ if (ret != LDB_SUCCESS) {
DEBUG(1,("Searching for namingContexts in rootDSE failed: %s\n", ldb_errstring(samdb)));
talloc_free(tmp_ctx);
return ret;