diff options
-rw-r--r-- | libnetfs/ChangeLog | 6 | ||||
-rw-r--r-- | libnetfs/file-exec.c | 8 | ||||
-rw-r--r-- | libnetfs/init-startup.c | 10 |
3 files changed, 17 insertions, 7 deletions
diff --git a/libnetfs/ChangeLog b/libnetfs/ChangeLog index 474a4682..ec5b01d3 100644 --- a/libnetfs/ChangeLog +++ b/libnetfs/ChangeLog @@ -1,3 +1,9 @@ +2000-03-17 Thomas Bushnell, BSG <tb@mit.edu> + + * file-exec.c (netfs_S_file_exec): Don't use MAKE_SEND in Hurd + RPC. + * init-startup.c (netfs_startup): Likewise. + 2000-03-17 Roland McGrath <roland@baalperazim.frob.com> * io-reauthenticate.c (netfs_S_io_reauthenticate): Use diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c index f928292f..d9ba3d04 100644 --- a/libnetfs/file-exec.c +++ b/libnetfs/file-exec.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -55,6 +55,7 @@ netfs_S_file_exec (struct protid *cred, gid_t gid; mode_t mode; int suid, sgid; + mach_port_t right; if (!cred) return EOPNOTSUPP; @@ -124,14 +125,15 @@ netfs_S_file_exec (struct protid *cred, struct protid *newpi = netfs_make_protid (netfs_make_peropen (np, O_READ, cred->po), iohelp_dup_iouser (cred->user)); + right = port_get_send_right (newpi); err = exec_exec (_netfs_exec, - ports_get_right (newpi), - MACH_MSG_TYPE_MAKE_SEND, + right, MACH_MSG_TYPE_COPY_SEND, task, flags, argv, argvlen, envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen, portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen, intarray, intarraylen, deallocnames, deallocnameslen, destroynames, destroynameslen); + mach_port_deallocate (mach_task_self (), newpi); ports_port_deref (newpi); } diff --git a/libnetfs/init-startup.c b/libnetfs/init-startup.c index c457441b..69017285 100644 --- a/libnetfs/init-startup.c +++ b/libnetfs/init-startup.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1996, 1997 Free Software Foundation, Inc. + Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -26,7 +26,7 @@ mach_port_t netfs_startup (mach_port_t bootstrap, int flags) { - mach_port_t realnode; + mach_port_t realnode, right; struct port_info *newpi; if (bootstrap == MACH_PORT_NULL) @@ -36,8 +36,10 @@ netfs_startup (mach_port_t bootstrap, int flags) sizeof (struct port_info), &newpi); if (!errno) { - errno = fsys_startup (bootstrap, flags, ports_get_right (newpi), - MACH_MSG_TYPE_MAKE_SEND, &realnode); + right = ports_get_send_right (newpi); + errno = fsys_startup (bootstrap, flags, right, MACH_MSG_TYPE_COPY_SEND, + &realnode); + mach_port_deallocate (mach_task_self (), right); ports_port_deref (newpi); } if (errno) |