aboutsummaryrefslogtreecommitdiff
path: root/libfshelp/start-translator-long.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/start-translator-long.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/start-translator-long.c')
-rw-r--r--libfshelp/start-translator-long.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c
index af893ba2..1bbf310a 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -267,9 +267,15 @@ fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
proc_child (proc, task);
err = proc_task2proc (proc, task, &ports[INIT_PORT_PROC]);
if (!err)
- err = proc_setowner (ports[INIT_PORT_PROC],
- owner_uid,
- owner_uid == (uid_t) -1);
+ {
+ /* Try proc_setowner () for compatibility with
+ older proc server. */
+ err = proc_setowner (ports[INIT_PORT_PROC],
+ owner_uid,
+ owner_uid == (uid_t) -1);
+ if (err == EOPNOTSUPP)
+ err = 0;
+ }
if (deallocate_proc)
mach_port_deallocate (mach_task_self (), proc);
if (err)