summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMatthieu Patou <mat@matws.net>2012-04-16 23:24:10 -0700
committerMichael Adam <obnox@samba.org>2012-04-18 00:07:02 +0200
commitc5934d9a1cbf0ff8c2e4740f4cd2546e6e89731c (patch)
tree3aa5014f53096d1fd58d82986938a576d5fee108 /source4
parent9887d390b17e60c8ac4d267b47a998a27522f6dd (diff)
downloadsamba-c5934d9a1cbf0ff8c2e4740f4cd2546e6e89731c.tar.gz
samba-c5934d9a1cbf0ff8c2e4740f4cd2546e6e89731c.tar.bz2
samba-c5934d9a1cbf0ff8c2e4740f4cd2546e6e89731c.zip
s4-schema: set subClassOf by default to top if not specified
Signed-off-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source4')
-rw-r--r--source4/dsdb/samdb/ldb_modules/samldb.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/samldb.c b/source4/dsdb/samdb/ldb_modules/samldb.c
index 41751a2c7d..79ab1f85ce 100644
--- a/source4/dsdb/samdb/ldb_modules/samldb.c
+++ b/source4/dsdb/samdb/ldb_modules/samldb.c
@@ -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;