summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/core/window-props.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/core/window-props.c b/src/core/window-props.c
index 9aab46ea..8eff8d8a 100644
--- a/src/core/window-props.c
+++ b/src/core/window-props.c
@@ -399,8 +399,15 @@ owner_of_process (pid_t process, uid_t *result)
glibtop_get_proc_uid (&process_details, process);
- *result = process_details.uid;
- return TRUE;
+ if (process_details.flags & (1L << GLIBTOP_PROC_UID_UID))
+ {
+ *result = process_details.uid;
+ return TRUE;
+ }
+ else
+ {
+ return FALSE;
+ }
#else
/* I don't know, maybe we could do something hairy like see whether
* /proc/$PID exists and who owns it, in case they have procfs.