1
0
mirror of https://github.com/samba-team/samba.git synced 2025-08-08 13:49:29 +03:00

handle null usernames

(This used to be commit ee60d9a289)
This commit is contained in:
Andrew Tridgell
1998-11-12 07:32:33 +00:00
parent 27d96564ce
commit 6bf01d58ca

View File

@ -661,7 +661,7 @@ static void chg_passwd(void)
****************************************************************************/
static void passwd_page(void)
{
char *new_name;
char *new_name = get_user_name();
printf("<H2>Password Manager</H2>\n");
@ -673,14 +673,11 @@ static void passwd_page(void)
* After the first time through here be nice. If the user
* changed the User box text to another users name, remember it.
*/
if (cgi_variable(USER) &&
(strcmp(cgi_variable(USER), get_user_name()))) {
/* User is changing another accounts passwd */
if (cgi_variable(USER)) {
new_name = cgi_variable(USER);
} else {
/* User is changing there own passwd */
new_name = get_user_name();
}
}
if (!new_name) new_name = "";
printf("<p> User Name : <input type=text size=30 name=%s value=%s> \n",
USER, new_name);