1
0
mirror of https://github.com/samba-team/samba.git synced 2025-02-28 01:58:17 +03:00

Merge from HEAD - convert username/password to unix before checking them in

SWAT.
(This used to be commit 8485c51bc47f45a6263bda83a0bc3ba15abcd250)
This commit is contained in:
Andrew Bartlett 2003-02-01 07:27:01 +00:00
parent 3b2244526c
commit 9c858c3188

View File

@ -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,8 +315,14 @@ 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.