Changeset: 0f9f5c7b727c for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=0f9f5c7b727c Modified Files: sql/ChangeLog.Apr2011 sql/server/sql_privileges.c Branch: Apr2011 Log Message:
sql_alter_user: recognise str_nil as NULL After ALTER USER statements have been made to go through a MAL program, the user argument no longer would be NULL, but nil:str. As such, the current user (== NULL) was no longer found, making it impossible to change the password for the administrator (== monetdb) password. Accept str_nil as alternative for NULL, fixes bug #2844. diffs (27 lines): diff --git a/sql/ChangeLog.Apr2011 b/sql/ChangeLog.Apr2011 --- a/sql/ChangeLog.Apr2011 +++ b/sql/ChangeLog.Apr2011 @@ -1,6 +1,10 @@ # ChangeLog file for sql # This file is updated with Maddlog +* Tue Jul 19 2011 Fabian Groffen <[email protected]> +- Fixed regression where the superuser password could no longer be + changed, bug #2844 + * Wed Jun 29 2011 Sjoerd Mullender <[email protected]> - Fixed incorrect insert counts. - Fixed bug 2823: MAL exeption on SQL query with subquery in the where diff --git a/sql/server/sql_privileges.c b/sql/server/sql_privileges.c --- a/sql/server/sql_privileges.c +++ b/sql/server/sql_privileges.c @@ -516,6 +516,9 @@ char *schema, char *oldpasswd) { sqlid schema_id = 0; + /* we may be called from MAL (nil) */ + if (user != NULL && strcmp(user, str_nil) == 0) + user = NULL; /* USER == NULL -> current_user */ if (user != NULL && backend_find_user(sql, user) < 0) return sql_message("ALTER USER: no such user '%s'", user); _______________________________________________ Checkin-list mailing list [email protected] http://mail.monetdb.org/mailman/listinfo/checkin-list
