1
0
mirror of https://github.com/samba-team/samba.git synced 2025-03-27 22:50:26 +03:00

pam_winbind: Return if we do not have a domain

Found by covscan.

BUG: https://bugzilla.samba.org/show_bug.cgi?id=12592

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Jeremy Allison <jra@samba.org>
(cherry picked from commit 1df1d873c849f68a91d067c7049dda12c22e98c5)
This commit is contained in:
Andreas Schneider 2017-02-17 11:53:52 +01:00 committed by Karolin Seeger
parent efeb8b3a27
commit 3e5207d9f1

View File

@ -2479,10 +2479,14 @@ static char* winbind_upn_to_username(struct pwb_context *ctx,
if (!name) {
return NULL;
}
if ((p = strchr(name, '@')) != NULL) {
*p = 0;
domain = p + 1;
p = strchr(name, '@');
if (p == NULL) {
TALLOC_FREE(name);
return NULL;
}
*p = '\0';
domain = p + 1;
/* Convert the UPN to a SID */