mirror of
https://github.com/samba-team/samba.git
synced 2025-02-04 17:47:26 +03:00
Fix for bug #445 (missing unix user on kerberos auth doesn't call add user
script). Jeremy. (This used to be commit 5d9f06bdae4e7b878a87fb97367cf10afbc5f6b2)
This commit is contained in:
parent
4b1e15a4f2
commit
aad0b08cbb
@ -965,7 +965,7 @@ static NTSTATUS fill_sam_account(TALLOC_CTX *mem_ctx,
|
||||
|
||||
struct passwd *smb_getpwnam( char *domuser )
|
||||
{
|
||||
struct passwd *pw;
|
||||
struct passwd *pw = NULL;
|
||||
char *p;
|
||||
fstring mapped_username;
|
||||
|
||||
@ -981,10 +981,20 @@ struct passwd *smb_getpwnam( char *domuser )
|
||||
p += 1;
|
||||
fstrcpy( mapped_username, p );
|
||||
map_username( mapped_username );
|
||||
return Get_Pwnam(mapped_username);
|
||||
pw = Get_Pwnam(mapped_username);
|
||||
if (!pw) {
|
||||
/* Create local user if requested. */
|
||||
p = strchr( mapped_username, *lp_winbind_separator() );
|
||||
if (p)
|
||||
p += 1;
|
||||
else
|
||||
p = mapped_username;
|
||||
auth_add_user_script(NULL, p);
|
||||
return Get_Pwnam(p);
|
||||
}
|
||||
}
|
||||
|
||||
return NULL;
|
||||
return pw;
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
|
Loading…
x
Reference in New Issue
Block a user