Changeset: 68a714d21b0e for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=68a714d21b0e
Modified Files:
        monetdb5/mal/mal_authorize.c
Branch: oscar
Log Message:

Logic error.


diffs (20 lines):

diff --git a/monetdb5/mal/mal_authorize.c b/monetdb5/mal/mal_authorize.c
--- a/monetdb5/mal/mal_authorize.c
+++ b/monetdb5/mal/mal_authorize.c
@@ -390,10 +390,12 @@ AUTHinitTables(const char *passwd) {
                if (passwd == NULL)
                        passwd = "monetdb";     /* default password */
                pw = mcrypt_BackendSum(passwd, strlen(passwd));
-               if(!pw && !GDKembedded())
-                       throw(MAL, "initTables", SQLSTATE(42000) "Crypt backend 
hash not found");
-               else
-                       pw = strdup(passwd);
+               if(!pw) {
+                       if (!GDKembedded())
+                               throw(MAL, "initTables", SQLSTATE(42000) "Crypt 
backend hash not found");
+                       else
+                               pw = strdup(passwd);
+               }
                msg = AUTHaddUser(&uid, NULL, "monetdb", pw);
                free(pw);
                if (msg)
_______________________________________________
checkin-list mailing list
checkin-list@monetdb.org
https://www.monetdb.org/mailman/listinfo/checkin-list

Reply via email to