summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
authorGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
committerGeorgi Kodinov <joro@sun.com>2009-03-09 20:57:03 +0200
commit3033ea85a20fb5afd4cab8a816ff72fd4d784778 (patch)
tree00e35a3675d99f6ecdede0e62ce24e379186aed2 /tools
parent6a99d1d4fbb6a05734f8c2cc6305a0d61efdc883 (diff)
downloadmariadb-git-3033ea85a20fb5afd4cab8a816ff72fd4d784778.tar.gz
Bug #42434: license of mysys MD5 implementation is not GPL-compatible
Took the Xfree implementation (based on the same rewrite as the NDB one) and added it instead of the current implementation. Added a macro to make the calls to MD5 more streamlined. client/mysqlmanager-pwgen.c: Bug #42434: changed to call the macro include/my_md5.h: Bug #42434: use the Xfree implementation mysys/md5.c: Bug #42434: use the Xfree implementation sql/item_strfunc.cc: Bug #42434: changed to call the macro sql/table.cc: Bug #42434: changed to call the macro tools/mysqlmanager.c: Bug #42434: changed to call the macro
Diffstat (limited to 'tools')
-rw-r--r--tools/mysqlmanager.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/tools/mysqlmanager.c b/tools/mysqlmanager.c
index faed9addf60..36f2b8eff9d 100644
--- a/tools/mysqlmanager.c
+++ b/tools/mysqlmanager.c
@@ -992,7 +992,6 @@ end:
static int authenticate(struct manager_thd* thd)
{
char* buf_end,*buf,*p,*p_end;
- my_MD5_CTX context;
uchar digest[MD5_LEN];
struct manager_user* u;
char c;
@@ -1018,9 +1017,7 @@ static int authenticate(struct manager_thd* thd)
return 1;
for (;my_isspace(cs,*buf) && buf<buf_end;buf++) /* empty */;
- my_MD5Init(&context);
- my_MD5Update(&context,(uchar*) buf,(uint)(buf_end-buf));
- my_MD5Final(digest,&context);
+ MY_MD5_HASH (digest, (uchar*) buf,(uint)(buf_end-buf));
if (memcmp(u->md5_pass,digest,MD5_LEN))
return 1;
client_msg(&thd->net,MANAGER_OK,"OK");