1
0
mirror of https://github.com/samba-team/samba.git synced 2025-10-23 11:33:16 +03:00

r8674: With the rdn_name module, we don't need this duplication in the samdb

module any more.

Andrew Bartlett
This commit is contained in:
Andrew Bartlett
2005-07-21 09:19:21 +00:00
committed by Gerald (Jerry) Carter
parent f9693e313d
commit da48e77e7c

View File

@@ -421,17 +421,6 @@ static struct ldb_message *samldb_fill_group_object(struct ldb_module *module, c
}
}
if ((attribute = samldb_find_attribute(msg2, "name", NULL)) != NULL) {
if (strcasecmp(rdn->value.data, attribute->values[0].data) != 0) {
return NULL;
}
} else { /* FIXME: remove this if ldb supports natively aliasing between the rdn and the "name" attribute */
if ( ldb_msg_add_value(module->ldb, msg2, "name", &rdn->value)) {
return NULL;
}
}
if ((attribute = samldb_find_attribute(msg2, "objectSid", NULL)) == NULL ) {
struct dom_sid *sid = samldb_get_new_sid(module, msg2, msg2->dn);
if (sid == NULL) {
@@ -512,17 +501,6 @@ static struct ldb_message *samldb_fill_user_or_computer_object(struct ldb_module
}
}
if ((attribute = samldb_find_attribute(msg2, "name", NULL)) != NULL) {
if (strcasecmp(rdn->value.data, attribute->values[0].data) != 0) {
ldb_debug(module->ldb, LDB_DEBUG_FATAL, "samldb_fill_user_or_computer_object: Bad Attribute Syntax for name\n");
return NULL;
}
} else { /* FIXME: remove this if ldb supports natively aliasing between the rdn and the "name" attribute */
if ( ldb_msg_add_value(module->ldb, msg2, "name", &rdn->value)) {
return NULL;
}
}
if ((attribute = samldb_find_attribute(msg2, "objectSid", NULL)) == NULL ) {
struct dom_sid *sid;
sid = samldb_get_new_sid(module, msg2, msg2->dn);