Our company uses more applications that are working with Firebird databases. In some installations we are using database services installed on more machines. Now I am trying to centralize user management for all of them. For this purpose I am writing new application. What I need is to connect to selected Firebird service in localhost or in network and enumerate all users. Traditionally "gsec" utility is used for this purpose. "gsec" is part of Firebird installation. I could use command line output of this utility like this:
user name uid gid admin full name
------------------------------------------------------------------------------------------------
SYSDBA 0 0 Sql Server Administrator
TECHNICIAN 0 0 Technician Technician
TECHNIK 0 0 Technik Technik
but it seems cumbersome to me. Also the format of text output can change in next release of Firebird. So I would prefer to use directly Firebird api located in fbclient.dll library. Also "gsec" utility uses internally fbclient.dll as can be seen in ProcessExplorer utility from SysInternals. Unfortunately there is not any kind of documentation for this. All that I know is that I should include ibase.h header file to my project. This header file is very poorly documented. I have also downloaded source code of "gsec" utility but it is very chaotic. The project cant be compiled in Visual Studio 2008 because of missing import library for fbclient.dll. I have tried to generate import library using these instructions but failed.
So the question is: how to enumerate users defined in firebird database machine using client library fbclient.dll?