diff options
author | Roland McGrath <roland@gnu.org> | 1999-10-07 20:53:32 +0000 |
---|---|---|
committer | Roland McGrath <roland@gnu.org> | 1999-10-07 20:53:32 +0000 |
commit | f597c00ec39178fd27cc016c09d9bc40fd36053a (patch) | |
tree | f91d7a286fe41a103c85ab7b0ee58d5bf59a641c /libfshelp/start-translator.c | |
parent | 438c23ab1c64ea66fdad2400ca852404c4622860 (diff) | |
download | hurd-f597c00ec39178fd27cc016c09d9bc40fd36053a.tar.gz hurd-f597c00ec39178fd27cc016c09d9bc40fd36053a.tar.bz2 hurd-f597c00ec39178fd27cc016c09d9bc40fd36053a.zip |
1999-10-07 Roland McGrath <roland@baalperazim.frob.com>
* start-translator-long.c (fshelp_start_translator_long): Take new
argument OWNER_UID. Get child's proc port and do proc_setowner on it.
* fshelp.h: Update decl.
* start-translator.c (fshelp_start_translator): Pass new arg to
fshelp_start_translator_long with value from geteuid ().
* fetch-root.c (fshelp_fetch_root): Pass UID as new arg to
fshelp_start_translator_long.
Diffstat (limited to 'libfshelp/start-translator.c')
-rw-r--r-- | libfshelp/start-translator.c | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c index f5cc4072..5996ac74 100644 --- a/libfshelp/start-translator.c +++ b/libfshelp/start-translator.c @@ -1,5 +1,5 @@ -/* - Copyright (C) 1995, 1996 Free Software Foundation, Inc. +/* + Copyright (C) 1995, 1996, 1999 Free Software Foundation, Inc. Written by Michael I. Bushnell. This file is part of the GNU Hurd. @@ -33,18 +33,18 @@ fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, int ints[INIT_INT_MAX]; int i; error_t err; - + for (i = 0; i < INIT_PORT_MAX; i++) ports[i] = MACH_PORT_NULL; for (i = 0; i < STDERR_FILENO + 1; i++) fds[i] = MACH_PORT_NULL; bzero (ints, INIT_INT_MAX * sizeof (int)); - + ports[INIT_PORT_CWDIR] = getcwdir (); ports[INIT_PORT_CRDIR] = getcrdir (); ports[INIT_PORT_AUTH] = getauth (); fds[STDERR_FILENO] = getdport (STDERR_FILENO); - + err = fshelp_start_translator_long (underlying_open_fn, name, argz, argz_len, fds, MACH_MSG_TYPE_COPY_SEND, @@ -52,6 +52,7 @@ fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX, ints, INIT_INT_MAX, + geteuid (), timeout, control); for (i = 0; i < INIT_PORT_MAX; i++) mach_port_deallocate (mach_task_self (), ports[i]); |