From: Joseph Sutton Date: Tue, 27 Sep 2022 01:48:28 +0000 (+1300) Subject: s4-dsdb: Rename user_attrs to attrs to avoid conflict and add static const X-Git-Tag: talloc-2.4.0~696 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=fb1718094d0f8b3f3cdf119eebb81f341a02d137;p=thirdparty%2Fsamba.git s4-dsdb: Rename user_attrs to attrs to avoid conflict and add static const This now local and static const list was otherwise a duplicate symbol shadowing with the global user_attrs. Signed-off-by: Joseph Sutton Reviewed-by: Douglas Bagnall --- diff --git a/source4/dsdb/common/util.c b/source4/dsdb/common/util.c index be0a2cd4a33..82f4cdfab21 100644 --- a/source4/dsdb/common/util.c +++ b/source4/dsdb/common/util.c @@ -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) {