mirror of
https://github.com/samba-team/samba.git
synced 2025-01-12 09:18:10 +03:00
run krb5 logins through the username map if the winbindd lookup fails; bug 698
(This used to be commit efe257bce2
)
This commit is contained in:
parent
d441dbee4c
commit
b922425cac
@ -952,14 +952,16 @@ static NTSTATUS fill_sam_account(TALLOC_CTX *mem_ctx,
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
Wrapper to allow the getpwnam() call to styrip the domain name and
|
||||
try again in case a local UNIX user is already there.
|
||||
Wrapper to allow the getpwnam() call to strip the domain name and
|
||||
try again in case a local UNIX user is already there. Also run through
|
||||
the username if we fallback to the username only.
|
||||
****************************************************************************/
|
||||
|
||||
struct passwd *smb_getpwnam( char *domuser )
|
||||
{
|
||||
struct passwd *pw;
|
||||
char *p;
|
||||
fstring mapped_username;
|
||||
|
||||
pw = Get_Pwnam( domuser );
|
||||
if ( pw )
|
||||
@ -969,8 +971,11 @@ struct passwd *smb_getpwnam( char *domuser )
|
||||
|
||||
p = strchr( domuser, *lp_winbind_separator() );
|
||||
|
||||
if ( p )
|
||||
return Get_Pwnam(p+1);
|
||||
if ( p ) {
|
||||
fstrcpy( mapped_username, p );
|
||||
map_username( mapped_username );
|
||||
return Get_Pwnam(mapped_username);
|
||||
}
|
||||
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user