summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-11-06 17:28:44 +0000
committerGerald Carter <jerry@samba.org>2003-11-06 17:28:44 +0000
commitb922425cacd85d32b1471836636ab3675ebb17be (patch)
treea43399a5e02e248ee7ee35941061ce4542a29cf0 /source3
parentd441dbee4cc9f47578535103a96c4ce1aed186fa (diff)
downloadsamba-b922425cacd85d32b1471836636ab3675ebb17be.tar.gz
samba-b922425cacd85d32b1471836636ab3675ebb17be.tar.bz2
samba-b922425cacd85d32b1471836636ab3675ebb17be.zip
run krb5 logins through the username map if the winbindd lookup fails; bug 698
(This used to be commit efe257bce2020e94d00946a27e2e586c82a1480f)
Diffstat (limited to 'source3')
-rw-r--r--source3/auth/auth_util.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c
index 71634f08ed..dd0c0b02dd 100644
--- a/source3/auth/auth_util.c
+++ b/source3/auth/auth_util.c
@@ -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;
}