diff options
author | Christian Göttsche <cgzones@googlemail.com> | 2022-10-29 19:21:12 +0200 |
---|---|---|
committer | BenBE <BenBE@geshi.org> | 2023-02-05 00:24:13 +0100 |
commit | e3481a9846ef01bb27c169b71eafeee704e10c68 (patch) | |
tree | 47e5003f85875872813677895b7fa298d14af269 /Process.c | |
parent | 8ea144df7494bad0c46d3bf4f16c9a6556c500d2 (diff) |
Linux: highlight username if process has elevated privileges
Highlight processes started from binaries with file capabilities set,
like kwin_wayland, or retaining Linux capabilities, via the ambient set,
after switching from the root user, e.g. rtkit.
Diffstat (limited to 'Process.c')
-rw-r--r-- | Process.c | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -1020,7 +1020,9 @@ void Process_writeField(const Process* this, RichString* str, ProcessField field } break; case USER: - if (Process_getuid != this->st_uid) + if (this->elevated_priv) + attr = CRT_colors[PROCESS_PRIV]; + else if (Process_getuid != this->st_uid) attr = CRT_colors[PROCESS_SHADOW]; if (this->user) { |