diff options
author | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-02 22:13:03 +0200 |
---|---|---|
committer | Matthias Dieter Wallnöfer <mdw@samba.org> | 2010-06-07 14:47:22 +0200 |
commit | da90868907c7dc7f9894dc06bd49df701ff442eb (patch) | |
tree | b4437b7eb01eceafc1d8cf02ee591842e299bddc /source4/dsdb/samdb/ldb_modules | |
parent | 9ab3365fa5a37257d818c414925264a336eb103c (diff) | |
download | samba-da90868907c7dc7f9894dc06bd49df701ff442eb.tar.gz samba-da90868907c7dc7f9894dc06bd49df701ff442eb.tar.bz2 samba-da90868907c7dc7f9894dc06bd49df701ff442eb.zip |
s4:samldb LDB module - finally we can remove the RDN check
This is now dynamically always done by the objectclass LDB module
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules')
-rw-r--r-- | source4/dsdb/samdb/ldb_modules/samldb.c | 53 |
1 files changed, 0 insertions, 53 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c index 8e5e0b4537..4ff5caa7bb 100644 --- a/source4/dsdb/samdb/ldb_modules/samldb.c +++ b/source4/dsdb/samdb/ldb_modules/samldb.c @@ -1063,24 +1063,6 @@ static int samldb_fill_foreignSecurityPrincipal_object(struct samldb_ctx *ac) return samldb_first_step(ac); } -static int samldb_check_rdn(struct ldb_module *module, struct ldb_dn *dn) -{ - struct ldb_context *ldb; - const char *rdn_name; - - ldb = ldb_module_get_ctx(module); - rdn_name = ldb_dn_get_rdn_name(dn); - - if (strcasecmp(rdn_name, "cn") != 0) { - ldb_asprintf_errstring(ldb, - "Bad RDN (%s=) for samldb object, " - "should be CN=!", rdn_name); - return LDB_ERR_CONSTRAINT_VIOLATION; - } - - return LDB_SUCCESS; -} - static int samldb_schema_info_update(struct samldb_ctx *ac) { WERROR werr; @@ -1356,25 +1338,11 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req) if (samdb_find_attribute(ldb, ac->msg, "objectclass", "user") != NULL) { - - ret = samldb_check_rdn(module, ac->req->op.add.message->dn); - if (ret != LDB_SUCCESS) { - talloc_free(ac); - return ret; - } - return samldb_fill_object(ac, "user"); } if (samdb_find_attribute(ldb, ac->msg, "objectclass", "group") != NULL) { - - ret = samldb_check_rdn(module, ac->req->op.add.message->dn); - if (ret != LDB_SUCCESS) { - talloc_free(ac); - return ret; - } - return samldb_fill_object(ac, "group"); } @@ -1382,25 +1350,11 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req) if (samdb_find_attribute(ldb, ac->msg, "objectclass", "foreignSecurityPrincipal") != NULL) { - - ret = samldb_check_rdn(module, ac->req->op.add.message->dn); - if (ret != LDB_SUCCESS) { - talloc_free(ac); - return ret; - } - return samldb_fill_foreignSecurityPrincipal_object(ac); } if (samdb_find_attribute(ldb, ac->msg, "objectclass", "classSchema") != NULL) { - - ret = samldb_check_rdn(module, ac->req->op.add.message->dn); - if (ret != LDB_SUCCESS) { - talloc_free(ac); - return ret; - } - ret = samldb_schema_info_update(ac); if (ret != LDB_SUCCESS) { talloc_free(ac); @@ -1412,13 +1366,6 @@ static int samldb_add(struct ldb_module *module, struct ldb_request *req) if (samdb_find_attribute(ldb, ac->msg, "objectclass", "attributeSchema") != NULL) { - - ret = samldb_check_rdn(module, ac->req->op.add.message->dn); - if (ret != LDB_SUCCESS) { - talloc_free(ac); - return ret; - } - ret = samldb_schema_info_update(ac); if (ret != LDB_SUCCESS) { talloc_free(ac); |