Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression: GRANT UPDATE(<some_column>) on <T> acts like grant update on ALL columns of <T> [CORE4802] #5100

Closed
firebird-automations opened this issue May 18, 2015 · 4 comments

Comments

@firebird-automations
Copy link
Collaborator

Submitted by: @pavel-zotov

New database, on WI-T3.0.0.31840:

C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb30\isql localhost/3333:e30
Database: localhost/3333:e30
SQL> create table test(id int, s varchar(10)); commit;
SQL> create or alter user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3333:e30' user 'c1234' password '123';
Database: 'localhost/3333:e30', User: c1234
SQL> show grants;

/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234 --------------- <<< ::: NB ::: user can modify only ONE column, `ID`.
SQL> select * from test;

      ID S

============ ==========
1 qwerty

SQL> update test set s='asdfgh';
SQL> commit;
SQL> select * from test;

      ID S

============ ==========
1 asdfgh

Similar actions on WI-V2.5.5.26871:

C:\MIX\firebird\QA\fbt-repo\tmp>C:\MIX\firebird\fb25\bin\isql localhost/3254:e25
Database: localhost/3254:e25
SQL> create table test(id int, s varchar(10)); commit;
SQL> drop user c1234; commit;
SQL> create user c1234 password '123'; commit;
SQL> revoke all on all from c1234;
Warning: ALL on ALL is not granted to C1234.
SQL> commit;
SQL> grant select on test to c1234; commit;
SQL> grant update (id) on test to c1234; commit;
SQL> insert into test values(1, 'qwerty'); commit;
SQL> connect 'localhost/3254:e25' user 'c1234' password '123';
Database: 'localhost/3254:e25', User: c1234
SQL> show grants;

/* Grant permissions for this database */
GRANT SELECT, UPDATE (ID) ON TEST TO USER C1234
SQL> select * from test;

      ID S

============ ==========
1 qwerty

SQL> update test set s='asdfgh';
Statement failed, SQLSTATE = 28000
no permission for update/write access to COLUMN TEST.S

Commits: 58bba21 FirebirdSQL/fbt-repository@b36b53c

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

assignee: Alexander Peshkov [ alexpeshkoff ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @AlexPeshkoff

status: Open [ 1 ] => Resolved [ 5 ]

resolution: Fixed [ 1 ]

Fix Version: 3.0 Beta 2 [ 10586 ]

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Resolved [ 5 ]

QA Status: Done successfully

@firebird-automations
Copy link
Collaborator Author

Modified by: @pavel-zotov

status: Resolved [ 5 ] => Closed [ 6 ]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants