From 2e3a1e0f028ae5498d96a4a3618a3533e062d2eb Mon Sep 17 00:00:00 2001 From: Sergey Bugaev Date: Sat, 29 May 2021 18:08:52 +0300 Subject: Remove the concept of process owner Now that it's completely unused. procinfo.owner is now simply set to the first UID that a process has. proc_setowner () is kept for compatibility, but now does nothing. The clients still try to call it, though, for compatibility with older proc server versions. --- proc/mgt.c | 27 ++++----------------------- 1 file changed, 4 insertions(+), 23 deletions(-) (limited to 'proc/mgt.c') diff --git a/proc/mgt.c b/proc/mgt.c index 68c19ea1..036ddb28 100644 --- a/proc/mgt.c +++ b/proc/mgt.c @@ -186,9 +186,6 @@ S_proc_child (struct proc *parentp, childp->p_login = parentp->p_login; childp->p_login->l_refcnt++; - childp->p_owner = parentp->p_owner; - childp->p_noowner = parentp->p_noowner; - ids_rele (childp->p_id); ids_ref (parentp->p_id); childp->p_id = parentp->p_id; @@ -432,27 +429,13 @@ S_proc_reauthenticate_reassign (struct proc *p, return err; } -/* Implement proc_setowner as described in . */ kern_return_t S_proc_setowner (struct proc *p, - uid_t owner, - int clear) + uid_t owner, + int clear) { - if (!p) - return EOPNOTSUPP; - - if (clear) - p->p_noowner = 1; - else - { - if (! check_uid (p, owner)) - return EPERM; - - p->p_owner = owner; - p->p_noowner = 0; - } - - return 0; + /* No longer does anything, kept for compatibility. */ + return EOPNOTSUPP; } /* Implement proc_getpids as described in . */ @@ -859,8 +842,6 @@ complete_proc (struct proc *p, pid_t pid) p->p_ochild = 0; p->p_parentset = 0; - p->p_noowner = 1; - p->p_pgrp = init_proc->p_pgrp; /* At this point, we do not know the task of the startup process, -- cgit v1.2.3