diff options
author | Andrew Bartlett <abartlet@samba.org> | 2006-08-22 04:32:34 +0000 |
---|---|---|
committer | Gerald (Jerry) Carter <jerry@samba.org> | 2007-10-10 14:16:26 -0500 |
commit | 23557a9f17a792f427fedb9012bc951bf3918b2d (patch) | |
tree | 63fdb5c5a637fc42ac578f0db60c8ab5a3df70df /source4/dsdb/samdb | |
parent | 70da14f025cae27395b85ff341e9c2a13cd24713 (diff) | |
download | samba-23557a9f17a792f427fedb9012bc951bf3918b2d.tar.gz samba-23557a9f17a792f427fedb9012bc951bf3918b2d.tar.bz2 samba-23557a9f17a792f427fedb9012bc951bf3918b2d.zip |
r17694: Don't use printf() in a module...
(This used to be commit 9f810ddd1436672e16a6b80500bb14aa21e097de)
Diffstat (limited to 'source4/dsdb/samdb')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/entryUUID.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/entryUUID.c b/source4/dsdb/samdb/ldb_modules/entryUUID.c index c2c422185f..62f4d3fdcb 100644 --- a/source4/dsdb/samdb/ldb_modules/entryUUID.c +++ b/source4/dsdb/samdb/ldb_modules/entryUUID.c @@ -257,7 +257,7 @@ const struct ldb_map_attribute entryUUID_attributes[] = static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ctx) { const char *rootdse_attrs[] = {"schemaNamingContext", NULL}; - struct ldb_dn *schemadn; + struct ldb_dn *schema_dn; struct ldb_dn *basedn = ldb_dn_explode(mem_ctx, ""); struct ldb_result *rootdse_res; int ldb_ret; @@ -268,25 +268,24 @@ static struct ldb_dn *find_schema_dn(struct ldb_context *ldb, TALLOC_CTX *mem_ct /* Search for rootdse */ ldb_ret = ldb_search(ldb, basedn, LDB_SCOPE_BASE, NULL, rootdse_attrs, &rootdse_res); if (ldb_ret != LDB_SUCCESS) { - printf("Search failed: %s\n", ldb_errstring(ldb)); return NULL; } talloc_steal(mem_ctx, rootdse_res); if (rootdse_res->count != 1) { - printf("Failed to find rootDSE"); + ldb_asprintf_errstring(ldb, "Failed to find rootDSE: count %d", rootdse_res->count); return NULL; } /* Locate schema */ - schemadn = ldb_msg_find_attr_as_dn(mem_ctx, rootdse_res->msgs[0], "schemaNamingContext"); - if (!schemadn) { + schema_dn = ldb_msg_find_attr_as_dn(mem_ctx, rootdse_res->msgs[0], "schemaNamingContext"); + if (!schema_dn) { return NULL; } talloc_free(rootdse_res); - return schemadn; + return schema_dn; } static int fetch_objectclass_schema(struct ldb_context *ldb, struct ldb_dn *schemadn, |