]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:winbind: Fix using normalized name in sam_name_to_sid()
authorAndreas Schneider <asn@samba.org>
Tue, 14 Dec 2021 15:27:17 +0000 (16:27 +0100)
committerJeremy Allison <jra@samba.org>
Wed, 15 Dec 2021 20:22:47 +0000 (20:22 +0000)
name is never read again, we want lsa_name to be set.

Found by covscan.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Volker Lendecke <vl@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Wed Dec 15 20:22:47 UTC 2021 on sn-devel-184

source3/winbindd/winbindd_samr.c

index d4ecb55fce395db78abf9b35c9d97ee453baef38..6b7a2c3be6a9ecc3c15dac2d2af58ec50d40b984 100644 (file)
@@ -683,7 +683,7 @@ static NTSTATUS sam_name_to_sid(struct winbindd_domain *domain,
                        tmp_ctx, name, &normalized);
                if (NT_STATUS_IS_OK(nstatus) ||
                    NT_STATUS_EQUAL(nstatus, NT_STATUS_FILE_RENAMED)) {
-                       name = normalized;
+                       lsa_name.string = normalized;
                }
        }