diff options
author | Sergey Bugaev <bugaevc@gmail.com> | 2021-05-29 18:08:52 +0300 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2022-08-10 22:15:31 +0200 |
commit | 2e3a1e0f028ae5498d96a4a3618a3533e062d2eb (patch) | |
tree | 9db11a0c0e5743069106e83bd2a9d3639dd40e38 /proc/mgt.c | |
parent | ffead1cbcaa1db5db525403043e27d618af8752b (diff) | |
download | hurd-2e3a1e0f028ae5498d96a4a3618a3533e062d2eb.tar.gz hurd-2e3a1e0f028ae5498d96a4a3618a3533e062d2eb.tar.bz2 hurd-2e3a1e0f028ae5498d96a4a3618a3533e062d2eb.zip |
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.
Diffstat (limited to 'proc/mgt.c')
-rw-r--r-- | proc/mgt.c | 27 |
1 files changed, 4 insertions, 23 deletions
@@ -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 <hurd/process.defs>. */ 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 <hurd/process.defs>. */ @@ -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, |