diff options
author | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 16:47:59 +0100 |
---|---|---|
committer | Nicholas Marriott <nicholas.marriott@gmail.com> | 2022-04-06 16:47:59 +0100 |
commit | 8bcd392ee79996f828fd40c52198071ec0f273dd (patch) | |
tree | 5bef646118a218f281e7ff9764c301f117da6f50 /cmd-queue.c | |
parent | 3a6d82b7c8d4254fa87959d8cf19b313f5e05480 (diff) | |
download | rtmux-8bcd392ee79996f828fd40c52198071ec0f273dd.tar.gz rtmux-8bcd392ee79996f828fd40c52198071ec0f273dd.tar.bz2 rtmux-8bcd392ee79996f828fd40c52198071ec0f273dd.zip |
On platforms with no way to get peer UID, use getuid(), also fix some failure
checks.
Diffstat (limited to 'cmd-queue.c')
-rw-r--r-- | cmd-queue.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd-queue.c b/cmd-queue.c index 633af06b..6c7c3675 100644 --- a/cmd-queue.c +++ b/cmd-queue.c @@ -569,7 +569,7 @@ cmdq_add_message(struct cmdq_item *item) tmp = cmd_print(item->cmd); if (c != NULL) { uid = proc_get_peer_uid(c->peer); - if (uid != getuid()) { + if (uid != (uid_t)-1 && uid != getuid()) { if ((pw = getpwuid(uid)) != NULL) xasprintf(&user, "[%s]", pw->pw_name); else |