diff options
author | Andrew Bartlett <abartlet@samba.org> | 2003-02-01 06:17:32 +0000 |
---|---|---|
committer | Andrew Bartlett <abartlet@samba.org> | 2003-02-01 06:17:32 +0000 |
commit | 98a4ebf55cfce9da2c187d89a4f9c7b34e5f999e (patch) | |
tree | f019c8a084e5a959a4f1b71f3fcc545f1997ef35 /source | |
parent | 21da8c3bb39c507eb90865549c3bb3538dcea138 (diff) | |
download | samba-98a4ebf55cfce9da2c187d89a4f9c7b34e5f999e.tar.gz samba-98a4ebf55cfce9da2c187d89a4f9c7b34e5f999e.tar.xz samba-98a4ebf55cfce9da2c187d89a4f9c7b34e5f999e.zip |
Prompted by RedHat bugzilla bug #77999, convert the user's username and
password from 'display' to 'unix' before we check them.
Andrew Bartlett
Diffstat (limited to 'source')
-rw-r--r-- | source/web/cgi.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/source/web/cgi.c b/source/web/cgi.c index 35f32662833..46f33789bfc 100644 --- a/source/web/cgi.c +++ b/source/web/cgi.c @@ -297,7 +297,8 @@ handle a http authentication line ***************************************************************************/ static BOOL cgi_handle_authorization(char *line) { - char *p, *user, *user_pass; + char *p; + fstring user, user_pass; struct passwd *pass = NULL; if (strncasecmp(line,"Basic ", 6)) { @@ -314,9 +315,15 @@ static BOOL cgi_handle_authorization(char *line) goto err; } *p = 0; - user = line; - user_pass = p+1; - + + convert_string(CH_DISPLAY, CH_UNIX, + line, -1, + user, sizeof(user)); + + convert_string(CH_DISPLAY, CH_UNIX, + p+1, -1, + user_pass, sizeof(user_pass)); + /* * Try and get the user from the UNIX password file. */ |