1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-25 17:57:42 +03:00

s4-schema: set subClassOf by default to top if not specified

Signed-off-by: Michael Adam <obnox@samba.org>
This commit is contained in:
Matthieu Patou 2012-04-16 23:24:10 -07:00 committed by Michael Adam
parent 9887d390b1
commit c5934d9a1c

View File

@ -621,6 +621,12 @@ static int samldb_fill_object(struct samldb_ctx *ac)
const struct ldb_val *rdn_value, *def_obj_cat_val;
unsigned int v = ldb_msg_find_attr_as_uint(ac->msg, "objectClassCategory", -2);
/* As discussed with Microsoft through dochelp in April 2012 this is the behavior of windows*/
if (!ldb_msg_find_element(ac->msg, "subClassOf")) {
ret = ldb_msg_add_string(ac->msg, "subClassOf", "top");
if (ret != LDB_SUCCESS) return ret;
}
ret = samdb_find_or_add_attribute(ldb, ac->msg,
"rdnAttId", "cn");
if (ret != LDB_SUCCESS) return ret;