From 5fe53d6aced8682cb634bfbcf43f161d324b5a5e Mon Sep 17 00:00:00 2001 From: Andrew Bartlett Date: Tue, 7 Aug 2007 03:35:45 +0000 Subject: r24260: Ensure we always override any existing values for these generated attributes. Anything else leads to madness. Andrew Bartlett (This used to be commit af092a361df6b98e1890cbd3e2d1fed168701364) --- source4/dsdb/samdb/ldb_modules/kludge_acl.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4/dsdb/samdb') diff --git a/source4/dsdb/samdb/ldb_modules/kludge_acl.c b/source4/dsdb/samdb/ldb_modules/kludge_acl.c index ed95d8112d..d26c8e3485 100644 --- a/source4/dsdb/samdb/ldb_modules/kludge_acl.c +++ b/source4/dsdb/samdb/ldb_modules/kludge_acl.c @@ -122,6 +122,8 @@ static int kludge_acl_allowedAttributes(struct ldb_context *ldb, struct ldb_mess const struct dsdb_schema *schema = dsdb_get_schema(ldb); const struct dsdb_class *class; int i, j, ret; + /* Must remove any existing attribute, or else confusion reins */ + ldb_msg_remove_attr(msg, attrName); ret = ldb_msg_add_empty(msg, attrName, 0, &allowedAttributes); if (ret != LDB_SUCCESS) { return ret; @@ -182,6 +184,8 @@ static int kludge_acl_childClasses(struct ldb_context *ldb, struct ldb_message * const struct dsdb_schema *schema = dsdb_get_schema(ldb); const struct dsdb_class *class; int i, j, ret; + /* Must remove any existing attribute, or else confusion reins */ + ldb_msg_remove_attr(msg, attrName); ret = ldb_msg_add_empty(msg, attrName, 0, &allowedClasses); if (ret != LDB_SUCCESS) { return ret; -- cgit