summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorkostja@oak.local <>2003-07-01 23:40:59 +0400
committerkostja@oak.local <>2003-07-01 23:40:59 +0400
commit7df0475847103581798ddacf75dbf634e8f98d0a (patch)
treecbcae0aeb3eee5a5a448084ae5f0e9b5290fac26 /client
parent7c799b17b6e8d29ed095c4371302b315e958ad7e (diff)
downloadmariadb-git-7df0475847103581798ddacf75dbf634e8f98d0a.tar.gz
First version of new authentification procedure: now authentification is one-stage (instead of two-stage in 4.1)
For now following tasks have been done: - PASSWORD() function was rewritten. PASSWORD() now returns SHA1 hash_stage2; for new passwords user.password contains '*'hash_stage2; sql_yacc.yy also fixed; - password.c: new functions were implemented, old rolled back to 4.0 state - server code was rewritten to use new authorization algorithm (check_user(), change user, and other stuff in sql/sql_parse.cc) - client code was rewritten to use new authorization algorithm (mysql_real_connect, myslq_authenticate in sql-common/client.c) - now server barks on 45-byte-length 4.1.0 passwords and refuses 4.1.0-style authentification. Users with 4.1.0 passwords are blocked (sql/sql_acl.cc) - mysqladmin.c was fixed to work correctly with new passwords Tests for 4.0-4.1.1, 4.1.1-4.1.1 (with or without db/password) logons was performed; mysqladmin also was tested. Additional check are nevertheless necessary.
Diffstat (limited to 'client')
-rw-r--r--client/mysqladmin.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/client/mysqladmin.c b/client/mysqladmin.c
index 018bcbc1963..f263d321a7b 100644
--- a/client/mysqladmin.c
+++ b/client/mysqladmin.c
@@ -769,9 +769,12 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
return 1;
}
if (argv[1][0])
- make_scrambled_password(crypted_pw,argv[1],
- (find_type(argv[0], &command_typelib, 2) ==
- ADMIN_OLD_PASSWORD), &rand_st);
+ {
+ if (find_type(argv[0], &command_typelib, 2) == ADMIN_OLD_PASSWORD)
+ make_scrambled_password_323(crypted_pw, argv[1]);
+ else
+ make_scrambled_password(crypted_pw, argv[1]);
+ }
else
crypted_pw[0]=0; /* No password */
sprintf(buff,"set password='%s',sql_log_off=0",crypted_pw);