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. --- libfshelp/exec-reauth.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'libfshelp/exec-reauth.c') 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) -- cgit v1.2.3