aboutsummaryrefslogtreecommitdiff
path: root/libfshelp/exec-reauth.c
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2021-05-29 18:08:52 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2022-08-10 22:15:31 +0200
commit2e3a1e0f028ae5498d96a4a3618a3533e062d2eb (patch)
tree9db11a0c0e5743069106e83bd2a9d3639dd40e38 /libfshelp/exec-reauth.c
parentffead1cbcaa1db5db525403043e27d618af8752b (diff)
downloadhurd-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 'libfshelp/exec-reauth.c')
-rw-r--r--libfshelp/exec-reauth.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c
index 9b6087c7..7b87d576 100644
--- a/libfshelp/exec-reauth.c
+++ b/libfshelp/exec-reauth.c
@@ -131,9 +131,12 @@ fshelp_exec_reauth (int suid, uid_t uid, int sgid, gid_t gid,
/* Re-authenticate the exec parameters. */
exec_reauth (newauth, _secure, 0, ports, num_ports, fds, num_fds);
- proc_setowner (ports[INIT_PORT_PROC],
- eff_uids->num > 0 ? eff_uids->ids[0] : 0,
- !eff_uids->num);
+ /* Try proc_setowner () for compatibility with older proc server. */
+ err = proc_setowner (ports[INIT_PORT_PROC],
+ eff_uids->num > 0 ? eff_uids->ids[0] : 0,
+ !eff_uids->num);
+ if (err == EOPNOTSUPP)
+ err = 0;
abandon_suid:
if (eff_uids)