mirror of
https://github.com/FirebirdSQL/firebird.git
synced 2025-01-23 04:43:03 +01:00
Let trace plugin show ROLE used when service attachment was established.
Format is the same as for database attachment: USER[:ROLE]
This commit is contained in:
parent
f9365d76af
commit
dd241208f2
@ -627,7 +627,7 @@ const char* TraceServiceImpl::getUserName()
|
|||||||
|
|
||||||
const char* TraceServiceImpl::getRoleName()
|
const char* TraceServiceImpl::getRoleName()
|
||||||
{
|
{
|
||||||
return NULL;
|
return m_svc->getRoleName().c_str();
|
||||||
}
|
}
|
||||||
|
|
||||||
const char* TraceServiceImpl::getCharSet()
|
const char* TraceServiceImpl::getCharSet()
|
||||||
|
@ -1927,8 +1927,20 @@ void TracePluginImpl::register_service(ITraceServiceConnection* service)
|
|||||||
remote_address = "internal";
|
remote_address = "internal";
|
||||||
}
|
}
|
||||||
|
|
||||||
if (username.isEmpty())
|
|
||||||
username = "<user is unknown>";
|
if (!username.isEmpty())
|
||||||
|
{
|
||||||
|
const char* role = service->getRoleName();
|
||||||
|
if (role && *role)
|
||||||
|
{
|
||||||
|
username.append(":");
|
||||||
|
username.append(role);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
username = "<unknown_user>";
|
||||||
|
}
|
||||||
|
|
||||||
tmp = service->getRemoteProcessName();
|
tmp = service->getRemoteProcessName();
|
||||||
if (tmp && *tmp) {
|
if (tmp && *tmp) {
|
||||||
|
Loading…
Reference in New Issue
Block a user