Merge pull request #5832 from soloestoy/show-client-user

ACL: show client's user
This commit is contained in:
Salvatore Sanfilippo 2019-02-12 09:42:14 +01:00 committed by GitHub
commit efeebb616f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1781,7 +1781,7 @@ sds catClientInfoString(sds s, client *client) {
if (emask & AE_WRITABLE) *p++ = 'w'; if (emask & AE_WRITABLE) *p++ = 'w';
*p = '\0'; *p = '\0';
return sdscatfmt(s, return sdscatfmt(s,
"id=%U addr=%s fd=%i name=%s age=%I idle=%I flags=%s db=%i sub=%i psub=%i multi=%i qbuf=%U qbuf-free=%U obl=%U oll=%U omem=%U events=%s cmd=%s", "id=%U addr=%s fd=%i name=%s age=%I idle=%I flags=%s db=%i sub=%i psub=%i multi=%i qbuf=%U qbuf-free=%U obl=%U oll=%U omem=%U events=%s cmd=%s user=%s",
(unsigned long long) client->id, (unsigned long long) client->id,
getClientPeerId(client), getClientPeerId(client),
client->fd, client->fd,
@ -1799,7 +1799,8 @@ sds catClientInfoString(sds s, client *client) {
(unsigned long long) listLength(client->reply), (unsigned long long) listLength(client->reply),
(unsigned long long) getClientOutputBufferMemoryUsage(client), (unsigned long long) getClientOutputBufferMemoryUsage(client),
events, events,
client->lastcmd ? client->lastcmd->name : "NULL"); client->lastcmd ? client->lastcmd->name : "NULL",
client->user ? client->user->name : "");
} }
sds getAllClientsInfoString(int type) { sds getAllClientsInfoString(int type) {