summaryrefslogtreecommitdiff
path: root/exec
diff options
context:
space:
mode:
authorMiles Bader <miles@gnu.org>1996-03-28 19:23:24 +0000
committerMiles Bader <miles@gnu.org>1996-03-28 19:23:24 +0000
commitaa3c3b249840bf50f2c6b3bcc71604b4a3426eb6 (patch)
treed11a5c9ab0a8e3d91a09cc0aa8b828936db3d985 /exec
parent041ea3ba96fc3929f6834b7711d9a264cad97328 (diff)
(check_hashbang): Pass open flags & mode args to hurd_file_name_path_lookup.
Diffstat (limited to 'exec')
-rw-r--r--exec/hashexec.c15
1 files changed, 12 insertions, 3 deletions
diff --git a/exec/hashexec.c b/exec/hashexec.c
index 11a6c19e..14d5f6c6 100644
--- a/exec/hashexec.c
+++ b/exec/hashexec.c
@@ -24,13 +24,22 @@ the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */
#include <unistd.h>
#include <envz.h>
+extern error_t hurd_file_name_path_lookup (error_t (*use_init_port)
+ (int which,
+ error_t (*operate) (mach_port_t)),
+ file_t (*get_dtable_port) (int fd),
+ const char *file_name,
+ const char *path,
+ int flags, mode_t mode,
+ file_t *result,
+ char **prefixed_name);
+
/* This is called to check E for a #! interpreter specification. E has
already been prepared (successfully) and checked (unsuccessfully). If
we return success, our caller just returns success for the RPC; we must
handle all the RPC argument details ourselves. If we return ENOEXEC, we
should leave everything as it was. If we return failure other than
ENOEXEC, our caller will just fail the RPC. */
-
void
check_hashbang (struct execdata *e,
file_t file,
@@ -177,8 +186,8 @@ check_hashbang (struct execdata *e,
{ longjmp (args_faulted, 1); }
error_t setup_args (struct hurd_signal_preempter *preempter)
{
- char *file_name = NULL;
size_t namelen;
+ char * volatile file_name = NULL;
if (setjmp (args_faulted))
file_name = NULL;
@@ -214,7 +223,7 @@ check_hashbang (struct execdata *e,
}
err = hurd_file_name_path_lookup (user_port, user_fd,
- name, path,
+ name, path, O_EXEC, 0,
&name_file, &pfxed_name);
if (!err && pfxed_name)
{