Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv24724
Modified Files:
mal_authorize.mx
Log Message:
Fix setPassword to actually work, by decyphering the password before
comparing it to the old password.
This is manual propagation from the Stable branch because GDK-2
introduced some changes here which will result in merge conflicts for
sure.
Index: mal_authorize.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_authorize.mx,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- mal_authorize.mx 6 Nov 2007 23:20:52 -0000 1.54
+++ mal_authorize.mx 4 Dec 2007 14:31:38 -0000 1.55
@@ -549,6 +549,7 @@
str
AUTHchangePassword(str *oldpass, str *passwd) {
BUN p;
+ str err;
str tmp;
str hash;
oid id;
@@ -567,7 +568,9 @@
passi = bat_iterator(pass);
tmp = BUNtail(passi, p);
assert (tmp != NULL);
- if (strcmp(tmp, *oldpass) != 0)
+ /* decypher the password */
+ rethrow("setPassword", err, AUTHdecypherValue(&hash, &tmp));
+ if (strcmp(hash, *oldpass) != 0)
throw(INVCRED, "changePassword", "Access denied");
/* cypher the password */
-------------------------------------------------------------------------
SF.Net email is sponsored by: The Future of Linux Business White Paper
from Novell. From the desktop to the data center, Linux is going
mainstream. Let it simplify your IT future.
http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins