Get "Different logins in connect and attach packets - client library error" when DENY to create database using valid pair login+password of user who was granted this privilege --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Key: CORE-4820 URL: http://tracker.firebirdsql.org/browse/CORE-4820 Project: Firebird Core Issue Type: Bug Components: Engine, Security Affects Versions: 3.0 Beta 2 Reporter: Pavel Zotov Attachments: trace-when-choose-NOT-to-create-database-as-user-john.zip On WI-T3.0.0.31845 ================ C:\TEMP>isql localhost/3333:e30 -user sysdba -pas masterke Database: localhost/3333:e30, User: sysdba SQL> drop user john; commit; SQL> revoke all on all from john; SQL> commit; SQL> C:\TEMP>isql localhost/3333:e30 -user sysdba -pas masterke Database: localhost/3333:e30, User: sysdba SQL> create or alter user john password '123'; SQL> revoke all on all from john; Warning: ALL on ALL is not granted to JOHN. SQL> grant create database to john; SQL> create database 'localhost/3333:c:\temp\e30n.fdb' user 'john' password '123'; Commit current transaction (y/n)?n Rolling back work. Statement failed, SQLSTATE = 28000 Your user name and password are not defined. Ask your database administrator to set up a Firebird login. -Different logins in connect and attach packets - client library error SQL> On LI-T3.0.0.31842 =============== $ /opt/fb30ss/bin/isql localhost/3333:e30 Database: localhost/3333:e30 SQL> drop user john; commit; Statement failed, SQLSTATE = HY000 record not found for user: JOHN SQL> revoke all on all from john; Warning: ALL on ALL is not granted to JOHN. SQL> commit; SQL> exit; $ /opt/fb30ss/bin/isql localhost/3333:e30 -user sysdba -pas masterke Database: localhost/3333:e30, User: sysdba SQL> create or alter user john password '123'; SQL> revoke all on all from john; Warning: ALL on ALL is not granted to JOHN. SQL> grant create database to john; SQL> create database 'localhost/3333:/var/db/fb30/e30n.fdb' user 'john' password '123'; Commit current transaction (y/n)?n Rolling back work. Statement failed, SQLSTATE = 28000 Your user name and password are not defined. Ask your database administrator to set up a Firebird login. -Different logins in connect and attach packets - client library error SQL> Trace shows that after pressing 'n' (as answer to rollback Tx) user `john` actually DOES some actions - see attach: === 2015-05-30T15:10:29.6710 (4092:01FD3B60) FAILED CREATE_DATABASE localhost/3333:c:\temp\e30n.fdb (ATT_0, JOHN, NONE, <internal>) 2015-05-30T15:10:29.6710 (4092:01FD3B60) ERROR AT JProvider::createDatabase localhost/3333:c:\temp\e30n.fdb (ATT_0, JOHN, NONE, <internal>) 335544375 : unavailable database 2015-05-30T15:10:29.6710 (4092:01FD3B60) TRACE_FINI SESSION_2 === PS. Why I get "Your user name and password are not defined" if I decided only NOT to *start* 'CREATE DATABASE' statement and wanted to return to SYSDBA session ? -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://tracker.firebirdsql.org/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira ------------------------------------------------------------------------------ Firebird-Devel mailing list, web interface at https://lists.sourceforge.net/lists/listinfo/firebird-devel