aboutsummaryrefslogtreecommitdiff
path: root/utils/fakeauth.c
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu27@gmail.com>2010-05-26 23:32:16 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-01-08 22:49:38 +0100
commitf7c3556e627bd6ede22255defb55084d21e4dca6 (patch)
treeac2519b5429a7c0d81986838b2e306036fc7cb57 /utils/fakeauth.c
parent4152b0ca04f4703a6c6f33e59ba0e7bd95837069 (diff)
downloadhurd-f7c3556e627bd6ede22255defb55084d21e4dca6.tar.gz
hurd-f7c3556e627bd6ede22255defb55084d21e4dca6.tar.bz2
hurd-f7c3556e627bd6ede22255defb55084d21e4dca6.zip
Use the new _hurd_exec_file_name function
* configure.in: Check for _hurd_exec_paths. * utils/fakeauth.c: Call _hurd_exec_paths instead of _hurd_exec if it's available. * utils/shd.c: Likewise. * utils/rpctrace.c: Get prefixed_name from file_name_path_lookup and pass it to _hurd_exec_paths instead of calling _hurd_exec.
Diffstat (limited to 'utils/fakeauth.c')
-rw-r--r--utils/fakeauth.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/utils/fakeauth.c b/utils/fakeauth.c
index 5a349a8e..264be22b 100644
--- a/utils/fakeauth.c
+++ b/utils/fakeauth.c
@@ -1,5 +1,5 @@
/* fakeauth -- proxy auth server to lie to users about what their IDs are
- Copyright (C) 2002 Free Software Foundation, Inc.
+ Copyright (C) 2002, 2010 Free Software Foundation, Inc.
This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License as
@@ -397,7 +397,7 @@ believe it has restricted them to different identities or no identity at all.\
/* We cannot use fork because it doesn't do the right thing with our send
rights that point to our own receive rights, i.e. the new auth port.
Since posix_spawn might be implemented with fork (prior to glibc 2.3),
- we cannot use that simple interface either. We use _hurd_exec
+ we cannot use that simple interface either. We use _hurd_exec_paths
directly to effect what posix_spawn does in the simple case. */
{
task_t newtask;
@@ -426,7 +426,12 @@ believe it has restricted them to different identities or no identity at all.\
if (err)
error (3, err, "proc_child");
+#ifdef HAVE__HURD_EXEC_PATHS
+ err = _hurd_exec_paths (newtask, execfile, argv[argi], argv[argi],
+ &argv[argi], environ);
+#else
err = _hurd_exec (newtask, execfile, &argv[argi], environ);
+#endif
mach_port_deallocate (mach_task_self (), newtask);
mach_port_deallocate (mach_task_self (), execfile);
if (err)