diff options
author | Gerald Carter <jerry@samba.org> | 2004-03-16 20:32:14 +0000 |
---|---|---|
committer | Gerald Carter <jerry@samba.org> | 2004-03-16 20:32:14 +0000 |
commit | 2f8a18c093938f7aa31541f9b56da9be23fb861b (patch) | |
tree | 117593c55f8e8edca9f37e905cbc1c641ce39176 /source3/auth/auth_util.c | |
parent | 4b27ffd821b8b46d837afda1c7602359314263d5 (diff) | |
download | samba-2f8a18c093938f7aa31541f9b56da9be23fb861b.tar.gz samba-2f8a18c093938f7aa31541f9b56da9be23fb861b.tar.xz samba-2f8a18c093938f7aa31541f9b56da9be23fb861b.zip |
merges from 3.0
(This used to be commit fed98658a5cc82e9fdc65aa73f74e118c1104178)
Diffstat (limited to 'source3/auth/auth_util.c')
-rw-r--r-- | source3/auth/auth_util.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source3/auth/auth_util.c b/source3/auth/auth_util.c index c74f01ab67..0de47f9107 100644 --- a/source3/auth/auth_util.c +++ b/source3/auth/auth_util.c @@ -995,6 +995,7 @@ struct passwd *smb_getpwnam( char *domuser, fstring save_username, BOOL create ) struct passwd *pw = NULL; char *p; fstring mapped_username; + fstring strip_username; /* we only save a copy of the username it has been mangled by winbindd use default domain */ @@ -1032,9 +1033,11 @@ struct passwd *smb_getpwnam( char *domuser, fstring save_username, BOOL create ) } /* setup for lookup of just the username */ - p++; - fstrcpy( mapped_username, p ); + /* remember that p and mapped_username are overlapping memory */ + p++; + fstrcpy( strip_username, p ); + fstrcpy( mapped_username, strip_username ); } /* just lookup a plain username */ |