s3:passdb: Add support to handle UPNs in lookup_name()
authorAndreas Schneider <asn@cryptomilk.org>
Tue, 26 Apr 2022 05:12:02 +0000 (07:12 +0200)
committerJule Anger <janger@samba.org>
Thu, 28 Apr 2022 07:49:11 +0000 (07:49 +0000)
commitf11fef0447183da7334320dece5122cc010417e4
treed6dab4048b4470c1283b7397c3662365f2b12caf
parent844380014582b2e034d05740aa85ad0f96b24248
s3:passdb: Add support to handle UPNs in lookup_name()

This address an issue if sssd is running and handling nsswitch. If we look up
a user with getpwnam("DOMAIN\user") it will return user@REALM in the passwd
structure. We need to be able to deal with that.

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>
(cherry picked from commit 2a03fb91c1120718ada9d4b8421044cb7eae7b83)
source3/passdb/lookup_sid.c