diff options
author | Luke Leighton <lkcl@samba.org> | 1998-12-01 18:24:23 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1998-12-01 18:24:23 +0000 |
commit | e2d51234002609f00bfa92b8031ac15616d6fe26 (patch) | |
tree | 8b16f2f6bd47a531b7420acce221b49279a8224f /source3/smbd | |
parent | 308da9e82b496b0ecfcbf1ee8fd347f37c136ab9 (diff) | |
download | samba-e2d51234002609f00bfa92b8031ac15616d6fe26.tar.gz samba-e2d51234002609f00bfa92b8031ac15616d6fe26.tar.bz2 samba-e2d51234002609f00bfa92b8031ac15616d6fe26.zip |
andrej spotted that entries _not_ in domain map user were being refused.
modified map_nt_and_unix_names() to never refuse a mapping (returns void
now not BOOL).
(This used to be commit faffcb3c8955dcea3987e2978dc34b4dba580167)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/reply.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source3/smbd/reply.c b/source3/smbd/reply.c index bd238c130c..169f69ee07 100644 --- a/source3/smbd/reply.c +++ b/source3/smbd/reply.c @@ -63,7 +63,7 @@ static void overflow_attack(int len) /**************************************************************************** does _both_ nt->unix and unix->unix username remappings. ****************************************************************************/ -static BOOL map_nt_and_unix_username(const char *domain, char *user) +static void map_nt_and_unix_username(const char *domain, char *user) { DOM_NAME_MAP gmep; fstring nt_username; @@ -83,13 +83,12 @@ static BOOL map_nt_and_unix_username(const char *domain, char *user) { fstrcpy(nt_username, user); } - if (!lookupsmbpwntnam(nt_username, &gmep)) + + if (lookupsmbpwntnam(nt_username, &gmep)) { - return False; + fstrcpy(user, gmep.unix_name); } - fstrcpy(user, gmep.unix_name); - /* * Pass the user through the unix -> unix user mapping * function. @@ -100,7 +99,7 @@ static BOOL map_nt_and_unix_username(const char *domain, char *user) /* * Do any UNIX username case mangling. */ - return Get_Pwnam( user, True) != NULL; + (void)Get_Pwnam( user, True); } /**************************************************************************** @@ -665,10 +664,7 @@ int reply_sesssetup_and_X(connection_struct *conn, char *inbuf,char *outbuf,int pstrcpy( orig_user, user); - if (!map_nt_and_unix_username(domain, user)) - { - return(ERROR(ERRSRV,ERRbadpw)); - } + map_nt_and_unix_username(domain, user); add_session_user(user); |