MonetDB: Jul2015 - fixed problem with table privileges

Niels Nes Niels.Nes at cwi.nl
Sun Oct 18 17:18:13 CEST 2015


On Sun, Oct 18, 2015 at 04:08:06PM +0100, Ying Zhang wrote:
> 
> > On Oct 18, 2015, at 14:30, Niels Nes <commits at monetdb.org> 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 at monetdb.org
> > https://www.monetdb.org/mailman/listinfo/checkin-list
> 
> _______________________________________________
> developers-list mailing list
> developers-list at 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 at sip.cwi.nl
url: https://www.cwi.nl/people/niels	e-mail: Niels.Nes at cwi.nl


More information about the developers-list mailing list