I am just wondering if the requested feature is not already present.
A quick test with isc_database_info, with SYSDBA and a normal user
logged in shows:
- SYSDBA connection: only SYSDBA appears to be returned.
- User connection: only user name is returned.
From the security viewpoint, only a System Administrator should be able
to see a complete list of user names - which is true when using the
MON$ATTACHMENTS pseudo table. It looks like isc_database_info could be
broken in that it appears not to allow a SYSDBA to see this list.
However, I would argue that MON$ATTACHMENTS should always be preferred
hence this is not an issue.
Otherwise, this whole thread seems to be an argument about whether it is
easier to use isc_database_info (with the consequential difficulty of
unpacking the information returned) or using the normal database API.
If you don't like using low level APIs, then maybe a high level one like
IBPP (C++), the PHP interbase API or IBX should be used as their whole
point is to make common operations easy for the programmer and each, in
their own way, makes "Select Current_User from RDB$DATABASE" a very
simple operation to perform.
On 27/02/2019 09:30, Kovalenko Dmitry wrote:
Hello,
Could anybody tell me – how I can get name of current user through
isc_database_info API function?
I see isc_info_user_names.
But I want to get the only one name.
Thanks,
Dmitry Kovalenko.
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel
Firebird-Devel mailing list, web interface at
https://lists.sourceforge.net/lists/listinfo/firebird-devel