s4:acl LDB module - LDB attribute names should be compared using "ldb_attr_cmp" or...
authorMatthias Dieter Wallnöfer <mdw@samba.org>
Sun, 6 Jun 2010 17:06:58 +0000 (19:06 +0200)
committerMatthias Dieter Wallnöfer <mdw@samba.org>
Mon, 7 Jun 2010 12:47:24 +0000 (14:47 +0200)
source4/dsdb/samdb/ldb_modules/acl.c

index 46644daeb3244aef7c219cb001c5e7990605f034..ccc7edf21848dc1cf46c29d6041bb07ab8b427ab 100644 (file)
@@ -730,7 +730,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
        for (i=0; i < req->op.mod.message->num_elements; i++){
                const struct dsdb_attribute *attr;
                /* clearTextPassword is not in schema */
-               if (strcmp("clearTextPassword", req->op.mod.message->elements[i].name) == 0) {
+               if (ldb_attr_cmp("clearTextPassword", req->op.mod.message->elements[i].name) == 0) {
                        attr = dsdb_attribute_by_lDAPDisplayName(schema, "unicodePwd");
                } else {
                        attr = dsdb_attribute_by_lDAPDisplayName(schema,
@@ -751,7 +751,7 @@ static int acl_modify(struct ldb_module *module, struct ldb_request *req)
                        return LDB_ERR_NO_SUCH_ATTRIBUTE;
                }
 
-               if (strcmp("nTSecurityDescriptor", req->op.mod.message->elements[i].name) == 0) {
+               if (ldb_attr_cmp("nTSecurityDescriptor", req->op.mod.message->elements[i].name) == 0) {
                        modify_sd = true;
                } else {