summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-01-27 16:36:53 +0000
committerMiles Bader <miles@gnu.org>1996-01-27 16:36:53 +0000
commitedb4a0120b20d269084ae80ac60d5d7bc6522482 (patch)
tree428c99f6cbbb764308715ef6b9f855b1dd04e7f1
parent7a4eaafbf18f97848bae86223d24dd3a96724046 (diff)
(diskfs_S_file_exec): Use diskfs_create_protid instead of
diskfs_make_protid, and deal with an error return.
-rw-r--r--libdiskfs/file-exec.c32
1 files changed, 18 insertions, 14 deletions
diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c
index 4521585f..7cde0e37 100644
--- a/libdiskfs/file-exec.c
+++ b/libdiskfs/file-exec.c
@@ -1,5 +1,5 @@
/*
- Copyright (C) 1993, 1994, 1995 Free Software Foundation
+ Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation
This file is part of the GNU Hurd.
@@ -113,23 +113,27 @@ diskfs_S_file_exec (struct protid *cred,
flags |= EXEC_NEWTASK;
#endif
- newpi = diskfs_make_protid (diskfs_make_peropen (np, O_READ,
+ err = diskfs_create_protid (diskfs_make_peropen (np, O_READ,
cred->po->dotdotport),
cred->uids, cred->nuids,
- cred->gids, cred->ngids);
+ cred->gids, cred->ngids,
+ &newpi);
mutex_unlock (&np->lock);
- err = exec_exec (diskfs_exec,
- ports_get_right (newpi),
- MACH_MSG_TYPE_MAKE_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);
-
- ports_port_deref (newpi);
- if (!err)
+ if (! err)
+ {
+ err = exec_exec (diskfs_exec,
+ ports_get_right (newpi),
+ MACH_MSG_TYPE_MAKE_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);
+ ports_port_deref (newpi);
+ }
+
+ if (! err)
{
unsigned int i;