Changeset: 9f79c42fb097 for MonetDB
URL: https://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=9f79c42fb097
Modified Files:
sql/backends/monet5/sql_user.c
Branch: default
Log Message:
allow elevated access for users from the SYS_ADMIN role
diffs (25 lines):
diff --git a/sql/backends/monet5/sql_user.c b/sql/backends/monet5/sql_user.c
--- a/sql/backends/monet5/sql_user.c
+++ b/sql/backends/monet5/sql_user.c
@@ -35,7 +35,10 @@ monet5_drop_user(ptr _mvc, str user)
str err;
Client c = MCgetClient(m->clientid);
+ int grant_user = c->user;
+ c->user = MAL_ADMIN;
err = AUTHremoveUser(c, user);
+ c->user = grant_user;
if (err !=MAL_SUCCEED) {
(void) sql_error(m, 02, "DROP USER: %s",
getExceptionMessage(err));
_DELETE(err);
@@ -76,7 +79,10 @@ monet5_create_user(ptr _mvc, str user, s
pwd = passwd;
}
/* add the user to the M5 authorisation administration */
+ int grant_user = c->user;
+ c->user = MAL_ADMIN;
ret = AUTHaddUser(&uid, c, user, pwd);
+ c->user = grant_user;
if (!enc)
free(pwd);
if (ret != MAL_SUCCEED)
_______________________________________________
checkin-list mailing list
[email protected]
https://www.monetdb.org/mailman/listinfo/checkin-list