summaryrefslogtreecommitdiff
path: root/source4/dsdb
diff options
context:
space:
mode:
authorMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 11:46:55 +0200
committerMatthias Dieter Wallnöfer <mdw@samba.org>2010-06-20 18:52:27 +0200
commit2fb715b484d1eec3fadbdf3dc79d0fc88f01af52 (patch)
treefbf438ab624bf0c1d6a2a72181e63a4dd3b63d35 /source4/dsdb
parentc8d2c5fff017a42ffb75aeaabfa19b8503b9e7af (diff)
downloadsamba-2fb715b484d1eec3fadbdf3dc79d0fc88f01af52.tar.gz
samba-2fb715b484d1eec3fadbdf3dc79d0fc88f01af52.tar.bz2
samba-2fb715b484d1eec3fadbdf3dc79d0fc88f01af52.zip
s4:samldb LDB module - remove "samldb_set_defaultObjectCategory"
As far as I can tell and the test show the DN gets now normalised automatically when stored into the database. Anyway, if we find a case where this doesn't happen then I propose to do it centrally for all DN attributes in common since we should get away from special attribute hacks as far as possible.
Diffstat (limited to 'source4/dsdb')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c78
1 files changed, 0 insertions, 78 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 5d64b6d398..5b7e4bea07 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -477,81 +477,6 @@ static int samldb_check_primaryGroupID_2(struct samldb_ctx *ac)
/*
- * samldb_set_defaultObjectCategory_callback (async)
- */
-
-static int samldb_set_defaultObjectCategory_callback(struct ldb_request *req,
- struct ldb_reply *ares)
-{
- struct ldb_context *ldb;
- struct samldb_ctx *ac;
- int ret;
-
- ac = talloc_get_type(req->context, struct samldb_ctx);
- ldb = ldb_module_get_ctx(ac->module);
-
- if (!ares) {
- ret = LDB_ERR_OPERATIONS_ERROR;
- goto done;
- }
-
- if (ares->type == LDB_REPLY_REFERRAL) {
- return ldb_module_send_referral(ac->req, ares->referral);
- }
-
- if (ares->error != LDB_SUCCESS) {
- return ldb_module_done(ac->req, ares->controls,
- ares->response, ares->error);
- }
- if (ares->type != LDB_REPLY_DONE) {
- ldb_set_errstring(ldb,
- "Invalid reply type!");
- ret = LDB_ERR_OPERATIONS_ERROR;
- goto done;
- }
-
- ret = samldb_next_step(ac);
-
-done:
- if (ret != LDB_SUCCESS) {
- return ldb_module_done(ac->req, NULL, NULL, ret);
- }
-
- return LDB_SUCCESS;
-}
-
-static int samldb_set_defaultObjectCategory(struct samldb_ctx *ac)
-{
- struct ldb_context *ldb;
- struct ldb_message *msg;
- struct ldb_request *req;
- int ret;
-
- ldb = ldb_module_get_ctx(ac->module);
-
- /* (Re)set the default object category to have it set to the DN in the
- * storage format */
- msg = ldb_msg_new(ac);
- msg->dn = ac->msg->dn;
- ldb_msg_add_empty(msg, "defaultObjectCategory",
- LDB_FLAG_MOD_REPLACE, NULL);
- ldb_msg_add_steal_string(msg, "defaultObjectCategory",
- ldb_dn_alloc_linearized(msg, ac->res_dn));
-
- ret = ldb_build_mod_req(&req, ldb, ac,
- msg, NULL,
- ac,
- samldb_set_defaultObjectCategory_callback,
- ac->req);
- if (ret != LDB_SUCCESS) {
- talloc_free(msg);
- return ret;
- }
-
- return ldb_next_request(ac->module, req);
-}
-
-/*
* samldb_find_for_defaultObjectCategory (async)
*/
@@ -942,9 +867,6 @@ static int samldb_fill_object(struct samldb_ctx *ac, const char *type)
ret = samldb_add_step(ac, samldb_find_for_defaultObjectCategory);
if (ret != LDB_SUCCESS) return ret;
- ret = samldb_add_step(ac, samldb_set_defaultObjectCategory);
- if (ret != LDB_SUCCESS) return ret;
-
return samldb_first_step(ac);
} else if (strcmp(ac->type, "attributeSchema") == 0) {
const struct ldb_val *rdn_value;