mysql-useradm - Don't require current password for a password change, only
ask for the new one.
This commit is contained in:
parent
8de782e9e6
commit
953f1fe842
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* @(#) $Header: /tmp/cvs/mysql-admutils/mysql-useradm.c,v 1.11 2007-02-27 14:10:08 geirha Exp $
|
* @(#) $Header: /tmp/cvs/mysql-admutils/mysql-useradm.c,v 1.12 2011-09-22 12:17:18 geirha Exp $
|
||||||
*
|
*
|
||||||
* mysql-useradm.c
|
* mysql-useradm.c
|
||||||
*
|
*
|
||||||
|
@ -25,8 +25,7 @@ usage()
|
||||||
printf("\n");
|
printf("\n");
|
||||||
printf(" create create the USER(s).\n");
|
printf(" create create the USER(s).\n");
|
||||||
printf(" delete delete the USER(s).\n");
|
printf(" delete delete the USER(s).\n");
|
||||||
printf(" passwd change the MySQL password for the USER(s). You\n");
|
printf(" passwd change the MySQL password for the USER(s).\n");
|
||||||
printf(" will be promptet for the old and the new password.\n");
|
|
||||||
printf(" show give information about the USERS(s), or, if\n");
|
printf(" show give information about the USERS(s), or, if\n");
|
||||||
printf(" none are given, all the users you have.\n");
|
printf(" none are given, all the users you have.\n");
|
||||||
printf("\n");
|
printf("\n");
|
||||||
|
@ -94,6 +93,7 @@ passwd(MYSQL *pmysql, const char *user)
|
||||||
int rows;
|
int rows;
|
||||||
MYSQL_ROW row;
|
MYSQL_ROW row;
|
||||||
|
|
||||||
|
/*
|
||||||
if (is_password_set(pmysql, user))
|
if (is_password_set(pmysql, user))
|
||||||
{
|
{
|
||||||
sprintf(prompt, "(current) MySQL password for user '%s': ", user);
|
sprintf(prompt, "(current) MySQL password for user '%s': ", user);
|
||||||
|
@ -119,6 +119,7 @@ passwd(MYSQL *pmysql, const char *user)
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
*/
|
||||||
|
|
||||||
sprintf(prompt, "New MySQL password for user '%s': ", user);
|
sprintf(prompt, "New MySQL password for user '%s': ", user);
|
||||||
password = getpass(prompt);
|
password = getpass(prompt);
|
||||||
|
|
Loading…
Reference in New Issue