summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--exec/exec.c81
1 files changed, 0 insertions, 81 deletions
diff --git a/exec/exec.c b/exec/exec.c
index 30a5e000..3971478b 100644
--- a/exec/exec.c
+++ b/exec/exec.c
@@ -2071,87 +2071,6 @@ S_exec_exec (struct trivfs_protid *protid,
if (! protid)
return EOPNOTSUPP;
-#if 0
- if (!(flags & EXEC_SECURE))
- {
- char *list = envz_get (envp, envplen, "EXECSERVERS");
-
- if (list)
- {
- int tried = 0;
- list = strdupa (list);
- while ((p = strsep (&list, ":")))
- {
- /* Open the named file using the appropriate directory ports for
- the user. */
- error_t user_port (int which, error_t (*operate) (mach_port_t))
- {
- return (*operate) (nports > which
- ? portarray[which] : MACH_PORT_NULL);
- }
- file_t user_fd (int fd)
- {
- if (fd < 0 || fd >= dtablesize ||
- dtable[fd] == MACH_PORT_NULL)
- {
- errno = EBADF;
- return MACH_PORT_NULL;
- }
- return dtable[fd];
- }
- file_t server;
- if (!hurd_file_name_lookup (user_port, user_fd, 0, p, 0,0, &server))
- {
- error_t err;
- struct trivfs_protid *protid
- = ports_lookup_port (port_bucket, server,
- trivfs_protid_portclasses[0]);
- if (protid)
- {
- err = do_exec (file, oldtask, 0,
- argv, argvlen, argv_copy,
- envp, envplen, envp_copy,
- dtable, dtablesize, dtable_copy,
- portarray, nports, portarray_copy,
- intarray, nints, intarray_copy,
- deallocnames, ndeallocnames,
- destroynames, ndestroynames);
- ports_port_deref (protid);
- }
- else
- {
- int n;
- err = exec_exec (server,
- file, MACH_MSG_TYPE_COPY_SEND,
- oldtask, 0,
- argv, argvlen,
- envp, envplen,
- dtable, MACH_MSG_TYPE_COPY_SEND,
- dtablesize,
- portarray, MACH_MSG_TYPE_COPY_SEND,
- nports,
- intarray, nints,
- deallocnames, ndeallocnames,
- destroynames, ndestroynames);
- mach_port_deallocate (mach_task_self (), file);
- for (n = 0; n < dtablesize; n++)
- mach_port_deallocate (mach_task_self (), dtable[n]);
- for (n = 0; n < nports; n++)
- mach_port_deallocate (mach_task_self (), portarray[n]);
- }
- mach_port_deallocate (mach_task_self (), server);
- if (err != ENOEXEC)
- return err;
- tried = 1;
- }
- }
- if (tried)
- /* At least one exec server got a crack at it and gave up. */
- return ENOEXEC;
- }
- }
-#endif
-
/* There were no user-specified exec servers,
or none of them could be found. */