mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-22 20:43:02 +01:00
Fixed CORE-5162: SEC$ tables and tag/attributes
This commit is contained in:
parent
92bdd643df
commit
de12c06f38
@ -9,13 +9,14 @@ Author:
|
||||
|
||||
Syntax is:
|
||||
|
||||
CREATE USER name {PASSWORD 'password'} [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
ALTER CURRENT USER SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
CREATE OR ALTER USER name SET [PASSWORD 'password'] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
CREATE USER name [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
ALTER USER name [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
ALTER CURRENT USER [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
CREATE OR ALTER USER name [ SET ] [ options ] [ TAGS ( tag [, tag [, tag ...]] ) ]
|
||||
DROP USER name [ USING PLUGIN name ];
|
||||
|
||||
where OPTIONS is a (probably empty) list of following options:
|
||||
- PASSWORD 'password'
|
||||
- FIRSTNAME 'firstname'
|
||||
- MIDDLENAME 'middlename'
|
||||
- LASTNAME 'lastname'
|
||||
@ -93,9 +94,10 @@ Samples (suppose UserManager=Srp,Legacy_UserManager in firebird.conf):
|
||||
SELECT CAST(U.SEC$USER_NAME AS CHAR(20)) LOGIN,
|
||||
CAST(A.SEC$KEY AS CHAR(10)) TAG,
|
||||
CAST(A.SEC$VALUE AS CHAR(20)) "VALUE",
|
||||
SEC$PLUGIN "PLUGIN"
|
||||
U.SEC$PLUGIN "PLUGIN"
|
||||
FROM SEC$USERS U LEFT JOIN SEC$USER_ATTRIBUTES A
|
||||
ON U.SEC$USER_NAME = A.SEC$USER_NAME;
|
||||
ON U.SEC$USER_NAME = A.SEC$USER_NAME
|
||||
AND U.SEC$PLUGIN = A.SEC$PLUGIN;
|
||||
|
||||
LOGIN TAG VALUE PLUGIN
|
||||
==================== ========== ==================== ===============================
|
||||
|
@ -634,6 +634,7 @@
|
||||
const USHORT f_sec_attr_user = 0;
|
||||
const USHORT f_sec_attr_key = 1;
|
||||
const USHORT f_sec_attr_value = 2;
|
||||
const USHORT f_sec_attr_plugin = 3;
|
||||
|
||||
|
||||
// Relation 45 (RDB$AUTH_MAPPING)
|
||||
|
@ -542,6 +542,9 @@ void UserManagement::list(IUser* u, unsigned cachePosition)
|
||||
putField(threadDbb, record,
|
||||
DumpField(f_sec_attr_value, VALUE_STRING, b->value.length(), b->value.c_str()));
|
||||
|
||||
putField(threadDbb, record,
|
||||
DumpField(f_sec_attr_plugin, VALUE_STRING, static_cast<USHORT>(plugName.length()), plugName.c_str()));
|
||||
|
||||
buffer->store(record);
|
||||
}
|
||||
}
|
||||
|
@ -633,6 +633,7 @@ RELATION(nam_sec_user_attributes, rel_sec_user_attributes, ODS_12_0, rel_virtual
|
||||
FIELD(f_sec_attr_user, nam_user_name, fld_user, 0, ODS_12_0)
|
||||
FIELD(f_sec_attr_key, nam_sec_attr_key, fld_attr_key, 0, ODS_12_0)
|
||||
FIELD(f_sec_attr_value, nam_sec_attr_value, fld_attr_value, 0, ODS_12_0)
|
||||
FIELD(f_sec_attr_plugin, nam_sec_plugin, fld_plugin_name, 0, ODS_12_0)
|
||||
END_RELATION
|
||||
|
||||
// Relation 45 (RDB$AUTH_MAPPING)
|
||||
|
Loading…
Reference in New Issue
Block a user