Changeset: 80c3dd9e4ac6 for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=80c3dd9e4ac6 Modified Files: sql/backends/monet5/sql_upgrades.c sql/server/sql_privileges.c Branch: Jun2016 Log Message:
grant public execute rights on function env() diffs (41 lines): diff --git a/sql/backends/monet5/sql_upgrades.c b/sql/backends/monet5/sql_upgrades.c --- a/sql/backends/monet5/sql_upgrades.c +++ b/sql/backends/monet5/sql_upgrades.c @@ -1553,6 +1553,14 @@ SQLupgrades(Client c, mvc *m) } } + f = sql_find_func(m->sa, s, "env", NULL, F_UNION); + if (f && sql_privilege(m, ROLE_PUBLIC, f->func->base.id, PRIV_EXECUTE, 0) != PRIV_EXECUTE) { + sql_table *privs = find_sql_table(s, "privileges"); + int pub = ROLE_PUBLIC, p = PRIV_EXECUTE, zero = 0; + + table_insert(m->session->tr, privs, &f->func->base.id, &pub, &p, &zero, &zero); + } + /* If the point type exists, but the geometry type does not * exist any more at the "sys" schema (i.e., the first part of * the upgrade has been completed succesfully), then move on 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 @@ -810,6 +810,7 @@ sql_create_privileges(mvc *m, sql_schema { int pub, p, zero = 0; sql_table *t, *privs; + sql_subfunc *f; backend_create_privileges(m, s); @@ -876,6 +877,11 @@ sql_create_privileges(mvc *m, sql_schema t = find_sql_table(s, "privileges"); table_funcs.table_insert(m->session->tr, privs, &t->base.id, &pub, &p, &zero, &zero); + p = PRIV_EXECUTE; + f = sql_bind_func_(m->sa, s, "env", NULL, F_UNION); + + table_funcs.table_insert(m->session->tr, privs, &f->func->base.id, &pub, &p, &zero, &zero); + /* owned by the users anyway s = mvc_bind_schema(m, "tmp"); t = find_sql_table(s, "profile"); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list