]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4-dsdb: Rename user_attrs to attrs to avoid conflict and add static const
authorJoseph Sutton <josephsutton@catalyst.net.nz>
Tue, 27 Sep 2022 01:48:28 +0000 (14:48 +1300)
committerDouglas Bagnall <dbagnall@samba.org>
Fri, 21 Oct 2022 03:57:33 +0000 (03:57 +0000)
This now local and static const list was otherwise a duplicate symbol
shadowing with the global user_attrs.

Signed-off-by: Joseph Sutton <josephsutton@catalyst.net.nz>
Reviewed-by: Douglas Bagnall <douglas.bagnall@catalyst.net.nz>
source4/dsdb/common/util.c

index be0a2cd4a3325f117b5a46348cab2c5e4d2a1701..82f4cdfab2195a13603fe12199cd965ba538b971 100644 (file)
@@ -2544,7 +2544,7 @@ NTSTATUS samdb_set_password_sid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
 {
        TALLOC_CTX *frame = talloc_stackframe();
        NTSTATUS nt_status;
-       const char * const user_attrs[] = {
+       static const char * const attrs[] = {
                "userAccountControl",
                "sAMAccountName",
                NULL
@@ -2561,7 +2561,7 @@ NTSTATUS samdb_set_password_sid(struct ldb_context *ldb, TALLOC_CTX *mem_ctx,
        }
 
        ret = dsdb_search_one(ldb, frame, &user_msg, ldb_get_default_basedn(ldb),
-                             LDB_SCOPE_SUBTREE, user_attrs, 0,
+                             LDB_SCOPE_SUBTREE, attrs, 0,
                              "(&(objectSid=%s)(objectClass=user))",
                              ldap_encode_ndr_dom_sid(frame, user_sid));
        if (ret != LDB_SUCCESS) {