From 0a746fb19a663f41794f4c6ed6e63d4c5ce714b4 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Sat, 16 Jun 2001 20:23:29 +0000 Subject: 2001-04-01 Neal H Walfield * dir-lookup.c (netfs_S_dir_lookup): Use iohelp_create_empty_iouser. Use iohelp_dup_iouser as per the new semantics. * dir-mkfile.c (netfs_S_dir_mkfile): Use iohelp_dup_iouser as per the new semantics. * file-exec.c (netfs_S_file_exec): Likewise. * file-reparent.c (netfs_S_file_reparent): Likewise. * fsys-getroot.c (netfs_S_fsys_getroot): Use iohelp_create_complex_iouser. * fsys-syncfs.c (netfs_S_fsys_syncfs): Use iohelp_create_simple_iouser. * io-duplicate.c (netfs_S_io_duplicate): Use iohelp_dup_iouser as per the new semantics. * io-reauthenticate.c (netfs_S_io_reauthenticate): Use iohelp_reauth as per the new semantics. * io-restric-auth.c (netfs_S_io_restric_auth): Use iohelp_create_complex_iouser. Check return values. * trans-callback.c (_netfs_transcallback2_fn): Use iohelp_create_simple_iouser. --- libnetfs/file-exec.c | 34 ++++++++++++++++++++-------------- 1 file changed, 20 insertions(+), 14 deletions(-) (limited to 'libnetfs/file-exec.c') diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c index c5cd676c..4f9e5034 100644 --- a/libnetfs/file-exec.c +++ b/libnetfs/file-exec.c @@ -1,5 +1,5 @@ /* - Copyright (C) 1996, 1997, 2000 Free Software Foundation, Inc. + Copyright (C) 1996,97,2000,01 Free Software Foundation, Inc. Written by Michael I. Bushnell, p/BSG. This file is part of the GNU Hurd. @@ -122,19 +122,25 @@ netfs_S_file_exec (struct protid *cred, if (! err) { - struct protid *newpi = - netfs_make_protid (netfs_make_peropen (np, O_READ, cred->po), - iohelp_dup_iouser (cred->user)); - right = ports_get_send_right (newpi); - err = exec_exec (_netfs_exec, - 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 (), right); - ports_port_deref (newpi); + struct iouser *user; + struct protid *newpi; + + err = iohelp_dup_iouser (&user, cred->user); + if (! err) + { + newpi = netfs_make_protid (netfs_make_peropen (np, O_READ, cred->po), + user); + right = ports_get_send_right (newpi); + err = exec_exec (_netfs_exec, + 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 (), right); + ports_port_deref (newpi); + } } if (! err) -- cgit v1.2.3