summaryrefslogtreecommitdiff
path: root/libnetfs/file-exec.c
diff options
context:
space:
mode:
authorThomas Bushnell <thomas@gnu.org>2000-03-17 17:21:45 +0000
committerThomas Bushnell <thomas@gnu.org>2000-03-17 17:21:45 +0000
commita1bd308813e6890f5877b10a1a0984d822c84b7e (patch)
tree73a1832119480a7cf7ac441fd38cdeaac0d50be3 /libnetfs/file-exec.c
parent13caaeb34153080209b31355ac650c0d8a641aff (diff)
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.
Diffstat (limited to 'libnetfs/file-exec.c')
-rw-r--r--libnetfs/file-exec.c8
1 files changed, 5 insertions, 3 deletions
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);
}