diff options
author | Justus Winter <4winter@informatik.uni-hamburg.de> | 2013-08-15 18:41:53 +0200 |
---|---|---|
committer | Samuel Thibault <samuel.thibault@ens-lyon.org> | 2013-08-28 23:59:55 +0200 |
commit | 48da1229d36a9ca6c044e34bbdde77067d8036a1 (patch) | |
tree | ad4a8fc16a705e4fedb24925ae8de98c1f58a94c /exec | |
parent | c4549b057bd1c2e43579614d985b3d9bfab94141 (diff) |
exec: Remove #ifdef 0-out code for user specified exec servers.
This code was meant to allow the user to specify alternative exec
servers using an environment variable. The Hurd uses the file system
as namespace for server lookups, so the proper way to use one's own
exec server seems to be the remap translator.
* exec/exec.c (S_exec_exec): Remove unused code.
Diffstat (limited to 'exec')
-rw-r--r-- | exec/exec.c | 81 |
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. */ |