]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:passdb: Also allow to handle UPNs in lookup_name_smbconf()
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 26 Apr 2022 05:39:12 +0000 (07:39 +0200)
committerJeremy Allison <jra@samba.org>
Tue, 26 Apr 2022 20:16:33 +0000 (20:16 +0000)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=15054

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
Autobuild-User(master): Jeremy Allison <jra@samba.org>
Autobuild-Date(master): Tue Apr 26 20:16:33 UTC 2022 on sn-devel-184

source3/passdb/lookup_sid.c

index de9dd123239dd2e4e2fd3800045a481efef27f3c..426ea3f81bda52675af4ef59d63993d1c3e76bb1 100644 (file)
@@ -466,8 +466,9 @@ bool lookup_name_smbconf(TALLOC_CTX *mem_ctx,
 {
        char *qualified_name = NULL;
        const char *p = strchr_m(full_name, *lp_winbind_separator());
-       bool is_qualified = p != NULL;
+       bool is_qualified = p != NULL || strchr_m(full_name, '@') != NULL;
 
+       /* For DOMAIN\user or user@REALM directly call lookup_name(). */
        if (is_qualified) {
 
                /* The name is already qualified with a domain. */