Re: MonetDB: Jul2015 - fixed problem with table privileges
On Oct 18, 2015, at 14:30, Niels Nes
wrote: Changeset: d1da7aeae75e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d1da7aeae75e Modified Files: sql/server/sql_privileges.c Branch: Jul2015 Log Message:
fixed problem with table privileges
What’s the problem? The diff is easy to read, but what’s the symptom of the problem at, say, SQL level? Thanks! Jennie
diffs (12 lines):
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 @@ -467,7 +467,7 @@ sql_grantable_(mvc *m, int grantorid, in int priv;
(void) sub; - for (priv = 1; priv < privs; priv <<= 1) { + for (priv = 1; priv <= privs; priv <<= 1) { if (!(priv & privs)) continue; rid = table_funcs.column_find_row(m->session->tr, priv_obj, &obj_id, priv_auth, &grantorid, priv_priv, &priv, NULL); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
On Sun, Oct 18, 2015 at 04:08:06PM +0100, Ying Zhang wrote:
On Oct 18, 2015, at 14:30, Niels Nes
wrote: Changeset: d1da7aeae75e for MonetDB URL: http://dev.monetdb.org/hg/MonetDB?cmd=changeset;node=d1da7aeae75e Modified Files: sql/server/sql_privileges.c Branch: Jul2015 Log Message:
fixed problem with table privileges
What’s the problem? The diff is easy to read, but what’s the symptom of the problem at, say, SQL level? Thanks!
Before we couldn't properly set (give rights) to a user. It skiped the first privilege (PRIV_SELECT). Niels
Jennie
diffs (12 lines):
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 @@ -467,7 +467,7 @@ sql_grantable_(mvc *m, int grantorid, in int priv;
(void) sub; - for (priv = 1; priv < privs; priv <<= 1) { + for (priv = 1; priv <= privs; priv <<= 1) { if (!(priv & privs)) continue; rid = table_funcs.column_find_row(m->session->tr, priv_obj, &obj_id, priv_auth, &grantorid, priv_priv, &priv, NULL); _______________________________________________ checkin-list mailing list checkin-list@monetdb.org https://www.monetdb.org/mailman/listinfo/checkin-list
_______________________________________________ developers-list mailing list developers-list@monetdb.org https://www.monetdb.org/mailman/listinfo/developers-list
-- Niels Nes, Manager ITF, Centrum Wiskunde & Informatica (CWI) Science Park 123, 1098 XG Amsterdam, The Netherlands room L3.14, phone ++31 20 592-4098 sip:4098@sip.cwi.nl url: https://www.cwi.nl/people/niels e-mail: Niels.Nes@cwi.nl
participants (2)
-
Niels Nes
-
Ying Zhang