summaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
Diffstat (limited to 'utils')
-rw-r--r--utils/ChangeLog5
-rw-r--r--utils/fakeauth.c7
2 files changed, 12 insertions, 0 deletions
diff --git a/utils/ChangeLog b/utils/ChangeLog
index e80fd383..9e20fe74 100644
--- a/utils/ChangeLog
+++ b/utils/ChangeLog
@@ -1,5 +1,10 @@
2002-05-13 Marcus Brinkmann <marcus@gnu.org>
+ * fakeauth.c (main): Register NEWTASK as a child with the proc
+ server.
+
+2002-05-13 Marcus Brinkmann <marcus@gnu.org>
+
* devprobe.c: Include <version.h>.
(argp_program_version): New variable.
* storecat.c: Include <version.h>.
diff --git a/utils/fakeauth.c b/utils/fakeauth.c
index 4f198932..c047a681 100644
--- a/utils/fakeauth.c
+++ b/utils/fakeauth.c
@@ -392,6 +392,7 @@ believe it has restricted them to different identities or no identity at all.\
directly to effect what posix_spawn does in the simple case. */
{
task_t newtask;
+ process_t proc;
file_t execfile = file_name_lookup (argv[argi], O_EXEC, 0);
if (execfile == MACH_PORT_NULL)
error (3, errno, "%s", argv[argi]);
@@ -406,6 +407,12 @@ believe it has restricted them to different identities or no identity at all.\
child = task2pid (newtask);
if (child < 0)
error (3, errno, "task2pid");
+ proc = getproc ();
+ err = proc_child (proc, newtask);
+ mach_port_deallocate (mach_task_self (), proc);
+ if (err)
+ error (3, err, "proc_child");
+
err = _hurd_exec (newtask, execfile, &argv[argi], environ);
mach_port_deallocate (mach_task_self (), newtask);
mach_port_deallocate (mach_task_self (), execfile);