summaryrefslogtreecommitdiff
path: root/source4/dsdb/samdb/ldb_modules/objectclass.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-01-18 16:56:41 +1100
committerAndrew Bartlett <abartlet@samba.org>2008-01-18 16:56:41 +1100
commit391f089d71b4b51a130819ab681dcd1253f16b8c (patch)
tree4a761658442b8e9b11cdca65a3be66a39a50e742 /source4/dsdb/samdb/ldb_modules/objectclass.c
parent564e021ed974b4bb3472ec3fc091746663808afd (diff)
downloadsamba-391f089d71b4b51a130819ab681dcd1253f16b8c.tar.gz
samba-391f089d71b4b51a130819ab681dcd1253f16b8c.tar.bz2
samba-391f089d71b4b51a130819ab681dcd1253f16b8c.zip
Add showInAdvancedViewOnly to every new object
Unless already set, the default value for this comes from the defaultHidingValue in the schema. Andrew Bartlett (This used to be commit 673f1805006f879fa5302aab8411767a22488e64)
Diffstat (limited to 'source4/dsdb/samdb/ldb_modules/objectclass.c')
-rw-r--r--source4/dsdb/samdb/ldb_modules/objectclass.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source4/dsdb/samdb/ldb_modules/objectclass.c b/source4/dsdb/samdb/ldb_modules/objectclass.c
index d3beedc689..871c38476b 100644
--- a/source4/dsdb/samdb/ldb_modules/objectclass.c
+++ b/source4/dsdb/samdb/ldb_modules/objectclass.c
@@ -532,6 +532,10 @@ static int objectclass_do_add(struct ldb_handle *h)
ldb_msg_add_string(msg, "objectCategory",
current->objectclass->defaultObjectCategory);
}
+ if (!ldb_msg_find_element(msg, "showInAdvancedViewOnly")) {
+ ldb_msg_add_string(msg, "showInAdvancedViewOnly",
+ current->objectclass->defaultHidingValue ? "TRUE" : "FALSE");
+ }
if (!ldb_msg_find_element(msg, "nTSecurityDescriptor")) {
DATA_BLOB *sd = get_sd(ac->module, mem_ctx, current->objectclass);
ldb_msg_add_steal_value(msg, "nTSecurityDescriptor", sd);