From: Andrew Bartlett Date: Tue, 7 Aug 2007 03:35:45 +0000 (+0000) Subject: r24260: Ensure we always override any existing values for these generated X-Git-Url: http://git.samba.org/samba.git/?a=commitdiff_plain;h=af092a361df6b98e1890cbd3e2d1fed168701364;hp=0f7135a4685a1117a54c2f019df6c6de22b8dd32;p=jelmer%2Fsamba4-debian.git r24260: Ensure we always override any existing values for these generated attributes. Anything else leads to madness. Andrew Bartlett --- diff --git a/source/dsdb/samdb/ldb_modules/kludge_acl.c b/source/dsdb/samdb/ldb_modules/kludge_acl.c index ed95d8112..d26c8e348 100644 --- a/source/dsdb/samdb/ldb_modules/kludge_acl.c +++ b/source/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;