diff options
author | Roland McGrath <roland@gnu.org> | 1995-01-17 23:13:07 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1995-01-17 23:13:07 +0000 |
commit | 9f0d8221034bf8735919e7bd2c2e72e4db2947e2 (patch) | |
tree | 56191d69e1c690587ce28c58d02baa0dafe47df8 /proc | |
parent | fc141a5a811fd191dfa25409256ac3910ad1b340 (diff) |
(check_uid): Return true if P has root.
Diffstat (limited to 'proc')
-rw-r--r-- | proc/mgt.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -1,5 +1,5 @@ /* Process management - Copyright (C) 1992, 1993, 1994 Free Software Foundation + Copyright (C) 1992, 1993, 1994, 1995 Free Software Foundation, Inc. This file is part of the GNU Hurd. @@ -67,13 +67,13 @@ free_ids (struct ids *i) free (i); } -/* Tell if process P has uid UID. */ +/* Tell if process P has uid UID, or has root. */ int check_uid (struct proc *p, uid_t uid) { int i; for (i = 0; i < p->p_id->i_nuids; i++) - if (p->p_id->i_uids[i] == uid) + if (p->p_id->i_uids[i] == uid || p->p_id\->i_uids[i] == 0) return 1; return 0; } |