summaryrefslogtreecommitdiff
path: root/sql/protocol.cc
diff options
context:
space:
mode:
authorunknown <kostja@oak.local>2003-07-18 18:25:54 +0400
committerunknown <kostja@oak.local>2003-07-18 18:25:54 +0400
commit30ced7f7f61aa25b486ab2134b1fa81310647bc6 (patch)
treeff6daa4950597380db94c038c04c9a8067bbfd68 /sql/protocol.cc
parent84afd56e69f6e42d4f6d11590f974c374a18177c (diff)
downloadmariadb-git-30ced7f7f61aa25b486ab2134b1fa81310647bc6.tar.gz
Style fixes, comments for 4.1.1 authorization
Now special 1-byte packet is used for request of old password Fixed bug with --skip-grant-tables and acl_getroot include/mysql.h: removed scramble_323 member as now scramble_323 function does not count on trailing zero for scramble include/mysql_com.h: updated declarations libmysql/libmysql.c: now server sends special 1-byte packet instead of old scramble to re-request password. mysql->scramble_323 replaced with mysql->scramble sql-common/client.c: now server sends special 1-byte packet instead of old scramble to re-request password. mysql->scramble_323 replaces with mysql->scramble sql/password.c: comments beautified hash_password now accepts password length sql/protocol.cc: added send_old_password_request function sql/protocol.h: added send_old_password_request function sql/sql_acl.cc: style fixes, bug with --skip-grant-tables and acl_getroot fixed sql/sql_class.h: thd->scramble_323 removed as now old functions accept not null-terminated scrambles sql/sql_crypt.cc: fixed with new hash_password proto sql/sql_parse.cc: style fixes few comments added
Diffstat (limited to 'sql/protocol.cc')
-rw-r--r--sql/protocol.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/sql/protocol.cc b/sql/protocol.cc
index 1b9256c7723..7e009aa6a17 100644
--- a/sql/protocol.cc
+++ b/sql/protocol.cc
@@ -348,6 +348,25 @@ send_eof(THD *thd, bool no_flush)
}
DBUG_VOID_RETURN;
}
+
+/*
+ Please client to send scrambled_password in old format.
+ SYNOPSYS
+ send_old_password_request()
+ thd thread handle
+
+ RETURN VALUE
+ 0 ok
+ !0 error
+*/
+
+bool send_old_password_request(THD *thd)
+{
+ static char buff[1]= { (char) 254 };
+ NET *net= &thd->net;
+ return my_net_write(net, buff, 1) || net_flush(net);
+}
+
#endif /* EMBEDDED_LIBRARY */