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 | faffcb3c8955dcea3987e2978dc34b4dba580167 (patch) | |
tree | 03971385a27f5c5f87bc066fa3822872525f89a5 /source/smbd/reply.c | |
parent | 2c0d91e64a6b330b209ca62c3306ec1a53fda873 (diff) | |
download | samba-faffcb3c8955dcea3987e2978dc34b4dba580167.tar.gz samba-faffcb3c8955dcea3987e2978dc34b4dba580167.tar.xz samba-faffcb3c8955dcea3987e2978dc34b4dba580167.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).
Diffstat (limited to 'source/smbd/reply.c')
-rw-r--r-- | source/smbd/reply.c | 16 |
1 files changed, 6 insertions, 10 deletions
diff --git a/source/smbd/reply.c b/source/smbd/reply.c index bd238c130cc..169f69ee072 100644 --- a/source/smbd/reply.c +++ b/source/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); |