commit-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec ser


From: Samuel Thibault
Subject: [hurd] 24/70: exec: Remove #ifdef 0-out code for user specified exec servers.
Date: Mon, 16 Sep 2013 07:41:38 +0000

This is an automated email from the git hooks/post-receive script.

sthibault pushed a commit to branch upstream
in repository hurd.

commit 48da1229d36a9ca6c044e34bbdde77067d8036a1
Author: Justus Winter <address@hidden>
Date:   Thu Aug 15 18:41:53 2013 +0200

    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.
---
 exec/exec.c |   81 -----------------------------------------------------------
 1 file changed, 81 deletions(-)

diff --git a/exec/exec.c b/exec/exec.c
index 30a5e00..3971478 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.  */
 

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/pkg-hurd/hurd.git



reply via email to

[Prev in Thread] Current Thread [Next in Thread]