commit-hurd
[Top][All Lists]
Advanced

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

[hurd] 02/06: Take upstream implementation of exec_filename


From: Samuel Thibault
Subject: [hurd] 02/06: Take upstream implementation of exec_filename
Date: Tue, 09 Jan 2018 01:35:27 +0000

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

sthibault pushed a commit to branch master
in repository hurd.

commit 873c3ac1532d0383d0bbe2b0e541142cecbdcd28
Author: Samuel Thibault <address@hidden>
Date:   Tue Jan 9 00:12:54 2018 +0000

    Take upstream implementation of exec_filename
---
 debian/changelog                                   |  11 +-
 debian/patches/exec_filename_exec.patch            | 252 +------
 debian/patches/exec_filename_fs.patch              | 713 ++++--------------
 debian/patches/exec_filename_rpctrace.patch        |  61 --
 debian/patches/exec_filename_use.patch             | 103 +--
 .../{dl_origin.patch => git-dl_origin.patch}       |  41 +-
 ...lename_exec.patch => git-exec_paths_exec.patch} | 219 ++----
 ...filename_fix.patch => git-exec_paths_fix.patch} |  55 +-
 debian/patches/git-exec_paths_fs.patch             | 819 +++++++++++++++++++++
 debian/patches/git-exec_paths_rpctrace.patch       |  58 ++
 ...filename_use.patch => git-exec_paths_use.patch} |  88 ++-
 .../{exec_set_exe.patch => git-exec_set_exe.patch} | 419 +++++------
 debian/patches/git-pie-core                        | 145 ++--
 debian/patches/series                              |  15 +-
 14 files changed, 1564 insertions(+), 1435 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index ef2592f..0929098 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -4,7 +4,16 @@ hurd (1:0.9.git20171119-4) unstable; urgency=medium
     numbers bigger than 4 billion.
   * patches/get-identity_weakref.diff: Fix a spurious hashtable removal.
   * debian/patches/hash-weakref: Rename to git-hash-weakref.
-  * debian/patches/pie-core: Rename to git-pie-core.
+  * debian/patches/git-exec_paths_exec.patch,git-exec_paths_fs.patch,
+    git-exec_paths_use.patch: Pick upstream commits.
+  * debian/patches/exec_filename_exec.patch,exec_filename_fs.patch,
+    exec_filename_use.patch: Keep compatibility.
+  * debian/patches/exec_filename_fix.patch: Rename to git-exec_paths_fix.patch
+    and update.
+  * debian/patches/exec_filename_rpctrace.patch: Rename to
+    git-exec_paths_rpctrace.patch and update.
+  * debian/patches/dl_origin.patch: Rename to git-dl_origin.patch and update.
+  * debian/patches/pie-core: Rename to git-pie-core and update.
 
  -- Samuel Thibault <address@hidden>  Sun, 07 Jan 2018 16:12:03 +0000
 
diff --git a/debian/patches/exec_filename_exec.patch 
b/debian/patches/exec_filename_exec.patch
index 6502c7d..e832c0c 100644
--- a/debian/patches/exec_filename_exec.patch
+++ b/debian/patches/exec_filename_exec.patch
@@ -1,115 +1,13 @@
-From 011df9d35eb68132cdb14a0f55e2435375e2cfce Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <address@hidden>
-Date: Wed, 26 May 2010 00:15:37 +0200
-Subject: [PATCH 1/3] Add a new exec_exec_file_name RPC
+Keep compatibility experimental file_name RPCs for now.
 
-* hurd/exec.defs (exec_exec_file_name): New RPC.
-(exec_exec): Label as deprecated.
-* doc/hurd.texi: Updated.
-* exec/exec.c (S_exec_exec_file_name): New function.
-(S_exec_exec): Label as deprecated.
-(do_exec): Add argument.
-* exec/hashexec.c (check_hashbang): Add argument.
-Don't guess the file name if file_name_exec is set.
-* exec/priv.h (check_hashbang): Add argument.
----
- doc/hurd.texi   |    8 ++++----
- exec/exec.c     |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
- exec/hashexec.c |   18 ++++++++++++------
- exec/priv.h     |    4 +++-
- hurd/exec.defs  |   19 +++++++++++++++++--
- 5 files changed, 81 insertions(+), 18 deletions(-)
-
-Index: hurd-debian/doc/hurd.texi
-===================================================================
---- hurd-debian.orig/doc/hurd.texi     2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/doc/hurd.texi  2014-02-03 23:45:08.000000000 +0000
-@@ -102,7 +102,7 @@
- documentation was last updated for version @value{VERSION} of the Hurd.
- 
- Copyright @copyright{} 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
--2004, 2005, 2007, 2008, 2009 Free Software Foundation, Inc.
-+2004, 2005, 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
- 
- @quotation
- Permission is granted to make and distribute verbatim copies of
-@@ -2766,14 +2766,14 @@
- authentication handle that was not previously present (as opposed to
- merely reordering them), then the @code{EXEC_SECURE} and
- @code{EXEC_NEWTASK} flags should both be added in the call to
address@hidden
address@hidden
- 
- The server then needs to open a new port onto the executed file which
- will not share any file pointers with the port the user passed in,
- opened with @code{O_READ}.  Finally, all the information (mutated
- appropriately for setuid/setgid) should be sent to the execserver with
address@hidden  Whatever error code @code{exec_exec} returns should
--returned to the caller of @code{file_exec}.
address@hidden  Whatever error code @code{exec_exec_file_name}
-+returns should be returned to the caller of @code{file_exec}.
- 
- @node File Locking
- @subsection File Locking
 Index: hurd-debian/exec/exec.c
 ===================================================================
---- hurd-debian.orig/exec/exec.c       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/exec.c    2014-02-03 22:48:44.000000000 +0000
-@@ -1,6 +1,6 @@
- /* GNU Hurd standard exec server.
--   Copyright (C) 1992,93,94,95,96,98,99,2000,01,02,04
--      Free Software Foundation, Inc.
-+   Copyright (C) 1992 ,1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001,
-+   2002, 2004, 2010 Free Software Foundation, Inc.
-    Written by Roland McGrath.
- 
-    Can exec ELF format directly.
-@@ -738,6 +738,7 @@
- do_exec (file_t file,
-        task_t oldtask,
-        int flags,
-+       char *filename,
-        char *argv, mach_msg_type_number_t argvlen, boolean_t argv_copy,
-        char *envp, mach_msg_type_number_t envplen, boolean_t envp_copy,
-        mach_port_t *dtable, mach_msg_type_number_t dtablesize,
-@@ -796,7 +797,7 @@
-     {
-       /* Check for a #! executable file.  */
-       check_hashbang (&e,
--                    file, oldtask, flags,
-+                    file, oldtask, flags, filename,
-                     argv, argvlen, argv_copy,
-                     envp, envplen, envp_copy,
-                     dtable, dtablesize, dtable_copy,
-@@ -1356,6 +1357,7 @@
-   return e.error;
+--- hurd-debian.orig/exec/exec.c
++++ hurd-debian/exec/exec.c
+@@ -1472,6 +1472,43 @@ S_exec_exec (struct trivfs_protid *proti
+                               destroynames, ndestroynames);
  }
  
-+/* Deprecated.  */
- kern_return_t
- S_exec_exec (struct trivfs_protid *protid,
-            file_t file,
-@@ -1372,13 +1374,51 @@
-            mach_port_t *deallocnames, mach_msg_type_number_t ndeallocnames,
-            mach_port_t *destroynames, mach_msg_type_number_t ndestroynames)
- {
-+  return S_exec_exec_file_name (protid,
-+                              file,
-+                              oldtask,
-+                              flags,
-+                              "",
-+                              argv, argvlen, argv_copy,
-+                              envp, envplen, envp_copy,
-+                              dtable, dtablesize,
-+                              dtable_copy,
-+                              portarray, nports,
-+                              portarray_copy,
-+                              intarray, nints,
-+                              intarray_copy,
-+                              deallocnames, ndeallocnames,
-+                              destroynames, ndestroynames);
-+}
-+
 +kern_return_t
 +S_exec_exec_file_name (struct trivfs_protid *protid,
 +                     file_t file,
@@ -131,78 +29,30 @@ Index: hurd-debian/exec/exec.c
 +                     mach_port_t *destroynames,
 +                     mach_msg_type_number_t ndestroynames)
 +{
-   if (! protid)
-     return EOPNOTSUPP;
- 
-   /* There were no user-specified exec servers,
-      or none of them could be found.  */
- 
--  return do_exec (file, oldtask, flags,
-+  return do_exec (file, oldtask, flags, filename,
-                 argv, argvlen, argv_copy,
-                 envp, envplen, envp_copy,
-                 dtable, dtablesize, dtable_copy,
-Index: hurd-debian/exec/hashexec.c
-===================================================================
---- hurd-debian.orig/exec/hashexec.c   2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/hashexec.c        2014-02-03 23:45:08.000000000 +0000
-@@ -1,5 +1,6 @@
- /* GNU Hurd standard exec server, #! script execution support.
--   Copyright (C) 1995,96,97,98,99,2000,02 Free Software Foundation, Inc.
-+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2000, 2002, 2010
-+   Free Software Foundation, Inc.
-    Written by Roland McGrath.
- 
-    This file is part of the GNU Hurd.
-@@ -35,6 +36,7 @@
-               file_t file,
-               task_t oldtask,
-               int flags,
-+              char *file_name_exec,
-               char *argv, u_int argvlen, boolean_t argv_copy,
-               char *envp, u_int envplen, boolean_t envp_copy,
-               mach_port_t *dtable, u_int dtablesize, boolean_t dtable_copy,
-@@ -225,10 +227,12 @@
-           file_name = NULL;
-         else if (! (flags & EXEC_SECURE))
-           {
--            /* Try to figure out the file's name.  We guess that if ARGV[0]
--               contains a slash, it might be the name of the file; and that
--               if it contains no slash, looking for files named by ARGV[0] in
--               the `PATH' environment variable might find it.  */
-+            /* Try to figure out the file's name.  If FILE_NAME_EXEC
-+               is not NULL, then it's the file's name.  Otherwise we
-+               guess that if ARGV[0] contains a slash, it might be
-+               the name of the file; and that if it contains no slash,
-+               looking for files named by ARGV[0] in the `PATH'
-+               environment variable might find it.  */
- 
-             error_t error;
-             char *name;
-@@ -278,7 +282,9 @@
-             else
-               name = argv;
- 
--            if (strchr (name, '/') != NULL)
-+            if (file_name_exec && file_name_exec[0] != '\0')
-+              error = lookup (name = file_name_exec, 0, &name_file);
-+            else if (strchr (name, '/') != NULL)
-               error = lookup (name, 0, &name_file);
-             else if ((error = hurd_catch_signal
-                       (sigmask (SIGBUS) | sigmask (SIGSEGV),
++  if (! protid)
++    return EOPNOTSUPP;
++
++  /* There were no user-specified exec servers,
++     or none of them could be found.  */
++
++  return do_exec (file, oldtask, flags, filename, filename,
++                argv, argvlen, argv_copy,
++                envp, envplen, envp_copy,
++                dtable, dtablesize, dtable_copy,
++                portarray, nports, portarray_copy,
++                intarray, nints, intarray_copy,
++                deallocnames, ndeallocnames,
++                destroynames, ndestroynames);
++}
++
+ kern_return_t
+ S_exec_exec_paths (struct trivfs_protid *protid,
+                      file_t file,
 Index: hurd-debian/exec/priv.h
 ===================================================================
---- hurd-debian.orig/exec/priv.h       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/priv.h    2014-02-03 22:48:44.000000000 +0000
-@@ -1,5 +1,6 @@
- /* GNU Hurd standard exec server, private declarations.
--   Copyright (C) 1992,93,94,95,96,99,2000,02, 04 Free Software Foundation, 
Inc.
-+   Copyright (C) 1992, 1993, 1994, 1995, 1996, 1999, 2000, 2002, 2004,
-+   2010 Free Software Foundation, Inc.
-    Written by Roland McGrath.
- 
- This file is part of the GNU Hurd.
-@@ -32,6 +33,7 @@
+--- hurd-debian.orig/exec/priv.h
++++ hurd-debian/exec/priv.h
+@@ -32,6 +33,7 @@ the Free Software Foundation, 675 Mass A
  #include <link.h>             /* This gives us the ElfW macro.  */
  #include <fcntl.h>
  #include "exec_S.h"
@@ -210,38 +60,10 @@ Index: hurd-debian/exec/priv.h
  
  
  #ifndef exec_priv_h
-@@ -134,6 +136,7 @@
-                    file_t file,
-                    task_t oldtask,
-                    int flags,
-+                   char *filename,
-                    char *argv, u_int argvlen, boolean_t argv_copy,
-                    char *envp, u_int envplen, boolean_t envp_copy,
-                    mach_port_t *dtable, u_int dtablesize,
-Index: hurd-debian/hurd/exec.defs
-===================================================================
---- hurd-debian.orig/hurd/exec.defs    2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/hurd/exec.defs 2014-02-03 22:48:44.000000000 +0000
-@@ -1,5 +1,6 @@
- /* Interface definitions for the exec servers.
--   Copyright (C) 1991,92,93,94,95,2001 Free Software Foundation, Inc.
-+   Copyright (C) 1991, 1992, 1993, 1994, 1995, 2001, 2010
-+   Free Software Foundation, Inc.
- 
- This file is part of the GNU Hurd.
- 
-@@ -29,6 +30,7 @@
- 
- INTR_INTERFACE
- 
-+/* Deprecated: use exec_exec_file_name instead.  */
- routine exec_exec (
-       execserver: file_t;
-       file: mach_port_send_t;
 Index: hurd-debian/hurd/exec_experimental.defs
 ===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ hurd-debian/hurd/exec_experimental.defs    2014-02-03 22:48:44.000000000 
+0000
+--- /dev/null
++++ hurd-debian/hurd/exec_experimental.defs
 @@ -0,0 +1,46 @@
 +/* Interface definitions for the exec servers.
 +   Copyright (C) 1991, 1992, 1993, 1994, 1995, 2001, 2010, 2012
@@ -291,9 +113,9 @@ Index: hurd-debian/hurd/exec_experimental.defs
 +
 Index: hurd-debian/exec/Makefile
 ===================================================================
---- hurd-debian.orig/exec/Makefile     2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/Makefile  2014-02-03 22:48:44.000000000 +0000
-@@ -22,7 +22,7 @@
+--- hurd-debian.orig/exec/Makefile
++++ hurd-debian/exec/Makefile
+@@ -22,7 +22,7 @@ makemode := server
  
  SRCS = exec.c main.c hashexec.c hostarch.c
  OBJS = main.o hostarch.o exec.o hashexec.o \
@@ -302,7 +124,7 @@ Index: hurd-debian/exec/Makefile
  
  target = exec exec.static
  HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc
-@@ -30,6 +30,7 @@
+@@ -30,6 +30,7 @@ LDLIBS = -lpthread
  
  exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
  exec_startup-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
@@ -312,9 +134,9 @@ Index: hurd-debian/exec/Makefile
  
 Index: hurd-debian/exec/main.c
 ===================================================================
---- hurd-debian.orig/exec/main.c       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/main.c    2014-02-03 23:45:19.000000000 +0000
-@@ -47,6 +47,7 @@
+--- hurd-debian.orig/exec/main.c
++++ hurd-debian/exec/main.c
+@@ -49,6 +49,7 @@ mach_port_t opt_device_master;
  
  
  #include "exec_S.h"
@@ -322,7 +144,7 @@ Index: hurd-debian/exec/main.c
  #include "exec_startup_S.h"
  
  static int
-@@ -54,6 +55,7 @@
+@@ -56,6 +57,7 @@ exec_demuxer (mach_msg_header_t *inp, ma
  {
    mig_routine_t routine;
    if ((routine = exec_server_routine (inp)) ||
diff --git a/debian/patches/exec_filename_fs.patch 
b/debian/patches/exec_filename_fs.patch
index 84607c7..ea1ce15 100644
--- a/debian/patches/exec_filename_fs.patch
+++ b/debian/patches/exec_filename_fs.patch
@@ -1,87 +1,5 @@
-From ba528e4a9db131112aa09edfdbb3449b55618578 Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <address@hidden>
-Date: Wed, 26 May 2010 01:27:40 +0200
-Subject: [PATCH 2/3] Add a file_exec_file_name RPC
+Keep compatibility experimental file_name RPCs for now.
 
-* hurd/fs.defs (file_exec): Deprecate in favor of...
-(file_exec_file_name): ...this new RPC.
-Change all implementations and forward old implementations to
-the new version.  Change all callers but fallback to old version.
-Change comments and documentation.
----
- TODO                              |    2 +-
- doc/hurd.texi                     |   16 ++++----
- exec/hashexec.c                   |   32 ++++++++++----
- hurd/fs.defs                      |   28 +++++++++++--
- hurd/hurd_types.h                 |    9 ++--
- startup/startup.c                       |   81 
++++++++++++++++++++++++++----------
- libdiskfs/boot-start.c            |    2 +-
- libdiskfs/file-exec.c             |   75 ++++++++++++++++++++++++++++------
- libfshelp/start-translator-long.c |   21 +++++++---
- libnetfs/file-exec.c              |   67 ++++++++++++++++++++++++++----
- libtrivfs/file-exec.c             |   27 ++++++++++++-
- trans/fakeroot.c                  |   59 ++++++++++++++++++++++++---
- utils/login.c                     |   23 +++++++---
- 13 files changed, 350 insertions(+), 92 deletions(-)
-
-Index: hurd-debian/TODO
-===================================================================
---- hurd-debian.orig/TODO
-+++ hurd-debian/TODO
-@@ -131,7 +131,7 @@ See `tasks', the exported task list.
- 
- ** libtrivfs
- *** Allow for read/write/exec to be passed down.
--*** Implement file_exec when appropriate. !!
-+*** Implement file_exec_file_name when appropriate. !!
- *** Provide for the visible owner, etc., to be held in command-line args
-     instead of the underlying node, when it's important. !!
- 
-Index: hurd-debian/doc/hurd.texi
-===================================================================
---- hurd-debian.orig/doc/hurd.texi
-+++ hurd-debian/doc/hurd.texi
-@@ -2736,10 +2736,10 @@ write the file.
- @node Program Execution
- @subsection Program Execution
- 
address@hidden file_exec
address@hidden file_exec_file_name
- Execution of programs on the Hurd is done through fileservers with the
address@hidden RPC.  The fileserver is expected to verify that the
--user is allowed to execute the file, make whatever modifications to the
address@hidden RPC.  The fileserver is expected to verify that
-+the user is allowed to execute the file, make whatever modifications to the
- ports are necessary for setuid execution, and then invoke the standard
- execserver found on @file{/servers/exec}.
- 
-@@ -2751,13 +2751,13 @@ The file must be opened for execution; i
- be returned.  In addition, at least one of the execute bits must be on.  A
- failure of this check should result in @code{EACCES}---not
- @code{ENOEXEC}.  It is not proper for the fileserver ever to respond to
--the @code{file_exec} RPC with @code{ENOEXEC}.
-+the @code{file_exec_file_name} RPC with @code{ENOEXEC}.
- 
- If either the setuid or setgid bits are set, the server needs to
- construct a new authentication handle with the additional new ID's.
--Then all the ports passed to @code{file_exec} need to be reauthenticated
--with the new handle.  If the fileserver is unable to make the new
--authentication handle (for example, because it is not running as root)
-+Then all the ports passed to @code{file_exec_file_name} need to be
-+reauthenticated with the new handle.  If the fileserver is unable to make the
-+new authentication handle (for example, because it is not running as root)
- it is not acceptable to return an error; in such a case the server
- should simply silently fail to implement the setuid/setgid semantics.
- 
-@@ -2772,7 +2772,7 @@ will not share any file pointers with th
- opened with @code{O_READ}.  Finally, all the information (mutated
- appropriately for setuid/setgid) should be sent to the execserver with
- @code{exec_exec_file_name}.  Whatever error code @code{exec_exec_file_name}
--returns should be returned to the caller of @code{file_exec}.
-+returns should be returned to the caller of @code{file_exec_file_name}.
- 
- @node File Locking
- @subsection File Locking
 Index: hurd-debian/exec/hashexec.c
 ===================================================================
 --- hurd-debian.orig/exec/hashexec.c
@@ -96,21 +14,12 @@ Index: hurd-debian/exec/hashexec.c
  
  /* This is called to check E for a #! interpreter specification.  E has
     already been prepared (successfully) and checked (unsuccessfully).  If
-@@ -423,16 +426,32 @@ check_hashbang (struct execdata *e,
-     /* We cannot open the interpreter file to execute it.  Lose!  */
-     return;
- 
+@@ -447,6 +450,21 @@ check_hashbang (struct execdata *e,
+   /* For backwards compatibility.  Just drop it when we kill file_exec.  */
+   if (e->error == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
-   /* Execute the interpreter program.  */
--  e->error = file_exec (interp_file,
--                      oldtask, flags,
--                      new_argv, new_argvlen, envp, envplen,
--                      new_dtable ?: dtable, MACH_MSG_TYPE_COPY_SEND,
--                      new_dtable ? new_dtablesize : dtablesize,
--                      portarray, MACH_MSG_TYPE_COPY_SEND, nports,
--                      intarray, nints,
--                      deallocnames, ndeallocnames,
--                      destroynames, ndestroynames);
++  /* Execute the interpreter program.  */
 +  e->error = file_exec_file_name (interp_file,
 +                                oldtask, flags, interp,
 +                                new_argv, new_argvlen, envp, envplen,
@@ -124,105 +33,13 @@ Index: hurd-debian/exec/hashexec.c
 +  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
 +  if (e->error == MIG_BAD_ID)
 +#endif
-+    e->error = file_exec (interp_file,
-+                        oldtask, flags,
-+                        new_argv, new_argvlen, envp, envplen,
-+                        new_dtable ?: dtable, MACH_MSG_TYPE_COPY_SEND,
-+                        new_dtable ? new_dtablesize : dtablesize,
-+                        portarray, MACH_MSG_TYPE_COPY_SEND, nports,
-+                        intarray, nints,
-+                        deallocnames, ndeallocnames,
-+                        destroynames, ndestroynames);
-+
-+
-   mach_port_deallocate (mach_task_self (), interp_file);
-   munmap (new_argv, new_argvlen);
- 
-Index: hurd-debian/hurd/fs.defs
-===================================================================
---- hurd-debian.orig/hurd/fs.defs
-+++ hurd-debian/hurd/fs.defs
-@@ -1,5 +1,6 @@
- /* Definitions for the filesystem interface.
--   Copyright (C) 1994,95,96,97,98,99,2002 Free Software Foundation, Inc.
-+   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2010
-+   Free Software Foundation, Inc.
- 
- This file is part of the GNU Hurd.
- 
-@@ -35,7 +36,8 @@ INTR_INTERFACE
- /* Overlay a task with a file.  Necessary initialization, including
-    authentication changes associated with set[ug]id execution must be
-    handled by the filesystem.  Filesystems normally implement this by
--   using exec_newtask or exec_loadtask as appropriate.  */
-+   using exec_newtask or exec_loadtask as appropriate.
-+   Deprecated: use file_exec_file_name instead.  */
- routine file_exec (
-       exec_file: file_t;
-       RPT
-@@ -129,8 +131,8 @@ routine file_lock_stat (
-    (regardless of the current open modes for this port).  ALLOWED is a
-    bitwise OR of O_READ, O_WRITE, and O_EXEC.  This is not necessarily the
-    same as what an open or exec would allow; O_EXEC is set for root even if
--   no executable bits are on (in which case file_exec should fail) and
--   O_WRITE is set a directory can be modified, even though it can't be
-+   no executable bits are on (in which case file_exec_file_name should fail)
-+   and O_WRITE is set a directory can be modified, even though it can't be
-    written directly.  */
- routine file_check_access (
-       file: file_t;
-Index: hurd-debian/hurd/hurd_types.h
-===================================================================
---- hurd-debian.orig/hurd/hurd_types.h
-+++ hurd-debian/hurd/hurd_types.h
-@@ -1,5 +1,6 @@
- /* C declarations for Hurd server interfaces
--   Copyright (C) 1993,94,95,96,98,99,2001,02 Free Software Foundation, Inc.
-+   Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
-+   2010 Free Software Foundation, Inc.
- 
- This file is part of the GNU Hurd.
- 
-@@ -81,7 +82,7 @@ typedef struct timespec timespec_t;
- /* Many such parameters and flags are also defined in various libc
-    headers. */
- 
--/* Bits for flags in fs.defs:file_exec and exec.defs:exec_* calls: */
-+/* Bits for flags in fs.defs:file_exec_file_name and exec.defs:exec_* calls: 
*/
- #define EXEC_NEWTASK  0x00000001 /* Create new task; kill old one.  */
- #define EXEC_SECURE   0x00000002 /* Use secure values of portarray, etc. */
- #define EXEC_DEFAULTS 0x00000004 /* Use defaults for unspecified ports.  */
-@@ -350,7 +351,7 @@ typedef int *procinfo_t;
- #define FSTYPE_MEMFS   0x00000019 /* In-core filesystem */
- #define FSTYPE_ISO9660 0x0000001a /* ISO9660 */
- 
--/* Standard port assignments for file_exec and exec_* */
-+/* Standard port assignments for file_exec_file_name and exec_* */
- enum
-   {
-     INIT_PORT_CWDIR,
-@@ -364,7 +365,7 @@ enum
-     INIT_PORT_MAX
-   };
- 
--/* Standard ints for file_exec and exec_* */
-+/* Standard ints for file_exec_file_name and exec_* */
- enum
-   {
-     INIT_UMASK,
+     e->error = file_exec (interp_file,
+                         oldtask, flags,
+                         new_argv, new_argvlen, envp, envplen,
 Index: hurd-debian/startup/startup.c
 ===================================================================
 --- hurd-debian.orig/startup/startup.c
 +++ hurd-debian/startup/startup.c
-@@ -1,7 +1,7 @@
- /* Start and maintain hurd core servers and system run state
- 
-    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
--     2005, 2008, 2013 Free Software Foundation, Inc.
-+     2005, 2008, 2010, 2013 Free Software Foundation, Inc.
-    This file is part of the GNU Hurd.
- 
-    The GNU Hurd is free software; you can redistribute it and/or modify
 @@ -24,6 +24,9 @@
     one file. */
  #include <hurd.h>
@@ -233,17 +50,10 @@ Index: hurd-debian/startup/startup.c
  #include <hurd/fsys.h>
  #include <device/device.h>
  #include <stdio.h>
-@@ -402,13 +405,28 @@ run (const char *server, mach_port_t *po
-             fprintf (stderr, "Pausing for %s\n", prog);
-             getchar ();
-           }
--        err = file_exec (file, *task, 0,
--                         argz, argz_len, /* Args.  */
--                         startup_envz, startup_envz_len,
--                         default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
--                         ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
--                         default_ints, INIT_INT_MAX,
--                         NULL, 0, NULL, 0);
+@@ -417,6 +420,21 @@ run (const char *server, mach_port_t *po
+            file_exec.  */
+         if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
 +        err = file_exec_file_name (file, *task, 0, (char *)prog,
 +                                   argz,
@@ -259,28 +69,13 @@ Index: hurd-debian/startup/startup.c
 +           file_exec.  */
 +        if (err == MIG_BAD_ID)
 +#endif
-+          err = file_exec (file, *task, 0,
-+                           argz, argz_len, /* Args.  */
-+                           startup_envz, startup_envz_len,
-+                           default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
-+                           ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
-+                           default_ints, INIT_INT_MAX,
-+                           NULL, 0, NULL, 0);
-         if (!err)
-           break;
- 
-@@ -538,14 +556,27 @@ run_for_real (char *filename, char *args
-     ++progname;
-   else
-     progname = filename;
--  err = file_exec (file, task, 0,
--                 args, arglen,
--                 startup_envz, startup_envz_len,
--                 default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
--                 default_ports, MACH_MSG_TYPE_COPY_SEND,
--                 INIT_PORT_MAX,
--                 default_ints, INIT_INT_MAX,
--                 NULL, 0, NULL, 0);
+           err = file_exec (file, *task, 0,
+                            argz, argz_len, /* Args.  */
+                            startup_envz, startup_envz_len,
+@@ -565,6 +583,18 @@ run_for_real (char *filename, char *args
+   /* For backwards compatibility.  Just drop it when we kill file_exec.  */
+   if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
 +  err = file_exec_file_name (file, task, 0, filename,
 +                           args, arglen,
@@ -293,29 +88,13 @@ Index: hurd-debian/startup/startup.c
 +  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
 +  if (err == MIG_BAD_ID)
 +#endif
-+    err = file_exec (file, task, 0,
-+                   args, arglen,
-+                   startup_envz, startup_envz_len,
-+                   default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
-+                   default_ports, MACH_MSG_TYPE_COPY_SEND,
-+                   INIT_PORT_MAX,
-+                   default_ints, INIT_INT_MAX,
-+                   NULL, 0, NULL, 0);
-+
-   mach_port_deallocate (mach_task_self (), default_ports[INIT_PORT_PROC]);
-   mach_port_deallocate (mach_task_self (), task);
-   if (ctty != MACH_PORT_NULL)
-@@ -1244,13 +1275,26 @@ start_child (const char *prog, char **pr
-       getchar ();
-     }
- 
--  err = file_exec (file, child_task, 0,
--                 args, arglen,
--                 startup_envz, startup_envz_len,
--                 NULL, MACH_MSG_TYPE_COPY_SEND, 0, /* No fds.  */
--                 default_ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
--                 default_ints, INIT_INT_MAX,
--                 NULL, 0, NULL, 0);
+     err = file_exec (file, task, 0,
+                    args, arglen,
+                    startup_envz, startup_envz_len,
+@@ -1284,6 +1314,18 @@ start_child (const char *prog, char **pr
+   /* For backwards compatibility.  Just drop it when we kill file_exec.  */
+   if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
 +  err = file_exec_file_name (file, child_task, 0, args,
 +                           args, arglen,
@@ -328,44 +107,14 @@ Index: hurd-debian/startup/startup.c
 +  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
 +  if (err == MIG_BAD_ID)
 +#endif
-+    err = file_exec (file, child_task, 0,
-+                   args, arglen,
-+                   startup_envz, startup_envz_len,
-+                   NULL, MACH_MSG_TYPE_COPY_SEND, 0, /* No fds.  */
-+                   default_ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
-+                   default_ints, INIT_INT_MAX,
-+                   NULL, 0, NULL, 0);
-+
-   proc_mark_important (default_ports[INIT_PORT_PROC]);
-   mach_port_deallocate (mach_task_self (), default_ports[INIT_PORT_PROC]);
-   mach_port_deallocate (mach_task_self (), file);
-Index: hurd-debian/libdiskfs/boot-start.c
-===================================================================
---- hurd-debian.orig/libdiskfs/boot-start.c
-+++ hurd-debian/libdiskfs/boot-start.c
-@@ -214,7 +214,7 @@ diskfs_start_bootstrap ()
-       diskfs_exec_ctl = MACH_PORT_NULL;       /* Not used after this.  */
-     }
- 
--  /* Cache the exec server port for file_exec to use.  */
-+  /* Cache the exec server port for file_exec_file_name to use.  */
-   _hurd_port_set (&_diskfs_exec_portcell, diskfs_exec);
- 
-   if (_diskfs_boot_command)
+     err = file_exec (file, child_task, 0,
+                    args, arglen,
+                    startup_envz, startup_envz_len,
 Index: hurd-debian/libdiskfs/file-exec.c
 ===================================================================
 --- hurd-debian.orig/libdiskfs/file-exec.c
 +++ hurd-debian/libdiskfs/file-exec.c
-@@ -1,5 +1,6 @@
--/* File execution (file_exec RPC) for diskfs servers, using exec server.
--   Copyright (C) 1993,94,95,96,97,98,2000,02 Free Software Foundation, Inc.
-+/* File execution (file_exec_file_name RPC) for diskfs servers, using exec 
server.
-+   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
-+   2010 Free Software Foundation, Inc.
- 
-    This file is part of the GNU Hurd.
- 
-@@ -21,10 +22,14 @@
+@@ -22,10 +22,14 @@
  
  #include "priv.h"
  #include "fs_S.h"
@@ -380,14 +129,34 @@ Index: hurd-debian/libdiskfs/file-exec.c
  #include <string.h>
  #include <idvec.h>
  
-@@ -47,6 +52,39 @@ diskfs_S_file_exec (struct protid *cred,
-                   mach_port_t *destroynames,
-                   size_t destroynameslen)
- {
-+  return diskfs_S_file_exec_file_name (cred,
+@@ -63,6 +67,40 @@ diskfs_S_file_exec (struct protid *cred,
+ }
+ 
+ kern_return_t
++diskfs_S_file_exec_file_name (struct protid *cred,
++                  task_t task,
++                  int flags,
++                  char *filename,
++                  char *argv,
++                  size_t argvlen,
++                  char *envp,
++                  size_t envplen,
++                  mach_port_t *fds,
++                  size_t fdslen,
++                  mach_port_t *portarray,
++                  size_t portarraylen,
++                  int *intarray,
++                  size_t intarraylen,
++                  mach_port_t *deallocnames,
++                  size_t deallocnameslen,
++                  mach_port_t *destroynames,
++                  size_t destroynameslen)
++{
++  return diskfs_S_file_exec_paths (cred,
 +                                     task,
 +                                     flags,
-+                                     "",
++                                     filename,
++                                     filename,
 +                                     argv, argvlen,
 +                                     envp, envplen,
 +                                     fds, fdslen,
@@ -398,57 +167,18 @@ Index: hurd-debian/libdiskfs/file-exec.c
 +}
 +
 +kern_return_t
-+diskfs_S_file_exec_file_name (struct protid *cred,
-+                            task_t task,
-+                            int flags,
-+                            char *filename,
-+                            char *argv,
-+                            size_t argvlen,
-+                            char *envp,
-+                            size_t envplen,
-+                            mach_port_t *fds,
-+                            size_t fdslen,
-+                            mach_port_t *portarray,
-+                            size_t portarraylen,
-+                            int *intarray,
-+                            size_t intarraylen,
-+                            mach_port_t *deallocnames,
-+                            size_t deallocnameslen,
-+                            mach_port_t *destroynames,
-+                            size_t destroynameslen)
-+{
-   struct node *np;
-   uid_t uid;
-   gid_t gid;
-@@ -136,9 +174,9 @@ diskfs_S_file_exec (struct protid *cred,
- 
-   if (! err)
-     /* Make a new peropen for the exec server to access the file, since any
--       seeking the exec server might want to do should not affect the
--       original peropen on which file_exec was called.  (The new protid for
--       this peropen clones the caller's iouser to preserve the caller's
-+       seeking the exec server might want to do should not affect the original
-+       peropen on which file_exec_file_name was called.  (The new protid
-+       for this peropen clones the caller's iouser to preserve the caller's
-        authentication credentials.)  The new peropen's openmodes must have
-        O_READ even if the caller had only O_EXEC privilege, so the exec
-        server can read the executable file.  We also include O_EXEC so that
-@@ -159,14 +197,31 @@ diskfs_S_file_exec (struct protid *cred,
-       do
-       {
-         right = ports_get_send_right (newpi);
--        err = exec_exec (execserver,
--                         right, MACH_MSG_TYPE_COPY_SEND,
--                         task, flags, argv, argvlen, envp, envplen,
--                         fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
--                         portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
--                         intarray, intarraylen,
--                         deallocnames, deallocnameslen,
--                         destroynames, destroynameslen);
+ diskfs_S_file_exec_paths (struct protid *cred,
+                         task_t task,
+                         int flags,
+@@ -209,6 +247,21 @@ diskfs_S_file_exec_paths (struct protid
+         /* For backwards compatibility.  Just drop it when we kill
+            exec_exec.  */
+         if (err == MIG_BAD_ID)
++#endif
 +#ifdef HAVE_EXEC_EXEC_FILE_NAME
 +        err = exec_exec_file_name (execserver,
 +                                   right, MACH_MSG_TYPE_COPY_SEND,
-+                                   task, flags, filename,
++                                   task, flags, path,
 +                                   argv, argvlen, envp, envplen,
 +                                   fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
 +                                   portarray, MACH_MSG_TYPE_COPY_SEND,
@@ -459,33 +189,14 @@ Index: hurd-debian/libdiskfs/file-exec.c
 +        /* For backwards compatibility.  Just drop it when we kill
 +           exec_exec.  */
 +        if (err == MIG_BAD_ID)
-+#endif
-+          err = exec_exec (execserver,
-+                           right, MACH_MSG_TYPE_COPY_SEND,
-+                           task, flags, argv, argvlen, envp, envplen,
-+                           fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
-+                           portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
-+                           intarray, intarraylen,
-+                           deallocnames, deallocnameslen,
-+                           destroynames, destroynameslen);
-+
-+
-         mach_port_deallocate (mach_task_self (), right);
-         if (err == MACH_SEND_INVALID_DEST)
-           {
+ #endif
+           err = exec_exec (execserver,
+                            right, MACH_MSG_TYPE_COPY_SEND,
 Index: hurd-debian/libfshelp/start-translator-long.c
 ===================================================================
 --- hurd-debian.orig/libfshelp/start-translator-long.c
 +++ hurd-debian/libfshelp/start-translator-long.c
-@@ -1,5 +1,6 @@
- /*
--   Copyright (C) 1995,96,99,2000,02, 04 Free Software Foundation, Inc.
-+   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2004, 2010
-+   Free Software Foundation, Inc.
-    Written by Miles Bader and Michael I. Bushnell.
- 
-    This file is part of the GNU Hurd.
-@@ -28,6 +29,9 @@
+@@ -29,6 +29,9 @@
  #include <string.h>
  #include <assert-backtrace.h>
  #include "fshelp.h"
@@ -495,17 +206,12 @@ Index: hurd-debian/libfshelp/start-translator-long.c
  
  
  /* The data passed in the various messages we're interested in.  */
-@@ -273,12 +277,22 @@ fshelp_start_translator_long (fshelp_ope
-   saveport = ports[INIT_PORT_BOOTSTRAP];
-   ports[INIT_PORT_BOOTSTRAP] = bootstrap;
- 
+@@ -284,6 +287,16 @@ fshelp_start_translator_long (fshelp_ope
+   /* For backwards compatibility.  Just drop it when we kill file_exec.  */
+   if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
-   /* Try and exec the translator in TASK...  */
--  err = file_exec (executable, task, EXEC_DEFAULTS,
--                 argz, argz_len, 0, 0,
--                 fds, fds_type, fds_len,
--                 ports, ports_type, ports_len,
--                 ints, ints_len, 0, 0, 0, 0);
++  /* Try and exec the translator in TASK...  */
 +  err = file_exec_file_name (executable, task, EXEC_DEFAULTS, name,
 +                           argz, argz_len, 0, 0,
 +                           fds, fds_type, fds_len,
@@ -514,28 +220,14 @@ Index: hurd-debian/libfshelp/start-translator-long.c
 +  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
 +  if (err == MIG_BAD_ID)
 +#endif
-+    err = file_exec (executable, task, EXEC_DEFAULTS,
-+                   argz, argz_len, 0, 0,
-+                   fds, fds_type, fds_len,
-+                   ports, ports_type, ports_len,
-+                   ints, ints_len, 0, 0, 0, 0);
-+
-   ports_moved = 1;
- 
-   if (ports_type == MACH_MSG_TYPE_COPY_SEND)
+     err = file_exec (executable, task, EXEC_DEFAULTS,
+                    argz, argz_len, 0, 0,
+                    fds, fds_type, fds_len,
 Index: hurd-debian/libnetfs/file-exec.c
 ===================================================================
 --- hurd-debian.orig/libnetfs/file-exec.c
 +++ hurd-debian/libnetfs/file-exec.c
-@@ -1,5 +1,6 @@
- /*
--   Copyright (C) 1996,97,2000,01,02 Free Software Foundation, Inc.
-+   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010
-+   Free Software Foundation, Inc.
-    Written by Michael I. Bushnell, p/BSG.
- 
-    This file is part of the GNU Hurd.
-@@ -23,10 +24,14 @@
+@@ -24,10 +24,14 @@
  #include "netfs.h"
  #include "execserver.h"
  #include "fs_S.h"
@@ -550,14 +242,34 @@ Index: hurd-debian/libnetfs/file-exec.c
  #include <string.h>
  #include <idvec.h>
  
-@@ -49,6 +54,39 @@ netfs_S_file_exec (struct protid *cred,
-                  mach_port_t *destroynames,
-                  size_t destroynameslen)
- {
-+  return netfs_S_file_exec_file_name (cred,
+@@ -65,6 +69,40 @@ netfs_S_file_exec (struct protid *cred,
+ }
+ 
+ kern_return_t
++netfs_S_file_exec_file_name (struct protid *cred,
++                 task_t task,
++                 int flags,
++                 char *filename,
++                 char *argv,
++                 size_t argvlen,
++                 char *envp,
++                 size_t envplen,
++                 mach_port_t *fds,
++                 size_t fdslen,
++                 mach_port_t *portarray,
++                 size_t portarraylen,
++                 int *intarray,
++                 size_t intarraylen,
++                 mach_port_t *deallocnames,
++                 size_t deallocnameslen,
++                 mach_port_t *destroynames,
++                 size_t destroynameslen)
++{
++  return netfs_S_file_exec_paths (cred,
 +                                    task,
 +                                    flags,
-+                                    "",
++                                    filename,
++                                    filename,
 +                                    argv, argvlen,
 +                                    envp, envplen,
 +                                    fds, fdslen,
@@ -568,44 +280,18 @@ Index: hurd-debian/libnetfs/file-exec.c
 +}
 +
 +kern_return_t
-+netfs_S_file_exec_file_name (struct protid *cred,
-+                           task_t task,
-+                           int flags,
-+                           char *filename,
-+                           char *argv,
-+                           size_t argvlen,
-+                           char *envp,
-+                           size_t envplen,
-+                           mach_port_t *fds,
-+                           size_t fdslen,
-+                           mach_port_t *portarray,
-+                           size_t portarraylen,
-+                           int *intarray,
-+                           size_t intarraylen,
-+                           mach_port_t *deallocnames,
-+                           size_t deallocnameslen,
-+                           mach_port_t *destroynames,
-+                           size_t destroynameslen)
-+{
-   struct node *np;
-   error_t err;
-   uid_t uid;
-@@ -133,14 +171,31 @@ netfs_S_file_exec (struct protid *cred,
-         if (newpi)
-           {
-             right = ports_get_send_right (newpi);
--            err = exec_exec (_netfs_exec,
--                             right, MACH_MSG_TYPE_COPY_SEND,
--                             task, flags, argv, argvlen, envp, envplen,
--                             fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
--                             portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
--                             intarray, intarraylen,
--                             deallocnames, deallocnameslen,
--                             destroynames, destroynameslen);
+ netfs_S_file_exec_paths (struct protid *cred,
+                        task_t task,
+                        int flags,
+@@ -183,6 +221,21 @@ netfs_S_file_exec_paths (struct protid *
+             /* For backwards compatibility.  Just drop it when we kill
+                exec_exec.  */
+             if (err == MIG_BAD_ID)
++#endif
 +#ifdef HAVE_EXEC_EXEC_FILE_NAME
 +            err = exec_exec_file_name (_netfs_exec,
 +                                       right, MACH_MSG_TYPE_COPY_SEND,
-+                                       task, flags, filename,
++                                       task, flags, path,
 +                                       argv, argvlen, envp, envplen,
 +                                       fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
 +                                       portarray, MACH_MSG_TYPE_COPY_SEND,
@@ -616,37 +302,17 @@ Index: hurd-debian/libnetfs/file-exec.c
 +            /* For backwards compatibility.  Just drop it when we kill
 +               exec_exec.  */
 +            if (err == MIG_BAD_ID)
-+#endif
-+              err = exec_exec (_netfs_exec,
-+                               right, MACH_MSG_TYPE_COPY_SEND,
-+                               task, flags, argv, argvlen, envp, envplen,
-+                               fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
-+                               portarray, MACH_MSG_TYPE_COPY_SEND,
-+                               portarraylen,
-+                               intarray, intarraylen,
-+                               deallocnames, deallocnameslen,
-+                               destroynames, destroynameslen);
-+
-             mach_port_deallocate (mach_task_self (), right);
-             ports_port_deref (newpi);
-           }
+ #endif
+               err = exec_exec (_netfs_exec,
+                                right, MACH_MSG_TYPE_COPY_SEND,
 Index: hurd-debian/libtrivfs/file-exec.c
 ===================================================================
 --- hurd-debian.orig/libtrivfs/file-exec.c
 +++ hurd-debian/libtrivfs/file-exec.c
-@@ -1,5 +1,5 @@
- /*
--   Copyright (C) 1994,2002 Free Software Foundation, Inc.
-+   Copyright (C) 1994, 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
-@@ -41,3 +41,28 @@ trivfs_S_file_exec (trivfs_protid_t exec
- {
-   return EOPNOTSUPP;
+@@ -43,6 +43,31 @@ trivfs_S_file_exec (trivfs_protid_t exec
  }
-+
-+kern_return_t
+ 
+ kern_return_t
 +trivfs_S_file_exec_file_name (trivfs_protid_t exec_file,
 +                            mach_port_t reply,
 +                            mach_msg_type_name_t replyPoly,
@@ -670,6 +336,11 @@ Index: hurd-debian/libtrivfs/file-exec.c
 +{
 +  return EOPNOTSUPP;
 +}
++
++kern_return_t
+ trivfs_S_file_exec_paths (trivfs_protid_t exec_file,
+                         mach_port_t reply,
+                         mach_msg_type_name_t replyPoly,
 Index: hurd-debian/trans/fakeroot.c
 ===================================================================
 --- hurd-debian.orig/trans/fakeroot.c
@@ -689,64 +360,16 @@ Index: hurd-debian/trans/fakeroot.c
  #include "libnetfs/io_S.h"
  #include "libnetfs/fsys_S.h"
  #include "libports/notify_S.h"
-@@ -882,23 +886,24 @@ netfs_file_get_storage_info (struct ious
- }
- 
- kern_return_t
--netfs_S_file_exec (struct protid *user,
--                   task_t task,
--                   int flags,
--                   char *argv,
--                   size_t argvlen,
--                   char *envp,
--                   size_t envplen,
--                   mach_port_t *fds,
--                   size_t fdslen,
--                   mach_port_t *portarray,
--                   size_t portarraylen,
--                   int *intarray,
--                   size_t intarraylen,
--                   mach_port_t *deallocnames,
--                   size_t deallocnameslen,
--                   mach_port_t *destroynames,
--                   size_t destroynameslen)
-+netfs_S_file_exec_file_name (struct protid *user,
-+                           task_t task,
-+                           int flags,
-+                           char *filename,
-+                           char *argv,
-+                           size_t argvlen,
-+                           char *envp,
-+                           size_t envplen,
-+                           mach_port_t *fds,
-+                           size_t fdslen,
-+                           mach_port_t *portarray,
-+                           size_t portarraylen,
-+                           int *intarray,
-+                           size_t intarraylen,
-+                           mach_port_t *deallocnames,
-+                           size_t deallocnameslen,
-+                           mach_port_t *destroynames,
-+                           size_t destroynameslen)
- {
-   error_t err;
-   file_t file;
-@@ -917,14 +922,30 @@ netfs_S_file_exec (struct protid *user,
- 
-   if (!err)
-     {
+@@ -937,6 +941,24 @@ netfs_S_file_exec_paths (struct protid *
+        file_exec.  */
+       if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
-       /* We cannot use MACH_MSG_TYPE_MOVE_SEND because we might need to
-        retry an interrupted call that would have consumed the rights.  */
--      err = file_exec (netfs_node_netnode (user->po->np)->file,
--                     task, flags, argv, argvlen,
--                     envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
--                     portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
--                     intarray, intarraylen, deallocnames, deallocnameslen,
--                     destroynames, destroynameslen);
++      /* We cannot use MACH_MSG_TYPE_MOVE_SEND because we might need to
++       retry an interrupted call that would have consumed the rights.  */
 +      err = file_exec_file_name (netfs_node_netnode (user->po->np)->file,
 +                               task, flags,
-+                               filename,
++                               path,
 +                               argv, argvlen,
 +                               envp, envplen,
 +                               fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
@@ -759,23 +382,18 @@ Index: hurd-debian/trans/fakeroot.c
 +       file_exec.  */
 +      if (err == MIG_BAD_ID)
 +#endif
-+      err = file_exec (user->po->np->nn->file, task, flags, argv, argvlen,
-+                       envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
-+                       portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
-+                       intarray, intarraylen, deallocnames, deallocnameslen,
-+                       destroynames, destroynameslen);
-+
-       mach_port_deallocate (mach_task_self (), file);
-     }
- 
-@@ -940,6 +961,38 @@ netfs_S_file_exec (struct protid *user,
-   return err;
+       err = file_exec (user->po->np->nn->file, task, flags, argv, argvlen,
+                        envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
+                        portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
+@@ -991,6 +1013,40 @@ netfs_S_file_exec (struct protid *user,
+                                 destroynames, destroynameslen);
  }
  
 +kern_return_t
-+netfs_S_file_exec (struct protid *user,
++netfs_S_file_exec_file_name (struct protid *user,
 +                   task_t task,
 +                   int flags,
++                   char *filename,
 +                   char *argv,
 +                   size_t argvlen,
 +                   char *envp,
@@ -791,10 +409,11 @@ Index: hurd-debian/trans/fakeroot.c
 +                   mach_port_t *destroynames,
 +                   size_t destroynameslen)
 +{
-+  return netfs_S_file_exec_file_name (user,
++  return netfs_S_file_exec_paths (user,
 +                                    task,
 +                                    flags,
-+                                    "",
++                                    filename,
++                                    filename,
 +                                    argv, argvlen,
 +                                    envp, envplen,
 +                                    fds, fdslen,
@@ -807,7 +426,7 @@ Index: hurd-debian/trans/fakeroot.c
  error_t
  netfs_S_io_map (struct protid *user,
                mach_port_t *rdobj, mach_msg_type_name_t *rdobjtype,
-@@ -1056,6 +1109,7 @@ netfs_demuxer (mach_msg_header_t *inp,
+@@ -1107,6 +1163,7 @@ netfs_demuxer (mach_msg_header_t *inp,
    mig_routine_t routine;
    if ((routine = netfs_io_server_routine (inp)) ||
        (routine = netfs_fs_server_routine (inp)) ||
@@ -819,16 +438,7 @@ Index: hurd-debian/utils/login.c
 ===================================================================
 --- hurd-debian.orig/utils/login.c
 +++ hurd-debian/utils/login.c
-@@ -1,6 +1,7 @@
- /* Hurdish login
- 
--   Copyright (C) 1995,96,97,98,99,2002 Free Software Foundation, Inc.
-+   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2002, 2010
-+   Free Software Foundation, Inc.
- 
-    Written by Miles Bader <address@hidden>
- 
-@@ -46,6 +47,9 @@
+@@ -47,6 +47,9 @@
  #include <error.h>
  #include <timefmt.h>
  #include <hurd/lookup.h>
@@ -838,16 +448,10 @@ Index: hurd-debian/utils/login.c
  #include <ugids.h>
  
  const char *argp_program_version = STANDARD_HURD_VERSION (login);
-@@ -882,12 +886,22 @@ main(int argc, char *argv[])
-       }
-     }
- 
--  err = file_exec (exec, mach_task_self (), EXEC_DEFAULTS,
--                 sh_args, sh_args_len, env, env_len,
--                 fds, MACH_MSG_TYPE_COPY_SEND, 3,
--                 ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
--                 ints, INIT_INT_MAX,
--                 0, 0, 0, 0);
+@@ -893,6 +896,16 @@ main(int argc, char *argv[])
+   /* Fallback in case the file server hasn't been restarted.  */
+   if (err == MIG_BAD_ID)
+ #endif
 +#ifdef HAVE_FILE_EXEC_FILE_NAME
 +  err = file_exec_file_name (exec, mach_task_self (), EXEC_DEFAULTS, shell,
 +                           sh_args, sh_args_len, env, env_len,
@@ -858,15 +462,9 @@ Index: hurd-debian/utils/login.c
 +  /* Fallback in case the file server hasn't been restarted.  */
 +  if (err == MIG_BAD_ID)
 +#endif
-+    err = file_exec (exec, mach_task_self (), EXEC_DEFAULTS,
-+                   sh_args, sh_args_len, env, env_len,
-+                   fds, MACH_MSG_TYPE_COPY_SEND, 3,
-+                   ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
-+                   ints, INIT_INT_MAX,
-+                   0, 0, 0, 0);
-   if (err)
-     error(5, err, "%s", shell);
- 
+     err = file_exec (exec, mach_task_self (), EXEC_DEFAULTS,
+                    sh_args, sh_args_len, env, env_len,
+                    fds, MACH_MSG_TYPE_COPY_SEND, 3,
 Index: hurd-debian/hurd/fs_experimental.defs
 ===================================================================
 --- /dev/null
@@ -1007,7 +605,7 @@ Index: hurd-debian/libtrivfs/Makefile
 ===================================================================
 --- hurd-debian.orig/libtrivfs/Makefile
 +++ hurd-debian/libtrivfs/Makefile
-@@ -43,7 +43,7 @@ OTHERSRCS=demuxer.c protid-clean.c proti
+@@ -44,7 +44,7 @@ OTHERSRCS=demuxer.c protid-clean.c proti
  
  SRCS=$(FSSRCS) $(IOSRCS) $(FSYSSRCS) $(OTHERSRCS)
  
@@ -1040,12 +638,11 @@ Index: hurd-debian/configure.ac
 ===================================================================
 --- hurd-debian.orig/configure.ac
 +++ hurd-debian/configure.ac
-@@ -162,6 +162,8 @@ else
-   VERSIONING=no
+@@ -163,6 +163,7 @@ else
  fi
  AC_SUBST(VERSIONING)
-+# Check if libc contains these functions.
+ # Check if libc contains these functions.
 +AC_CHECK_FUNCS(file_exec_file_name exec_exec_file_name)
+ AC_CHECK_FUNCS(file_exec_paths exec_exec_paths _hurd_exec_paths)
  
  
- # From glibc HEAD, 2007-11-07.
diff --git a/debian/patches/exec_filename_rpctrace.patch 
b/debian/patches/exec_filename_rpctrace.patch
deleted file mode 100644
index d15f9bf..0000000
--- a/debian/patches/exec_filename_rpctrace.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Kalle Olavi Niemitalo <address@hidden>
-To: address@hidden
-Date: Fri, 26 Aug 2016 17:23:28 +0300
-Subject: [PATCH] rpctrace: Pass prefixed_name to _hurd_exec_file_name.
-
-This fixes the following test case:
-
-  mkdir testy
-  echo '#! /bin/bash' > testy/prog
-  echo 'printf "%s\n" "$0"' >> testy/prog
-  chmod +x testy/prog
-  PATH=$(pwd)/testy /bin/rpctrace -E PATH=/usr/bin:/bin -o /dev/null prog
-
-Before this patch, the output is:
-
-  /bin/bash: prog: No such file or directory
-
-After this patch, the output is similar to:
-
-  /home/kalle/testy/prog
-
-* utils/rpctrace.c (traced_spawn): Get prefixed_name from
-file_name_path_lookup and pass it to _hurd_exec_file_name.
-
-diff --git a/utils/rpctrace.c b/utils/rpctrace.c
-index 95ff124..10843bc 100644
---- a/utils/rpctrace.c
-+++ b/utils/rpctrace.c
-@@ -1622,8 +1622,9 @@ traced_spawn (char **argv, char **envp)
-   task_t traced_task;
-   struct sender_info *ti;
-   struct receiver_info *receive_ti;
-+  char *prefixed_name;
-   file_t file = file_name_path_lookup (argv[0], getenv ("PATH"),
--                                     O_EXEC, 0, 0);
-+                                     O_EXEC, 0, &prefixed_name);
- 
-   if (file == MACH_PORT_NULL)
-     error (1, errno, "command not found: %s", argv[0]);
-@@ -1664,7 +1665,8 @@ traced_spawn (char **argv, char **envp)
-      the actual task, so the RPCs to map in the program itself do not get
-      traced.  Could have an option to use TASK_WRAPPER here instead.  */
- #ifdef HAVE__HURD_EXEC_FILE_NAME
--  err = _hurd_exec_file_name (traced_task, file, *argv, argv, envp);
-+  err = _hurd_exec_file_name (traced_task, file, prefixed_name ?: *argv,
-+                            argv, envp);
- #else
-   err = _hurd_exec (traced_task, file, argv, envp);
- #endif
-@@ -1675,6 +1677,7 @@ traced_spawn (char **argv, char **envp)
-      cannot die and hence our TRACED_TASK ref cannot have been released.  */
-   mach_port_deallocate (mach_task_self (), task_wrapper);
- 
-+  free (prefixed_name);
-   return pid;
- }
- 
--- 
-2.6.4
-
-
diff --git a/debian/patches/exec_filename_use.patch 
b/debian/patches/exec_filename_use.patch
index bc19a01..b5a1450 100644
--- a/debian/patches/exec_filename_use.patch
+++ b/debian/patches/exec_filename_use.patch
@@ -1,19 +1,4 @@
-From bbce8439190738efc9260490fa52f9dfe9600306 Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <address@hidden>
-Date: Wed, 26 May 2010 23:32:16 +0200
-Subject: [PATCH 3/3] Use the new _hurd_exec_file_name function
-
-* configure.in: Check for _hurd_exec_file_name.
-* utils/fakeauth.c: Call _hurd_exec_file_name instead of
-_hurd_exec if it's available.
-* utils/rpctrace.c: Likewise.
-* utils/shd.c: Likewise.
----
- configure.in     |    4 ++--
- utils/fakeauth.c |    9 +++++++--
- utils/rpctrace.c |    6 +++++-
- utils/shd.c      |    9 ++++++---
- 4 files changed, 20 insertions(+), 8 deletions(-)
+Keep compatibility experimental file_name RPCs for now.
 
 Index: hurd-debian/configure.ac
 ===================================================================
@@ -25,87 +10,47 @@ Index: hurd-debian/configure.ac
  # Check if libc contains these functions.
 -AC_CHECK_FUNCS(file_exec_file_name exec_exec_file_name)
 +AC_CHECK_FUNCS(file_exec_file_name exec_exec_file_name _hurd_exec_file_name)
+ AC_CHECK_FUNCS(file_exec_paths exec_exec_paths _hurd_exec_paths)
  
  
- # From glibc HEAD, 2007-11-07.
 Index: hurd-debian/utils/fakeauth.c
 ===================================================================
 --- hurd-debian.orig/utils/fakeauth.c
 +++ hurd-debian/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 differ
-   /* 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_file_name
-      directly to effect what posix_spawn does in the simple case.  */
-   {
-     task_t newtask;
-@@ -422,7 +422,12 @@ believe it has restricted them to differ
-     if (err)
-       error (3, err, "proc_child");
- 
-+#ifdef HAVE__HURD_EXEC_FILE_NAME
+@@ -422,6 +422,9 @@ believe it has restricted them to differ
+ #ifdef HAVE__HURD_EXEC_PATHS
+     err = _hurd_exec_paths (newtask, execfile, argv[argi], argv[argi],
+                           &argv[argi], environ);
++#elif defined HAVE__HURD_EXEC_FILE_NAME
 +    err = _hurd_exec_file_name (newtask, execfile, argv[argi],
 +                              &argv[argi], environ);
-+#else
+ #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)
+ #endif
 Index: hurd-debian/utils/rpctrace.c
 ===================================================================
 --- hurd-debian.orig/utils/rpctrace.c
 +++ hurd-debian/utils/rpctrace.c
-@@ -1742,7 +1742,11 @@ traced_spawn (char **argv, char **envp)
-   /* Now actually run the command they told us to trace.  We do the exec on
-      the actual task, so the RPCs to map in the program itself do not get
-      traced.  Could have an option to use TASK_WRAPPER here instead.  */
-+#ifdef HAVE__HURD_EXEC_FILE_NAME
-+  err = _hurd_exec_file_name (traced_task, file, *argv, argv, envp);
-+#else
+@@ -1742,6 +1742,9 @@ traced_spawn (char **argv, char **envp)
+ #ifdef HAVE__HURD_EXEC_PATHS
+   err = _hurd_exec_paths (traced_task, file, prefixed_name ?: *argv,
+                         prefixed_name ?: *argv, argv, envp);
++#elif defined HAVE__HURD_EXEC_FILE_NAME
++  err = _hurd_exec_file_name (traced_task, file, prefixed_name ?: *argv,
++                              argv, envp);
+ #else
    err = _hurd_exec (traced_task, file, argv, envp);
-+#endif
-   if (err)
-     error (2, err, "cannot exec `%s'", argv[0]);
- 
+ #endif
 Index: hurd-debian/utils/shd.c
 ===================================================================
 --- hurd-debian.orig/utils/shd.c
 +++ hurd-debian/utils/shd.c
-@@ -1,5 +1,5 @@
- /*
--   Copyright (C) 1994,95,99,2002 Free Software Foundation
-+   Copyright (C) 1994, 1995, 1999, 2002, 2010 Free Software Foundation
- 
-    This program is free software; you can redistribute it and/or
-    modify it under the terms of the GNU General Public License as
-@@ -159,15 +159,18 @@ run (char **argv, int fd0, int fd1)
-             movefd (fd1, 1, &save1))
-           return -1;
+@@ -159,6 +159,8 @@ run (char **argv, int fd0, int fd1)
  
-+#ifdef HAVE__HURD_EXEC_FILE_NAME
+ #ifdef HAVE__HURD_EXEC_PATHS
+         err = _hurd_exec_paths (task, file, program, program, argv, environ);
++#elif defined HAVE__HURD_EXEC_FILE_NAME
 +        err = _hurd_exec_file_name (task, file, program, argv, environ);
-+#else
+ #else
          err = _hurd_exec (task, file, argv, environ);
--
-+#endif
-         if (restorefd (fd0, 0, &save0) ||
-             restorefd (fd1, 1, &save1))
-           return -1;
- 
-         if (err)
-           {
--            error (0, err, "_hurd_exec");
-+            error (0, err, "_hurd_exec_file_name");
-             err = task_terminate (task);
-             if (err)
-               error (0, err, "task_terminate");
+ #endif
diff --git a/debian/patches/dl_origin.patch b/debian/patches/git-dl_origin.patch
similarity index 74%
rename from debian/patches/dl_origin.patch
rename to debian/patches/git-dl_origin.patch
index e1750df..aa4f164 100644
--- a/debian/patches/dl_origin.patch
+++ b/debian/patches/git-dl_origin.patch
@@ -1,13 +1,17 @@
-Add basic support for $ORIGIN rpath expansion
+commit 9d3ba19ddc56ad929f673af23eb87ab07ae30631
+Author: Samuel Thibault <address@hidden>
+Date:   Mon Jan 8 22:56:23 2018 +0100
 
-This only supports absolute paths, which is enough for ghc, but won't be enough
-for other uses. Perhaps it would be better to support it in glibc instead?
+    Add support for $ORIGIN rpath expansion
+    
+    * exec/exec.c (do_exec): When abspath is absolute, record its dirname
+    into the LD_ORIGIN_PATH environment variable.
 
-Index: hurd-debian/exec/exec.c
-===================================================================
---- hurd-debian.orig/exec/exec.c
-+++ hurd-debian/exec/exec.c
-@@ -890,7 +890,7 @@ do_exec (file_t file,
+diff --git a/exec/exec.c b/exec/exec.c
+index cc613527..94f0a733 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
+@@ -951,7 +951,7 @@ do_exec (file_t file,
      secure = (flags & EXEC_SECURE);
      defaults = (flags & EXEC_DEFAULTS);
  
@@ -16,7 +20,7 @@ Index: hurd-debian/exec/exec.c
         Whatever arrived inline, we must allocate space for so it can
         survive after this RPC returns.  */
  
-@@ -901,11 +901,91 @@ do_exec (file_t file,
+@@ -962,11 +962,90 @@ do_exec (file_t file,
        goto stdout;
      boot->argv = argv;
      boot->argvlen = argvlen;
@@ -24,12 +28,11 @@ Index: hurd-debian/exec/exec.c
 -    if (e.error)
 -      goto stdout;
 +
-+    if (filename && filename[0] == '/')
++    if (abspath && abspath[0] == '/')
 +      {
 +      /* Explicit absolute filename, put its dirname in the LD_ORIGIN_PATH
-+         environment variable for $ORIGIN rpath expansion.
-+         XXX: thus does not work with relative paths.  */
-+      const char *end = strrchr (filename, '/');
++         environment variable for $ORIGIN rpath expansion. */
++      const char *end = strrchr (abspath, '/');
 +      size_t pathlen;
 +      const char ld_origin_s[] = "\0LD_ORIGIN_PATH=";
 +      const char *existing;
@@ -38,14 +41,14 @@ Index: hurd-debian/exec/exec.c
 +      char *new_envp;
 +
 +      /* Drop trailing slashes.  */
-+      while (end > filename && end[-1] == '/')
++      while (end > abspath && end[-1] == '/')
 +        end--;
 +
-+      if (end == filename)
++      if (end == abspath)
 +        /* Root, keep explicit heading/trailing slash.   */
 +        end++;
 +
-+      pathlen = end - filename;
++      pathlen = end - abspath;
 +
 +      if (memcmp (envp, ld_origin_s + 1, sizeof (ld_origin_s) - 2) == 0)
 +        /* Existing variable at the beginning of envp.  */
@@ -72,7 +75,7 @@ Index: hurd-debian/exec/exec.c
 +
 +          /* And copy.  */
 +          memcpy (new_envp, envp, existing - envp);
-+          memcpy (new_envp + (existing - envp), filename, pathlen);
++          memcpy (new_envp + (existing - envp), abspath, pathlen);
 +          memcpy (new_envp + (existing - envp) + pathlen,
 +                  existing + existing_len,
 +                  envplen - ((existing - envp) + existing_len));
@@ -85,7 +88,7 @@ Index: hurd-debian/exec/exec.c
 +                           PROT_READ|PROT_WRITE, MAP_ANON, 0, 0);
 +
 +          memcpy (new_envp, ld_origin_s + 1, sizeof (ld_origin_s) - 2);
-+          memcpy (new_envp + sizeof (ld_origin_s) - 2, filename, pathlen);
++          memcpy (new_envp + sizeof (ld_origin_s) - 2, abspath, pathlen);
 +          new_envp [sizeof (ld_origin_s) - 2 + pathlen] = 0;
 +          memcpy (new_envp + sizeof (ld_origin_s) - 2 + pathlen + 1, envp, 
envplen);
 +        }
@@ -99,7 +102,7 @@ Index: hurd-debian/exec/exec.c
 +      }
 +    else
 +      {
-+      /* No explicit filename, just copy the existing environment */
++      /* No explicit abspath, just copy the existing environment */
 +      envp = servercopy (envp, envplen, envp_copy, &e.error);
 +      if (e.error)
 +        goto stdout;
diff --git a/debian/patches/exec_filename_exec.patch 
b/debian/patches/git-exec_paths_exec.patch
similarity index 52%
copy from debian/patches/exec_filename_exec.patch
copy to debian/patches/git-exec_paths_exec.patch
index 6502c7d..28a062b 100644
--- a/debian/patches/exec_filename_exec.patch
+++ b/debian/patches/git-exec_paths_exec.patch
@@ -1,30 +1,24 @@
-From 011df9d35eb68132cdb14a0f55e2435375e2cfce Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <address@hidden>
-Date: Wed, 26 May 2010 00:15:37 +0200
-Subject: [PATCH 1/3] Add a new exec_exec_file_name RPC
+commit 67fa50fb8f0a6894e5ed6534936afb8044e66613
+Author: Emilio Pozuelo Monfort <address@hidden>
+Date:   Wed May 26 00:15:37 2010 +0200
 
-* hurd/exec.defs (exec_exec_file_name): New RPC.
-(exec_exec): Label as deprecated.
-* doc/hurd.texi: Updated.
-* exec/exec.c (S_exec_exec_file_name): New function.
-(S_exec_exec): Label as deprecated.
-(do_exec): Add argument.
-* exec/hashexec.c (check_hashbang): Add argument.
-Don't guess the file name if file_name_exec is set.
-* exec/priv.h (check_hashbang): Add argument.
----
- doc/hurd.texi   |    8 ++++----
- exec/exec.c     |   50 +++++++++++++++++++++++++++++++++++++++++++++-----
- exec/hashexec.c |   18 ++++++++++++------
- exec/priv.h     |    4 +++-
- hurd/exec.defs  |   19 +++++++++++++++++--
- 5 files changed, 81 insertions(+), 18 deletions(-)
+    Add a new exec_exec_paths RPC
+    
+    * hurd/exec.defs (exec_exec): Label as deprecated.
+    (exec_exec_paths): New RPC.
+    * doc/hurd.texi: Update accordingly.
+    * exec/hashexec.c (check_hashbang): Add file_name_exec argument.
+    Don't guess the file name if file_name_exec is set.
+    * exec/priv.h (check_hashbang): Add path argument.
+    * exec/exec.c (S_exec_exec): Label as deprecated.
+    (S_exec_exec_paths): New function.
+    (do_exec): Add path and abspath arguments, pass path to check_hashbang.
 
-Index: hurd-debian/doc/hurd.texi
-===================================================================
---- hurd-debian.orig/doc/hurd.texi     2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/doc/hurd.texi  2014-02-03 23:45:08.000000000 +0000
-@@ -102,7 +102,7 @@
+diff --git a/doc/hurd.texi b/doc/hurd.texi
+index 8428a77b..a9216d1d 100644
+--- a/doc/hurd.texi
++++ b/doc/hurd.texi
+@@ -102,7 +102,7 @@ This file documents the GNU Hurd kernel component.  This 
edition of the
  documentation was last updated for version @value{VERSION} of the Hurd.
  
  Copyright @copyright{} 1994, 1996, 1998, 1999, 2000, 2001, 2002, 2003,
@@ -33,12 +27,12 @@ Index: hurd-debian/doc/hurd.texi
  
  @quotation
  Permission is granted to make and distribute verbatim copies of
-@@ -2766,14 +2766,14 @@
+@@ -2765,14 +2765,14 @@ If the setuid/setgid transformation adds a new uid or 
gid to the user's
  authentication handle that was not previously present (as opposed to
  merely reordering them), then the @code{EXEC_SECURE} and
  @code{EXEC_NEWTASK} flags should both be added in the call to
 address@hidden
address@hidden
address@hidden
  
  The server then needs to open a new port onto the executed file which
  will not share any file pointers with the port the user passed in,
@@ -46,15 +40,15 @@ Index: hurd-debian/doc/hurd.texi
  appropriately for setuid/setgid) should be sent to the execserver with
 address@hidden  Whatever error code @code{exec_exec} returns should
 -returned to the caller of @code{file_exec}.
address@hidden  Whatever error code @code{exec_exec_file_name}
address@hidden  Whatever error code @code{exec_exec_paths}
 +returns should be returned to the caller of @code{file_exec}.
  
  @node File Locking
  @subsection File Locking
-Index: hurd-debian/exec/exec.c
-===================================================================
---- hurd-debian.orig/exec/exec.c       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/exec.c    2014-02-03 22:48:44.000000000 +0000
+diff --git a/exec/exec.c b/exec/exec.c
+index 2d74ee1c..cc613527 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
 @@ -1,6 +1,6 @@
  /* GNU Hurd standard exec server.
 -   Copyright (C) 1992,93,94,95,96,98,99,2000,01,02,04
@@ -64,24 +58,25 @@ Index: hurd-debian/exec/exec.c
     Written by Roland McGrath.
  
     Can exec ELF format directly.
-@@ -738,6 +738,7 @@
+@@ -793,6 +793,8 @@ static error_t
  do_exec (file_t file,
         task_t oldtask,
         int flags,
-+       char *filename,
++       char *path,
++       char *abspath,
         char *argv, mach_msg_type_number_t argvlen, boolean_t argv_copy,
         char *envp, mach_msg_type_number_t envplen, boolean_t envp_copy,
         mach_port_t *dtable, mach_msg_type_number_t dtablesize,
-@@ -796,7 +797,7 @@
+@@ -852,7 +854,7 @@ do_exec (file_t file,
      {
        /* Check for a #! executable file.  */
        check_hashbang (&e,
 -                    file, oldtask, flags,
-+                    file, oldtask, flags, filename,
++                    file, oldtask, flags, path,
                      argv, argvlen, argv_copy,
                      envp, envplen, envp_copy,
                      dtable, dtablesize, dtable_copy,
-@@ -1356,6 +1357,7 @@
+@@ -1440,6 +1442,7 @@ do_exec (file_t file,
    return e.error;
  }
  
@@ -89,15 +84,17 @@ Index: hurd-debian/exec/exec.c
  kern_return_t
  S_exec_exec (struct trivfs_protid *protid,
             file_t file,
-@@ -1372,13 +1374,51 @@
+@@ -1455,6 +1458,46 @@ S_exec_exec (struct trivfs_protid *protid,
+            boolean_t intarray_copy,
             mach_port_t *deallocnames, mach_msg_type_number_t ndeallocnames,
             mach_port_t *destroynames, mach_msg_type_number_t ndestroynames)
- {
-+  return S_exec_exec_file_name (protid,
++{
++  return S_exec_exec_paths (protid,
 +                              file,
 +                              oldtask,
 +                              flags,
 +                              "",
++                              "",
 +                              argv, argvlen, argv_copy,
 +                              envp, envplen, envp_copy,
 +                              dtable, dtablesize,
@@ -111,11 +108,12 @@ Index: hurd-debian/exec/exec.c
 +}
 +
 +kern_return_t
-+S_exec_exec_file_name (struct trivfs_protid *protid,
++S_exec_exec_paths (struct trivfs_protid *protid,
 +                     file_t file,
 +                     task_t oldtask,
 +                     int flags,
-+                     char *filename,
++                     char *path,
++                     char *abspath,
 +                     char *argv, mach_msg_type_number_t argvlen,
 +                     boolean_t argv_copy,
 +                     char *envp, mach_msg_type_number_t envplen,
@@ -130,22 +128,22 @@ Index: hurd-debian/exec/exec.c
 +                     mach_msg_type_number_t ndeallocnames,
 +                     mach_port_t *destroynames,
 +                     mach_msg_type_number_t ndestroynames)
-+{
+ {
    if (! protid)
      return EOPNOTSUPP;
- 
+@@ -1462,7 +1505,7 @@ S_exec_exec (struct trivfs_protid *protid,
    /* There were no user-specified exec servers,
       or none of them could be found.  */
  
 -  return do_exec (file, oldtask, flags,
-+  return do_exec (file, oldtask, flags, filename,
++  return do_exec (file, oldtask, flags, path, abspath,
                  argv, argvlen, argv_copy,
                  envp, envplen, envp_copy,
                  dtable, dtablesize, dtable_copy,
-Index: hurd-debian/exec/hashexec.c
-===================================================================
---- hurd-debian.orig/exec/hashexec.c   2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/hashexec.c        2014-02-03 23:45:08.000000000 +0000
+diff --git a/exec/hashexec.c b/exec/hashexec.c
+index 68b48816..e8e94844 100644
+--- a/exec/hashexec.c
++++ b/exec/hashexec.c
 @@ -1,5 +1,6 @@
  /* GNU Hurd standard exec server, #! script execution support.
 -   Copyright (C) 1995,96,97,98,99,2000,02 Free Software Foundation, Inc.
@@ -154,7 +152,7 @@ Index: hurd-debian/exec/hashexec.c
     Written by Roland McGrath.
  
     This file is part of the GNU Hurd.
-@@ -35,6 +36,7 @@
+@@ -35,6 +36,7 @@ check_hashbang (struct execdata *e,
                file_t file,
                task_t oldtask,
                int flags,
@@ -162,7 +160,7 @@ Index: hurd-debian/exec/hashexec.c
                char *argv, u_int argvlen, boolean_t argv_copy,
                char *envp, u_int envplen, boolean_t envp_copy,
                mach_port_t *dtable, u_int dtablesize, boolean_t dtable_copy,
-@@ -225,10 +227,12 @@
+@@ -227,10 +229,12 @@ check_hashbang (struct execdata *e,
            file_name = NULL;
          else if (! (flags & EXEC_SECURE))
            {
@@ -179,7 +177,7 @@ Index: hurd-debian/exec/hashexec.c
  
              error_t error;
              char *name;
-@@ -278,7 +282,9 @@
+@@ -280,7 +284,9 @@ check_hashbang (struct execdata *e,
              else
                name = argv;
  
@@ -190,10 +188,10 @@ Index: hurd-debian/exec/hashexec.c
                error = lookup (name, 0, &name_file);
              else if ((error = hurd_catch_signal
                        (sigmask (SIGBUS) | sigmask (SIGSEGV),
-Index: hurd-debian/exec/priv.h
-===================================================================
---- hurd-debian.orig/exec/priv.h       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/priv.h    2014-02-03 22:48:44.000000000 +0000
+diff --git a/exec/priv.h b/exec/priv.h
+index be085803..e84d8150 100644
+--- a/exec/priv.h
++++ b/exec/priv.h
 @@ -1,5 +1,6 @@
  /* GNU Hurd standard exec server, private declarations.
 -   Copyright (C) 1992,93,94,95,96,99,2000,02, 04 Free Software Foundation, 
Inc.
@@ -202,15 +200,7 @@ Index: hurd-debian/exec/priv.h
     Written by Roland McGrath.
  
  This file is part of the GNU Hurd.
-@@ -32,6 +33,7 @@
- #include <link.h>             /* This gives us the ElfW macro.  */
- #include <fcntl.h>
- #include "exec_S.h"
-+#include "exec_experimental_S.h"
- 
- 
- #ifndef exec_priv_h
-@@ -134,6 +136,7 @@
+@@ -135,6 +136,7 @@ void check_hashbang (struct execdata *e,
                     file_t file,
                     task_t oldtask,
                     int flags,
@@ -218,10 +208,10 @@ Index: hurd-debian/exec/priv.h
                     char *argv, u_int argvlen, boolean_t argv_copy,
                     char *envp, u_int envplen, boolean_t envp_copy,
                     mach_port_t *dtable, u_int dtablesize,
-Index: hurd-debian/hurd/exec.defs
-===================================================================
---- hurd-debian.orig/hurd/exec.defs    2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/hurd/exec.defs 2014-02-03 22:48:44.000000000 +0000
+diff --git a/hurd/exec.defs b/hurd/exec.defs
+index 2888fb1e..d879df1a 100644
+--- a/hurd/exec.defs
++++ b/hurd/exec.defs
 @@ -1,5 +1,6 @@
  /* Interface definitions for the exec servers.
 -   Copyright (C) 1991,92,93,94,95,2001 Free Software Foundation, Inc.
@@ -230,57 +220,26 @@ Index: hurd-debian/hurd/exec.defs
  
  This file is part of the GNU Hurd.
  
-@@ -29,6 +30,7 @@
+@@ -29,6 +30,7 @@ EXEC_IMPORTS
  
  INTR_INTERFACE
  
-+/* Deprecated: use exec_exec_file_name instead.  */
++/* Deprecated: use exec_exec_paths instead.  */
  routine exec_exec (
        execserver: file_t;
        file: mach_port_send_t;
-Index: hurd-debian/hurd/exec_experimental.defs
-===================================================================
---- /dev/null  1970-01-01 00:00:00.000000000 +0000
-+++ hurd-debian/hurd/exec_experimental.defs    2014-02-03 22:48:44.000000000 
+0000
-@@ -0,0 +1,46 @@
-+/* Interface definitions for the exec servers.
-+   Copyright (C) 1991, 1992, 1993, 1994, 1995, 2001, 2010, 2012
-+   Free Software Foundation, Inc.
-+
-+This file is part of the GNU Hurd.
-+
-+The GNU Hurd is free software; you can redistribute it and/or modify
-+it under the terms of the GNU General Public License as published by
-+the Free Software Foundation; either version 2, or (at your option)
-+any later version.
-+
-+The GNU Hurd is distributed in the hope that it will be useful,
-+but WITHOUT ANY WARRANTY; without even the implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-+GNU General Public License for more details.
-+
-+You should have received a copy of the GNU General Public License
-+along with the GNU Hurd; see the file COPYING.  If not, write to
-+the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.  */
-+
-+/* Written by Michael I. Bushnell and Roland McGrath.  */
-+
-+subsystem exec_experimental 434242;
-+
-+#include <hurd/hurd_types.defs>
-+
-+#ifdef EXEC_IMPORTS
-+EXEC_IMPORTS
-+#endif
-+
-+INTR_INTERFACE
+@@ -55,3 +57,18 @@ simpleroutine exec_setexecdata (
+       execserver: file_t;
+       ports: portarray_t SCP;
+       ints: intarray_t SCP);
 +
-+routine exec_exec_file_name (
++routine exec_exec_paths (
 +      execserver: file_t;
 +      file: mach_port_send_t;
 +      oldtask: task_t;
 +      flags: int;
-+      filename: string_t;
++      path: string_t;
++      abspath: string_t;
 +      argv: data_t SCP;
 +      envp: data_t SCP;
 +      dtable: portarray_t SCP;
@@ -288,45 +247,3 @@ Index: hurd-debian/hurd/exec_experimental.defs
 +      intarray: intarray_t SCP;
 +      deallocnames: mach_port_name_array_t;
 +      destroynames: mach_port_name_array_t);
-+
-Index: hurd-debian/exec/Makefile
-===================================================================
---- hurd-debian.orig/exec/Makefile     2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/Makefile  2014-02-03 22:48:44.000000000 +0000
-@@ -22,7 +22,7 @@
- 
- SRCS = exec.c main.c hashexec.c hostarch.c
- OBJS = main.o hostarch.o exec.o hashexec.o \
--       execServer.o exec_startupServer.o
-+       execServer.o exec_startupServer.o exec_experimentalServer.o
- 
- target = exec exec.static
- HURDLIBS = trivfs fshelp iohelp ports ihash shouldbeinlibc
-@@ -30,6 +30,7 @@
- 
- exec-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
- exec_startup-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
-+exec_experimental-MIGSFLAGS = -imacros $(srcdir)/execmutations.h
- 
- include ../Makeconf
- 
-Index: hurd-debian/exec/main.c
-===================================================================
---- hurd-debian.orig/exec/main.c       2014-02-03 22:48:45.000000000 +0000
-+++ hurd-debian/exec/main.c    2014-02-03 23:45:19.000000000 +0000
-@@ -47,6 +47,7 @@
- 
- 
- #include "exec_S.h"
-+#include "exec_experimental_S.h"
- #include "exec_startup_S.h"
- 
- static int
-@@ -54,6 +55,7 @@
- {
-   mig_routine_t routine;
-   if ((routine = exec_server_routine (inp)) ||
-+      (routine = exec_experimental_server_routine (inp)) ||
-       (routine = NULL, trivfs_demuxer (inp, outp)) ||
-       (routine = exec_startup_server_routine (inp)))
-     {
diff --git a/debian/patches/exec_filename_fix.patch 
b/debian/patches/git-exec_paths_fix.patch
similarity index 70%
rename from debian/patches/exec_filename_fix.patch
rename to debian/patches/git-exec_paths_fix.patch
index 8ebb8f2..e2a54d3 100644
--- a/debian/patches/exec_filename_fix.patch
+++ b/debian/patches/git-exec_paths_fix.patch
@@ -1,33 +1,34 @@
-From: Justus Winter <address@hidden>
+commit 16eff1b637f13f90ea3f00d7f1dd0d99945611f6
+Author: Justus Winter <address@hidden>
+Date:   Mon Jan 8 22:54:27 2018 +0100
 
-This patch is an amendment of exec_filename_exec.patch.
-
-If file_name_exec is not given, check_hashbang will try to locate the
-file. If argv[0] contains a '/', the file path is assumed to be
-absolute and it will try to open the file. Otherwise, the file is
-searched in the PATH. In either case, the resulting file identity port
-is compared to the identity port of the original file handle passed to
-check_hashbang.
-
-exec_filename_exec.patch explicitly provides the script files path in
-file_name_exec. According to the comment, if this path is provided, it
-is assumed to be the path to the script file and no attempt at
-locating the script file is done. However, the identity ports are
-still compared. This cannot succeed if fakeroot or chroot is used,
-because the process doing the exec and thus the initial file lookup is
-running in the chrooted environment, while the exec server is not.
-
-Fix this by skipping the identity test if file_name_exec is provided.
-
-* exec/hashexec.c (check_hashbang): Skip the file identity test if the
-  file_name_exec is provided.
----
- exec/hashexec.c |   91 ++++++++++++++++++++++++++++++-------------------------
- 1 file changed, 50 insertions(+), 41 deletions(-)
+    Fix exec_paths through fakeroot or chroot
+    
+    If file_name_exec is not given, check_hashbang will try to locate the
+    file. If argv[0] contains a '/', the file path is assumed to be
+    absolute and it will try to open the file. Otherwise, the file is
+    searched in the PATH. In either case, the resulting file identity port
+    is compared to the identity port of the original file handle passed to
+    check_hashbang.
+    
+    exec_paths_exec.patch explicitly provides the script files path in
+    file_name_exec. According to the comment, if this path is provided, it
+    is assumed to be the path to the script file and no attempt at
+    locating the script file is done. However, the identity ports are
+    still compared. This cannot succeed if fakeroot or chroot is used,
+    because the process doing the exec and thus the initial file lookup is
+    running in the chrooted environment, while the exec server is not.
+    
+    Fix this by skipping the identity test if file_name_exec is provided.
+    
+    * exec/hashexec.c (check_hashbang): Skip the file identity test if the
+    file_name_exec is provided.
 
+diff --git a/exec/hashexec.c b/exec/hashexec.c
+index a7368390..71c02386 100644
 --- a/exec/hashexec.c
 +++ b/exec/hashexec.c
-@@ -231,11 +231,12 @@ check_hashbang (struct execdata *e,
+@@ -230,11 +230,12 @@ check_hashbang (struct execdata *e,
          else if (! (flags & EXEC_SECURE))
            {
              /* Try to figure out the file's name.  If FILE_NAME_EXEC
@@ -45,7 +46,7 @@ Fix this by skipping the identity test if file_name_exec is 
provided.
  
              error_t error;
              char *name;
-@@ -271,51 +272,59 @@ check_hashbang (struct execdata *e,
+@@ -270,51 +271,59 @@ check_hashbang (struct execdata *e,
                  return err;
                }
  
diff --git a/debian/patches/git-exec_paths_fs.patch 
b/debian/patches/git-exec_paths_fs.patch
new file mode 100644
index 0000000..94ce145
--- /dev/null
+++ b/debian/patches/git-exec_paths_fs.patch
@@ -0,0 +1,819 @@
+commit 4152b0ca04f4703a6c6f33e59ba0e7bd95837069
+Author: Emilio Pozuelo Monfort <address@hidden>
+Date:   Wed May 26 01:27:40 2010 +0200
+
+    Add a file_exec_file_name RPC
+    
+    * hurd/fs.defs (file_exec): Deprecate in favor of...
+    (file_exec_paths): ...this new RPC.
+    * TODO: Update.
+    * doc/hurd.texi: Update RPC name.
+    * hurd/hurd_types.h: Update RPC name.
+    * libdiskfs/boot-start.c: Update RPC name.
+    * configure.ac: Check for presence of RPC stubs file_exec_paths 
exec_exec_paths.
+    * exec/hashexec.c (check_hashbang): When file_exec_paths is available, use 
it
+    instead of file_exec.
+    * startup/startup.c (run, run_for_real, start_child): Likewise.
+    * utils/login.c (main): Likewise.
+    * libfshelp/start-translator-long.c (fshelp_start_translator_long): 
Likewise.
+    * libdiskfs/file-exec.c (diskfs_S_file_exec): Move code to
+    new function diskfs_S_file_exec_paths and call it.
+    (diskfs_S_file_exec_paths): New function, use exec_exec_paths when 
available
+    instead of exec_exec
+    * libnetfs/file-exec.c (netfs_S_file_exec, netfs_S_file_exec_paths): 
Likewise.
+    * trans/fakeroot.c (netfs_S_file_exec, netfs_S_file_exec_paths): Likewise.
+    * libtrivfs/file-exec.c (trivfs_S_file_exec_paths): New function.
+
+diff --git a/TODO b/TODO
+index de2a1997..4361f920 100644
+--- a/TODO
++++ b/TODO
+@@ -131,7 +131,7 @@ See `tasks', the exported task list.
+ 
+ ** libtrivfs
+ *** Allow for read/write/exec to be passed down.
+-*** Implement file_exec when appropriate. !!
++*** Implement file_exec_paths when appropriate. !!
+ *** Provide for the visible owner, etc., to be held in command-line args
+     instead of the underlying node, when it's important. !!
+ 
+diff --git a/configure.ac b/configure.ac
+index 5abedf46..73cfa47f 100644
+--- a/configure.ac
++++ b/configure.ac
+@@ -162,6 +162,8 @@ else
+   VERSIONING=no
+ fi
+ AC_SUBST(VERSIONING)
++# Check if libc contains these functions.
++AC_CHECK_FUNCS(file_exec_paths exec_exec_paths)
+ 
+ 
+ # From glibc HEAD, 2007-11-07.
+diff --git a/doc/hurd.texi b/doc/hurd.texi
+index a9216d1d..e77894a3 100644
+--- a/doc/hurd.texi
++++ b/doc/hurd.texi
+@@ -2736,10 +2736,10 @@ write the file.
+ @node Program Execution
+ @subsection Program Execution
+ 
address@hidden file_exec
address@hidden file_exec_paths
+ Execution of programs on the Hurd is done through fileservers with the
address@hidden RPC.  The fileserver is expected to verify that the
+-user is allowed to execute the file, make whatever modifications to the
address@hidden RPC.  The fileserver is expected to verify that
++the user is allowed to execute the file, make whatever modifications to the
+ ports are necessary for setuid execution, and then invoke the standard
+ execserver found on @file{/servers/exec}.
+ 
+@@ -2751,13 +2751,13 @@ The file must be opened for execution; if it is not, 
@code{EBADF} should
+ be returned.  In addition, at least one of the execute bits must be on.  A
+ failure of this check should result in @code{EACCES}---not
+ @code{ENOEXEC}.  It is not proper for the fileserver ever to respond to
+-the @code{file_exec} RPC with @code{ENOEXEC}.
++the @code{file_exec_paths} RPC with @code{ENOEXEC}.
+ 
+ If either the setuid or setgid bits are set, the server needs to
+ construct a new authentication handle with the additional new ID's.
+-Then all the ports passed to @code{file_exec} need to be reauthenticated
+-with the new handle.  If the fileserver is unable to make the new
+-authentication handle (for example, because it is not running as root)
++Then all the ports passed to @code{file_exec_paths} need to be
++reauthenticated with the new handle.  If the fileserver is unable to make the
++new authentication handle (for example, because it is not running as root)
+ it is not acceptable to return an error; in such a case the server
+ should simply silently fail to implement the setuid/setgid semantics.
+ 
+@@ -2772,7 +2772,7 @@ will not share any file pointers with the port the user 
passed in,
+ opened with @code{O_READ}.  Finally, all the information (mutated
+ appropriately for setuid/setgid) should be sent to the execserver with
+ @code{exec_exec_paths}.  Whatever error code @code{exec_exec_paths}
+-returns should be returned to the caller of @code{file_exec}.
++returns should be returned to the caller of @code{file_exec_paths}.
+ 
+ @node File Locking
+ @subsection File Locking
+diff --git a/exec/hashexec.c b/exec/hashexec.c
+index e8e94844..a7368390 100644
+--- a/exec/hashexec.c
++++ b/exec/hashexec.c
+@@ -423,16 +423,32 @@ check_hashbang (struct execdata *e,
+     /* We cannot open the interpreter file to execute it.  Lose!  */
+     return;
+ 
++#ifdef HAVE_FILE_EXEC_PATHS
+   /* Execute the interpreter program.  */
+-  e->error = file_exec (interp_file,
+-                      oldtask, flags,
+-                      new_argv, new_argvlen, envp, envplen,
+-                      new_dtable ?: dtable, MACH_MSG_TYPE_COPY_SEND,
+-                      new_dtable ? new_dtablesize : dtablesize,
+-                      portarray, MACH_MSG_TYPE_COPY_SEND, nports,
+-                      intarray, nints,
+-                      deallocnames, ndeallocnames,
+-                      destroynames, ndestroynames);
++  e->error = file_exec_paths (interp_file,
++                            oldtask, flags, interp, interp,
++                            new_argv, new_argvlen, envp, envplen,
++                            new_dtable ?: dtable,
++                            MACH_MSG_TYPE_COPY_SEND,
++                            new_dtable ? new_dtablesize : dtablesize,
++                            portarray, MACH_MSG_TYPE_COPY_SEND, nports,
++                            intarray, nints,
++                            deallocnames, ndeallocnames,
++                            destroynames, ndestroynames);
++  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
++  if (e->error == MIG_BAD_ID)
++#endif
++    e->error = file_exec (interp_file,
++                        oldtask, flags,
++                        new_argv, new_argvlen, envp, envplen,
++                        new_dtable ?: dtable, MACH_MSG_TYPE_COPY_SEND,
++                        new_dtable ? new_dtablesize : dtablesize,
++                        portarray, MACH_MSG_TYPE_COPY_SEND, nports,
++                        intarray, nints,
++                        deallocnames, ndeallocnames,
++                        destroynames, ndestroynames);
++
++
+   mach_port_deallocate (mach_task_self (), interp_file);
+   munmap (new_argv, new_argvlen);
+ 
+diff --git a/hurd/fs.defs b/hurd/fs.defs
+index 6c0b5731..14800d9a 100644
+--- a/hurd/fs.defs
++++ b/hurd/fs.defs
+@@ -1,5 +1,6 @@
+ /* Definitions for the filesystem interface.
+-   Copyright (C) 1994,95,96,97,98,99,2002 Free Software Foundation, Inc.
++   Copyright (C) 1994, 1995, 1996, 1997, 1998, 1999, 2002, 2010
++   Free Software Foundation, Inc.
+ 
+ This file is part of the GNU Hurd.
+ 
+@@ -35,7 +36,8 @@ INTR_INTERFACE
+ /* Overlay a task with a file.  Necessary initialization, including
+    authentication changes associated with set[ug]id execution must be
+    handled by the filesystem.  Filesystems normally implement this by
+-   using exec_newtask or exec_loadtask as appropriate.  */
++   using exec_newtask or exec_loadtask as appropriate.
++   Deprecated: use file_exec_paths instead.  */
+ routine file_exec (
+       exec_file: file_t;
+       RPT
+@@ -129,8 +131,8 @@ routine file_lock_stat (
+    (regardless of the current open modes for this port).  ALLOWED is a
+    bitwise OR of O_READ, O_WRITE, and O_EXEC.  This is not necessarily the
+    same as what an open or exec would allow; O_EXEC is set for root even if
+-   no executable bits are on (in which case file_exec should fail) and
+-   O_WRITE is set a directory can be modified, even though it can't be
++   no executable bits are on (in which case file_exec_paths should fail)
++   and O_WRITE is set a directory can be modified, even though it can't be
+    written directly.  */
+ routine file_check_access (
+       file: file_t;
+@@ -355,3 +357,22 @@ routine file_reparent (
+ 
+ skip; /* Was: file_get_children.  */
+ skip; /* Was: file_get_source.  */
++
++/* Overlay a task with a file.  Necessary initialization, including
++   authentication changes associated with set[ug]id execution must be
++   handled by the filesystem.  Filesystems normally implement this by
++   using exec_newtask or exec_loadtask as appropriate.  */
++routine file_exec_paths (
++      exec_file: file_t;
++      RPT
++      exec_task: task_t;
++      flags: int;
++      path: string_t;
++      abspath: string_t;
++      argv: data_t SCP;
++      envp: data_t SCP;
++      fdarray: portarray_t SCP;
++      portarray: portarray_t SCP;
++      intarray: intarray_t SCP;
++      deallocnames: mach_port_name_array_t SCP;
++      destroynames: mach_port_name_array_t SCP);
+diff --git a/hurd/hurd_types.h b/hurd/hurd_types.h
+index 2960a294..9fa9ae29 100644
+--- a/hurd/hurd_types.h
++++ b/hurd/hurd_types.h
+@@ -1,5 +1,6 @@
+ /* C declarations for Hurd server interfaces
+-   Copyright (C) 1993,94,95,96,98,99,2001,02 Free Software Foundation, Inc.
++   Copyright (C) 1993, 1994, 1995, 1996, 1998, 1999, 2001, 2002,
++   2010 Free Software Foundation, Inc.
+ 
+ This file is part of the GNU Hurd.
+ 
+@@ -81,7 +82,7 @@ typedef struct timespec timespec_t;
+ /* Many such parameters and flags are also defined in various libc
+    headers. */
+ 
+-/* Bits for flags in fs.defs:file_exec and exec.defs:exec_* calls: */
++/* Bits for flags in fs.defs:file_exec_paths and exec.defs:exec_* calls: */
+ #define EXEC_NEWTASK  0x00000001 /* Create new task; kill old one.  */
+ #define EXEC_SECURE   0x00000002 /* Use secure values of portarray, etc. */
+ #define EXEC_DEFAULTS 0x00000004 /* Use defaults for unspecified ports.  */
+@@ -350,7 +351,7 @@ typedef int *procinfo_t;
+ #define FSTYPE_MEMFS   0x00000019 /* In-core filesystem */
+ #define FSTYPE_ISO9660 0x0000001a /* ISO9660 */
+ 
+-/* Standard port assignments for file_exec and exec_* */
++/* Standard port assignments for file_exec_paths and exec_* */
+ enum
+   {
+     INIT_PORT_CWDIR,
+@@ -364,7 +365,7 @@ enum
+     INIT_PORT_MAX
+   };
+ 
+-/* Standard ints for file_exec and exec_* */
++/* Standard ints for file_exec_paths and exec_* */
+ enum
+   {
+     INIT_UMASK,
+diff --git a/libdiskfs/boot-start.c b/libdiskfs/boot-start.c
+index 1b76ebde..01548548 100644
+--- a/libdiskfs/boot-start.c
++++ b/libdiskfs/boot-start.c
+@@ -202,7 +202,7 @@ diskfs_start_bootstrap ()
+       diskfs_exec_ctl = MACH_PORT_NULL;       /* Not used after this.  */
+     }
+ 
+-  /* Cache the exec server port for file_exec to use.  */
++  /* Cache the exec server port for file_exec_paths to use.  */
+   _hurd_port_set (&_diskfs_exec_portcell, diskfs_exec);
+ 
+   if (_diskfs_boot_command)
+diff --git a/libdiskfs/file-exec.c b/libdiskfs/file-exec.c
+index e544b14a..3e830161 100644
+--- a/libdiskfs/file-exec.c
++++ b/libdiskfs/file-exec.c
+@@ -1,5 +1,6 @@
+-/* File execution (file_exec RPC) for diskfs servers, using exec server.
+-   Copyright (C) 1993,94,95,96,97,98,2000,02 Free Software Foundation, Inc.
++/* File execution (file_exec_paths RPC) for diskfs servers, using exec server.
++   Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 2000, 2002,
++   2010 Free Software Foundation, Inc.
+ 
+    This file is part of the GNU Hurd.
+ 
+@@ -46,6 +47,41 @@ diskfs_S_file_exec (struct protid *cred,
+                   size_t deallocnameslen,
+                   mach_port_t *destroynames,
+                   size_t destroynameslen)
++{
++  return diskfs_S_file_exec_paths (cred,
++                                 task,
++                                 flags,
++                                 "",
++                                 "",
++                                 argv, argvlen,
++                                 envp, envplen,
++                                 fds, fdslen,
++                                 portarray, portarraylen,
++                                 intarray, intarraylen,
++                                 deallocnames, deallocnameslen,
++                                 destroynames, destroynameslen);
++}
++
++kern_return_t
++diskfs_S_file_exec_paths (struct protid *cred,
++                        task_t task,
++                        int flags,
++                        char *path,
++                        char *abspath,
++                        char *argv,
++                        size_t argvlen,
++                        char *envp,
++                        size_t envplen,
++                        mach_port_t *fds,
++                        size_t fdslen,
++                        mach_port_t *portarray,
++                        size_t portarraylen,
++                        int *intarray,
++                        size_t intarraylen,
++                        mach_port_t *deallocnames,
++                        size_t deallocnameslen,
++                        mach_port_t *destroynames,
++                        size_t destroynameslen)
+ {
+   struct node *np;
+   uid_t uid;
+@@ -136,9 +172,9 @@ diskfs_S_file_exec (struct protid *cred,
+ 
+   if (! err)
+     /* Make a new peropen for the exec server to access the file, since any
+-       seeking the exec server might want to do should not affect the
+-       original peropen on which file_exec was called.  (The new protid for
+-       this peropen clones the caller's iouser to preserve the caller's
++       seeking the exec server might want to do should not affect the original
++       peropen on which file_exec_paths was called.  (The new protid
++       for this peropen clones the caller's iouser to preserve the caller's
+        authentication credentials.)  The new peropen's openmodes must have
+        O_READ even if the caller had only O_EXEC privilege, so the exec
+        server can read the executable file.  We also include O_EXEC so that
+@@ -159,14 +195,31 @@ diskfs_S_file_exec (struct protid *cred,
+       do
+       {
+         right = ports_get_send_right (newpi);
+-        err = exec_exec (execserver,
+-                         right, MACH_MSG_TYPE_COPY_SEND,
+-                         task, flags, argv, argvlen, envp, envplen,
+-                         fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
+-                         portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
+-                         intarray, intarraylen,
+-                         deallocnames, deallocnameslen,
+-                         destroynames, destroynameslen);
++#ifdef HAVE_EXEC_EXEC_PATHS
++        err = exec_exec_paths (execserver,
++                               right, MACH_MSG_TYPE_COPY_SEND,
++                               task, flags, path, abspath,
++                               argv, argvlen, envp, envplen,
++                               fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                               portarray, MACH_MSG_TYPE_COPY_SEND,
++                               portarraylen,
++                               intarray, intarraylen,
++                               deallocnames, deallocnameslen,
++                               destroynames, destroynameslen);
++        /* For backwards compatibility.  Just drop it when we kill
++           exec_exec.  */
++        if (err == MIG_BAD_ID)
++#endif
++          err = exec_exec (execserver,
++                           right, MACH_MSG_TYPE_COPY_SEND,
++                           task, flags, argv, argvlen, envp, envplen,
++                           fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                           portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
++                           intarray, intarraylen,
++                           deallocnames, deallocnameslen,
++                           destroynames, destroynameslen);
++
++
+         mach_port_deallocate (mach_task_self (), right);
+         if (err == MACH_SEND_INVALID_DEST)
+           {
+diff --git a/libfshelp/start-translator-long.c 
b/libfshelp/start-translator-long.c
+index e1aea3c4..707b59ef 100644
+--- a/libfshelp/start-translator-long.c
++++ b/libfshelp/start-translator-long.c
+@@ -1,5 +1,6 @@
+ /*
+-   Copyright (C) 1995,96,99,2000,02, 04 Free Software Foundation, Inc.
++   Copyright (C) 1995, 1996, 1999, 2000, 2002, 2004, 2010
++   Free Software Foundation, Inc.
+    Written by Miles Bader and Michael I. Bushnell.
+ 
+    This file is part of the GNU Hurd.
+@@ -273,12 +274,22 @@ fshelp_start_translator_long (fshelp_open_fn_t 
underlying_open_fn,
+   saveport = ports[INIT_PORT_BOOTSTRAP];
+   ports[INIT_PORT_BOOTSTRAP] = bootstrap;
+ 
++#ifdef HAVE_FILE_EXEC_PATHS
+   /* Try and exec the translator in TASK...  */
+-  err = file_exec (executable, task, EXEC_DEFAULTS,
+-                 argz, argz_len, 0, 0,
+-                 fds, fds_type, fds_len,
+-                 ports, ports_type, ports_len,
+-                 ints, ints_len, 0, 0, 0, 0);
++  err = file_exec_paths (executable, task, EXEC_DEFAULTS, name, name,
++                       argz, argz_len, 0, 0,
++                       fds, fds_type, fds_len,
++                       ports, ports_type, ports_len,
++                       ints, ints_len, 0, 0, 0, 0);
++  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
++  if (err == MIG_BAD_ID)
++#endif
++    err = file_exec (executable, task, EXEC_DEFAULTS,
++                   argz, argz_len, 0, 0,
++                   fds, fds_type, fds_len,
++                   ports, ports_type, ports_len,
++                   ints, ints_len, 0, 0, 0, 0);
++
+   ports_moved = 1;
+ 
+   if (ports_type == MACH_MSG_TYPE_COPY_SEND)
+diff --git a/libnetfs/file-exec.c b/libnetfs/file-exec.c
+index 638f0ae8..8153b1f4 100644
+--- a/libnetfs/file-exec.c
++++ b/libnetfs/file-exec.c
+@@ -1,5 +1,6 @@
+ /*
+-   Copyright (C) 1996,97,2000,01,02 Free Software Foundation, Inc.
++   Copyright (C) 1996, 1997, 2000, 2001, 2002, 2010
++   Free Software Foundation, Inc.
+    Written by Michael I. Bushnell, p/BSG.
+ 
+    This file is part of the GNU Hurd.
+@@ -48,6 +49,41 @@ netfs_S_file_exec (struct protid *cred,
+                  size_t deallocnameslen,
+                  mach_port_t *destroynames,
+                  size_t destroynameslen)
++{
++  return netfs_S_file_exec_paths (cred,
++                                task,
++                                flags,
++                                "",
++                                "",
++                                argv, argvlen,
++                                envp, envplen,
++                                fds, fdslen,
++                                portarray, portarraylen,
++                                intarray, intarraylen,
++                                deallocnames, deallocnameslen,
++                                destroynames, destroynameslen);
++}
++
++kern_return_t
++netfs_S_file_exec_paths (struct protid *cred,
++                       task_t task,
++                       int flags,
++                       char *path,
++                       char *abspath,
++                       char *argv,
++                       size_t argvlen,
++                       char *envp,
++                       size_t envplen,
++                       mach_port_t *fds,
++                       size_t fdslen,
++                       mach_port_t *portarray,
++                       size_t portarraylen,
++                       int *intarray,
++                       size_t intarraylen,
++                       mach_port_t *deallocnames,
++                       size_t deallocnameslen,
++                       mach_port_t *destroynames,
++                       size_t destroynameslen)
+ {
+   struct node *np;
+   error_t err;
+@@ -133,14 +169,31 @@ netfs_S_file_exec (struct protid *cred,
+         if (newpi)
+           {
+             right = ports_get_send_right (newpi);
+-            err = exec_exec (_netfs_exec,
+-                             right, MACH_MSG_TYPE_COPY_SEND,
+-                             task, flags, argv, argvlen, envp, envplen,
+-                             fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
+-                             portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
+-                             intarray, intarraylen,
+-                             deallocnames, deallocnameslen,
+-                             destroynames, destroynameslen);
++#ifdef HAVE_EXEC_EXEC_PATHS
++            err = exec_exec_paths (_netfs_exec,
++                                   right, MACH_MSG_TYPE_COPY_SEND,
++                                   task, flags, path, abspath,
++                                   argv, argvlen, envp, envplen,
++                                   fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                                   portarray, MACH_MSG_TYPE_COPY_SEND,
++                                   portarraylen,
++                                   intarray, intarraylen,
++                                   deallocnames, deallocnameslen,
++                                   destroynames, destroynameslen);
++            /* For backwards compatibility.  Just drop it when we kill
++               exec_exec.  */
++            if (err == MIG_BAD_ID)
++#endif
++              err = exec_exec (_netfs_exec,
++                               right, MACH_MSG_TYPE_COPY_SEND,
++                               task, flags, argv, argvlen, envp, envplen,
++                               fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                               portarray, MACH_MSG_TYPE_COPY_SEND,
++                               portarraylen,
++                               intarray, intarraylen,
++                               deallocnames, deallocnameslen,
++                               destroynames, destroynameslen);
++
+             mach_port_deallocate (mach_task_self (), right);
+             ports_port_deref (newpi);
+           }
+diff --git a/libtrivfs/file-exec.c b/libtrivfs/file-exec.c
+index b353d8a3..a0a2a50c 100644
+--- a/libtrivfs/file-exec.c
++++ b/libtrivfs/file-exec.c
+@@ -1,5 +1,5 @@
+ /*
+-   Copyright (C) 1994,2002 Free Software Foundation, Inc.
++   Copyright (C) 1994, 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
+@@ -41,3 +41,29 @@ trivfs_S_file_exec (trivfs_protid_t exec_file,
+ {
+   return EOPNOTSUPP;
+ }
++
++kern_return_t
++trivfs_S_file_exec_paths (trivfs_protid_t exec_file,
++                        mach_port_t reply,
++                        mach_msg_type_name_t replyPoly,
++                        mach_port_t exec_task,
++                        int flags,
++                        string_t path,
++                        string_t abspath,
++                        data_t argv,
++                        mach_msg_type_number_t argvCnt,
++                        data_t envp,
++                        mach_msg_type_number_t envpCnt,
++                        portarray_t fdarray,
++                        mach_msg_type_number_t fdarrayCnt,
++                        portarray_t portarray,
++                        mach_msg_type_number_t portarrayCnt,
++                        intarray_t intarray,
++                        mach_msg_type_number_t intarrayCnt,
++                        mach_port_array_t deallocnames,
++                        mach_msg_type_number_t deallocnamesCnt,
++                        mach_port_array_t destroynames,
++                        mach_msg_type_number_t destroynamesCnt)
++{
++  return EOPNOTSUPP;
++}
+diff --git a/startup/startup.c b/startup/startup.c
+index 7c3fbf0b..81a67716 100644
+--- a/startup/startup.c
++++ b/startup/startup.c
+@@ -1,7 +1,7 @@
+ /* Start and maintain hurd core servers and system run state
+ 
+    Copyright (C) 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001, 2002,
+-     2005, 2008, 2013 Free Software Foundation, Inc.
++     2005, 2008, 2010, 2013 Free Software Foundation, Inc.
+    This file is part of the GNU Hurd.
+ 
+    The GNU Hurd is free software; you can redistribute it and/or modify
+@@ -402,13 +402,28 @@ run (const char *server, mach_port_t *ports, task_t 
*task,
+             fprintf (stderr, "Pausing for %s\n", prog);
+             getchar ();
+           }
+-        err = file_exec (file, *task, 0,
+-                         argz, argz_len, /* Args.  */
+-                         startup_envz, startup_envz_len,
+-                         default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
+-                         ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
+-                         default_ints, INIT_INT_MAX,
+-                         NULL, 0, NULL, 0);
++#ifdef HAVE_FILE_EXEC_PATHS
++        err = file_exec_paths (file, *task, 0, (char *)prog, (char *)prog,
++                               argz,
++                               argz_len, /* Args.  */
++                               startup_envz, startup_envz_len,
++                               default_dtable,
++                               MACH_MSG_TYPE_COPY_SEND, 3,
++                               ports, MACH_MSG_TYPE_COPY_SEND,
++                               INIT_PORT_MAX,
++                               default_ints, INIT_INT_MAX,
++                               NULL, 0, NULL, 0);
++        /* For backwards compatibility.  Just drop it when we kill
++           file_exec.  */
++        if (err == MIG_BAD_ID)
++#endif
++          err = file_exec (file, *task, 0,
++                           argz, argz_len, /* Args.  */
++                           startup_envz, startup_envz_len,
++                           default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
++                           ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
++                           default_ints, INIT_INT_MAX,
++                           NULL, 0, NULL, 0);
+         if (!err)
+           break;
+ 
+@@ -538,14 +553,27 @@ run_for_real (char *filename, char *args, int arglen, 
mach_port_t ctty,
+     ++progname;
+   else
+     progname = filename;
+-  err = file_exec (file, task, 0,
+-                 args, arglen,
+-                 startup_envz, startup_envz_len,
+-                 default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
+-                 default_ports, MACH_MSG_TYPE_COPY_SEND,
+-                 INIT_PORT_MAX,
+-                 default_ints, INIT_INT_MAX,
+-                 NULL, 0, NULL, 0);
++#ifdef HAVE_FILE_EXEC_PATHS
++  err = file_exec_paths (file, task, 0, filename, filename,
++                       args, arglen,
++                       startup_envz, startup_envz_len,
++                       default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
++                       default_ports, MACH_MSG_TYPE_COPY_SEND,
++                       INIT_PORT_MAX,
++                       default_ints, INIT_INT_MAX,
++                       NULL, 0, NULL, 0);
++  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
++  if (err == MIG_BAD_ID)
++#endif
++    err = file_exec (file, task, 0,
++                   args, arglen,
++                   startup_envz, startup_envz_len,
++                   default_dtable, MACH_MSG_TYPE_COPY_SEND, 3,
++                   default_ports, MACH_MSG_TYPE_COPY_SEND,
++                   INIT_PORT_MAX,
++                   default_ints, INIT_INT_MAX,
++                   NULL, 0, NULL, 0);
++
+   mach_port_deallocate (mach_task_self (), default_ports[INIT_PORT_PROC]);
+   mach_port_deallocate (mach_task_self (), task);
+   if (ctty != MACH_PORT_NULL)
+@@ -1244,13 +1272,26 @@ start_child (const char *prog, char **progargs)
+       getchar ();
+     }
+ 
+-  err = file_exec (file, child_task, 0,
+-                 args, arglen,
+-                 startup_envz, startup_envz_len,
+-                 NULL, MACH_MSG_TYPE_COPY_SEND, 0, /* No fds.  */
+-                 default_ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
+-                 default_ints, INIT_INT_MAX,
+-                 NULL, 0, NULL, 0);
++#ifdef HAVE_FILE_EXEC_PATHS
++  err = file_exec_paths (file, child_task, 0, args, args,
++                       args, arglen,
++                       startup_envz, startup_envz_len,
++                       NULL, MACH_MSG_TYPE_COPY_SEND, 0, /* No fds.  */
++                       default_ports, MACH_MSG_TYPE_COPY_SEND,
++                       INIT_PORT_MAX,
++                       default_ints, INIT_INT_MAX,
++                       NULL, 0, NULL, 0);
++  /* For backwards compatibility.  Just drop it when we kill file_exec.  */
++  if (err == MIG_BAD_ID)
++#endif
++    err = file_exec (file, child_task, 0,
++                   args, arglen,
++                   startup_envz, startup_envz_len,
++                   NULL, MACH_MSG_TYPE_COPY_SEND, 0, /* No fds.  */
++                   default_ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
++                   default_ints, INIT_INT_MAX,
++                   NULL, 0, NULL, 0);
++
+   proc_mark_important (default_ports[INIT_PORT_PROC]);
+   mach_port_deallocate (mach_task_self (), default_ports[INIT_PORT_PROC]);
+   mach_port_deallocate (mach_task_self (), file);
+diff --git a/trans/fakeroot.c b/trans/fakeroot.c
+index df47b00f..711a8565 100644
+--- a/trans/fakeroot.c
++++ b/trans/fakeroot.c
+@@ -882,23 +882,25 @@ netfs_file_get_storage_info (struct iouser *cred,
+ }
+ 
+ kern_return_t
+-netfs_S_file_exec (struct protid *user,
+-                   task_t task,
+-                   int flags,
+-                   char *argv,
+-                   size_t argvlen,
+-                   char *envp,
+-                   size_t envplen,
+-                   mach_port_t *fds,
+-                   size_t fdslen,
+-                   mach_port_t *portarray,
+-                   size_t portarraylen,
+-                   int *intarray,
+-                   size_t intarraylen,
+-                   mach_port_t *deallocnames,
+-                   size_t deallocnameslen,
+-                   mach_port_t *destroynames,
+-                   size_t destroynameslen)
++netfs_S_file_exec_paths (struct protid *user,
++                       task_t task,
++                       int flags,
++                       char *path,
++                       char *abspath,
++                       char *argv,
++                       size_t argvlen,
++                       char *envp,
++                       size_t envplen,
++                       mach_port_t *fds,
++                       size_t fdslen,
++                       mach_port_t *portarray,
++                       size_t portarraylen,
++                       int *intarray,
++                       size_t intarraylen,
++                       mach_port_t *deallocnames,
++                       size_t deallocnameslen,
++                       mach_port_t *destroynames,
++                       size_t destroynameslen)
+ {
+   error_t err;
+   file_t file;
+@@ -917,14 +919,30 @@ netfs_S_file_exec (struct protid *user,
+ 
+   if (!err)
+     {
++#ifdef HAVE_FILE_EXEC_PATHS
+       /* We cannot use MACH_MSG_TYPE_MOVE_SEND because we might need to
+        retry an interrupted call that would have consumed the rights.  */
+-      err = file_exec (netfs_node_netnode (user->po->np)->file,
+-                     task, flags, argv, argvlen,
+-                     envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
+-                     portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
+-                     intarray, intarraylen, deallocnames, deallocnameslen,
+-                     destroynames, destroynameslen);
++      err = file_exec_paths (netfs_node_netnode (user->po->np)->file,
++                           task, flags,
++                           path, abspath,
++                           argv, argvlen,
++                           envp, envplen,
++                           fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                           portarray, MACH_MSG_TYPE_COPY_SEND,
++                           portarraylen,
++                           intarray, intarraylen,
++                           deallocnames, deallocnameslen,
++                           destroynames, destroynameslen);
++      /* For backwards compatibility.  Just drop it when we kill
++       file_exec.  */
++      if (err == MIG_BAD_ID)
++#endif
++      err = file_exec (user->po->np->nn->file, task, flags, argv, argvlen,
++                       envp, envplen, fds, MACH_MSG_TYPE_COPY_SEND, fdslen,
++                       portarray, MACH_MSG_TYPE_COPY_SEND, portarraylen,
++                       intarray, intarraylen, deallocnames, deallocnameslen,
++                       destroynames, destroynameslen);
++
+       mach_port_deallocate (mach_task_self (), file);
+     }
+ 
+@@ -940,6 +958,39 @@ netfs_S_file_exec (struct protid *user,
+   return err;
+ }
+ 
++kern_return_t
++netfs_S_file_exec (struct protid *user,
++                   task_t task,
++                   int flags,
++                   char *argv,
++                   size_t argvlen,
++                   char *envp,
++                   size_t envplen,
++                   mach_port_t *fds,
++                   size_t fdslen,
++                   mach_port_t *portarray,
++                   size_t portarraylen,
++                   int *intarray,
++                   size_t intarraylen,
++                   mach_port_t *deallocnames,
++                   size_t deallocnameslen,
++                   mach_port_t *destroynames,
++                   size_t destroynameslen)
++{
++  return netfs_S_file_exec_paths (user,
++                                task,
++                                flags,
++                                "",
++                                "",
++                                argv, argvlen,
++                                envp, envplen,
++                                fds, fdslen,
++                                portarray, portarraylen,
++                                intarray, intarraylen,
++                                deallocnames, deallocnameslen,
++                                destroynames, destroynameslen);
++}
++
+ error_t
+ netfs_S_io_map (struct protid *user,
+               mach_port_t *rdobj, mach_msg_type_name_t *rdobjtype,
+diff --git a/utils/login.c b/utils/login.c
+index 1a12c3cd..8d0cf92a 100644
+--- a/utils/login.c
++++ b/utils/login.c
+@@ -1,6 +1,7 @@
+ /* Hurdish login
+ 
+-   Copyright (C) 1995,96,97,98,99,2002 Free Software Foundation, Inc.
++   Copyright (C) 1995, 1996, 1997, 1998, 1999, 2002, 2010
++   Free Software Foundation, Inc.
+ 
+    Written by Miles Bader <address@hidden>
+ 
+@@ -882,12 +883,22 @@ main(int argc, char *argv[])
+       }
+     }
+ 
+-  err = file_exec (exec, mach_task_self (), EXEC_DEFAULTS,
+-                 sh_args, sh_args_len, env, env_len,
+-                 fds, MACH_MSG_TYPE_COPY_SEND, 3,
+-                 ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
+-                 ints, INIT_INT_MAX,
+-                 0, 0, 0, 0);
++#ifdef HAVE_FILE_EXEC_PATHS
++  err = file_exec_paths (exec, mach_task_self (), EXEC_DEFAULTS, shell, shell,
++                       sh_args, sh_args_len, env, env_len,
++                       fds, MACH_MSG_TYPE_COPY_SEND, 3,
++                       ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
++                       ints, INIT_INT_MAX,
++                       0, 0, 0, 0);
++  /* Fallback in case the file server hasn't been restarted.  */
++  if (err == MIG_BAD_ID)
++#endif
++    err = file_exec (exec, mach_task_self (), EXEC_DEFAULTS,
++                   sh_args, sh_args_len, env, env_len,
++                   fds, MACH_MSG_TYPE_COPY_SEND, 3,
++                   ports, MACH_MSG_TYPE_COPY_SEND, INIT_PORT_MAX,
++                   ints, INIT_INT_MAX,
++                   0, 0, 0, 0);
+   if (err)
+     error(5, err, "%s", shell);
+ 
diff --git a/debian/patches/git-exec_paths_rpctrace.patch 
b/debian/patches/git-exec_paths_rpctrace.patch
new file mode 100644
index 0000000..2e6a0a4
--- /dev/null
+++ b/debian/patches/git-exec_paths_rpctrace.patch
@@ -0,0 +1,58 @@
+commit 5dbe5dfd27633ebf2cc0e37fa7036fb1a689ef81
+Author: Kalle Olavi Niemitalo <address@hidden>
+Date:   Fri Aug 26 17:23:28 2016 +0300
+
+    rpctrace: Pass prefixed_name to _hurd_exec_paths.
+    
+    This fixes the following test case:
+    
+      mkdir testy
+      echo '#! /bin/bash' > testy/prog
+      echo 'printf "%s\n" "$0"' >> testy/prog
+      chmod +x testy/prog
+      PATH=$(pwd)/testy /bin/rpctrace -E PATH=/usr/bin:/bin -o /dev/null prog
+    
+    Before this patch, the output is:
+    
+      /bin/bash: prog: No such file or directory
+    
+    After this patch, the output is similar to:
+    
+      /home/kalle/testy/prog
+    
+    * utils/rpctrace.c (traced_spawn): Get prefixed_name from
+    file_name_path_lookup and pass it to _hurd_exec_paths.
+
+diff --git a/utils/rpctrace.c b/utils/rpctrace.c
+index 1690ae1b..b4de175c 100644
+--- a/utils/rpctrace.c
++++ b/utils/rpctrace.c
+@@ -1620,8 +1620,9 @@ traced_spawn (char **argv, char **envp)
+   task_t traced_task;
+   struct sender_info *ti;
+   struct receiver_info *receive_ti;
++  char *prefixed_name;
+   file_t file = file_name_path_lookup (argv[0], getenv ("PATH"),
+-                                     O_EXEC, 0, 0);
++                                     O_EXEC, 0, &prefixed_name);
+ 
+   if (file == MACH_PORT_NULL)
+     error (1, errno, "command not found: %s", argv[0]);
+@@ -1662,7 +1663,8 @@ traced_spawn (char **argv, char **envp)
+      the actual task, so the RPCs to map in the program itself do not get
+      traced.  Could have an option to use TASK_WRAPPER here instead.  */
+ #ifdef HAVE__HURD_EXEC_PATHS
+-  err = _hurd_exec_paths (traced_task, file, *argv, *argv, argv, envp);
++  err = _hurd_exec_paths (traced_task, file, prefixed_name ?: *argv,
++                        prefixed_name ?: *argv, argv, envp);
+ #else
+   err = _hurd_exec (traced_task, file, argv, envp);
+ #endif
+@@ -1673,6 +1675,7 @@ traced_spawn (char **argv, char **envp)
+      cannot die and hence our TRACED_TASK ref cannot have been released.  */
+   mach_port_deallocate (mach_task_self (), task_wrapper);
+ 
++  free (prefixed_name);
+   return pid;
+ }
+ 
diff --git a/debian/patches/exec_filename_use.patch 
b/debian/patches/git-exec_paths_use.patch
similarity index 51%
copy from debian/patches/exec_filename_use.patch
copy to debian/patches/git-exec_paths_use.patch
index bc19a01..dbe67b7 100644
--- a/debian/patches/exec_filename_use.patch
+++ b/debian/patches/git-exec_paths_use.patch
@@ -1,37 +1,33 @@
-From bbce8439190738efc9260490fa52f9dfe9600306 Mon Sep 17 00:00:00 2001
-From: Emilio Pozuelo Monfort <address@hidden>
-Date: Wed, 26 May 2010 23:32:16 +0200
-Subject: [PATCH 3/3] Use the new _hurd_exec_file_name function
+commit f7c3556e627bd6ede22255defb55084d21e4dca6
+Author: Emilio Pozuelo Monfort <address@hidden>
+Date:   Wed May 26 23:32:16 2010 +0200
 
-* configure.in: Check for _hurd_exec_file_name.
-* utils/fakeauth.c: Call _hurd_exec_file_name instead of
-_hurd_exec if it's available.
-* utils/rpctrace.c: Likewise.
-* utils/shd.c: Likewise.
----
- configure.in     |    4 ++--
- utils/fakeauth.c |    9 +++++++--
- utils/rpctrace.c |    6 +++++-
- utils/shd.c      |    9 ++++++---
- 4 files changed, 20 insertions(+), 8 deletions(-)
+    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.
 
-Index: hurd-debian/configure.ac
-===================================================================
---- hurd-debian.orig/configure.ac
-+++ hurd-debian/configure.ac
+diff --git a/configure.ac b/configure.ac
+index 73cfa47f..89107a97 100644
+--- a/configure.ac
++++ b/configure.ac
 @@ -163,7 +163,7 @@ else
  fi
  AC_SUBST(VERSIONING)
  # Check if libc contains these functions.
--AC_CHECK_FUNCS(file_exec_file_name exec_exec_file_name)
-+AC_CHECK_FUNCS(file_exec_file_name exec_exec_file_name _hurd_exec_file_name)
+-AC_CHECK_FUNCS(file_exec_paths exec_exec_paths)
++AC_CHECK_FUNCS(file_exec_paths exec_exec_paths _hurd_exec_paths)
  
  
  # From glibc HEAD, 2007-11-07.
-Index: hurd-debian/utils/fakeauth.c
-===================================================================
---- hurd-debian.orig/utils/fakeauth.c
-+++ hurd-debian/utils/fakeauth.c
+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.
@@ -39,48 +35,48 @@ Index: hurd-debian/utils/fakeauth.c
  
     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 differ
+@@ -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_file_name
++     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;
-@@ -422,7 +422,12 @@ believe it has restricted them to differ
+@@ -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_FILE_NAME
-+    err = _hurd_exec_file_name (newtask, execfile, argv[argi],
-+                              &argv[argi], environ);
++#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)
-Index: hurd-debian/utils/rpctrace.c
-===================================================================
---- hurd-debian.orig/utils/rpctrace.c
-+++ hurd-debian/utils/rpctrace.c
-@@ -1742,7 +1742,11 @@ traced_spawn (char **argv, char **envp)
+diff --git a/utils/rpctrace.c b/utils/rpctrace.c
+index 0aecfc42..1690ae1b 100644
+--- a/utils/rpctrace.c
++++ b/utils/rpctrace.c
+@@ -1661,7 +1661,11 @@ traced_spawn (char **argv, char **envp)
    /* Now actually run the command they told us to trace.  We do the exec on
       the actual task, so the RPCs to map in the program itself do not get
       traced.  Could have an option to use TASK_WRAPPER here instead.  */
-+#ifdef HAVE__HURD_EXEC_FILE_NAME
-+  err = _hurd_exec_file_name (traced_task, file, *argv, argv, envp);
++#ifdef HAVE__HURD_EXEC_PATHS
++  err = _hurd_exec_paths (traced_task, file, *argv, *argv, argv, envp);
 +#else
    err = _hurd_exec (traced_task, file, argv, envp);
 +#endif
    if (err)
      error (2, err, "cannot exec `%s'", argv[0]);
  
-Index: hurd-debian/utils/shd.c
-===================================================================
---- hurd-debian.orig/utils/shd.c
-+++ hurd-debian/utils/shd.c
+diff --git a/utils/shd.c b/utils/shd.c
+index 09a4790e..e978061c 100644
+--- a/utils/shd.c
++++ b/utils/shd.c
 @@ -1,5 +1,5 @@
  /*
 -   Copyright (C) 1994,95,99,2002 Free Software Foundation
@@ -88,12 +84,12 @@ Index: hurd-debian/utils/shd.c
  
     This program is free software; you can redistribute it and/or
     modify it under the terms of the GNU General Public License as
-@@ -159,15 +159,18 @@ run (char **argv, int fd0, int fd1)
+@@ -160,15 +160,18 @@ run (char **argv, int fd0, int fd1)
              movefd (fd1, 1, &save1))
            return -1;
  
-+#ifdef HAVE__HURD_EXEC_FILE_NAME
-+        err = _hurd_exec_file_name (task, file, program, argv, environ);
++#ifdef HAVE__HURD_EXEC_PATHS
++        err = _hurd_exec_paths (task, file, program, program, argv, environ);
 +#else
          err = _hurd_exec (task, file, argv, environ);
 -
@@ -105,7 +101,7 @@ Index: hurd-debian/utils/shd.c
          if (err)
            {
 -            error (0, err, "_hurd_exec");
-+            error (0, err, "_hurd_exec_file_name");
++            error (0, err, "_hurd_exec_paths");
              err = task_terminate (task);
              if (err)
                error (0, err, "task_terminate");
diff --git a/debian/patches/exec_set_exe.patch 
b/debian/patches/git-exec_set_exe.patch
similarity index 59%
rename from debian/patches/exec_set_exe.patch
rename to debian/patches/git-exec_set_exe.patch
index 8462221..3de584c 100644
--- a/debian/patches/exec_set_exe.patch
+++ b/debian/patches/git-exec_set_exe.patch
@@ -1,42 +1,63 @@
-Implement /proc/<pid>/exe by adding proc_set/get_exe to the proc server, making
-exec call proc_set_exe, and libps call proc_get_exe. procfs can then just
-retrieve the information to make the "exe" symlink.
+commit 104f3121f8005b426d4df77b2420cfe5837033d1
+Author: Samuel Thibault <address@hidden>
+Date:   Mon Jan 8 23:00:37 2018 +0100
 
-* hurd/process.defs (proc_set_exe, proc_get_exe): New RPCs.
-* hurd/process_request.defs: Likewise.
-* hurd/process_reply.defs: Add skips for proc_set_exe and proc_get_exe RPCs.
-* proc/proc.h (struct proc): Add `exe' field.
-* proc/info.c (S_proc_set_exe, S_proc_get_exe): New functions.
-* proc/mgt.c (process_has_exited): Free p->exe.
-(S_proc_child): Duplicate parent `exe' into child's `exe'.
-* exec/exec.c (do_exec): Call proc_set_exe when a filename is available.
-* libps/ps.h (struct proc_stat): Add `exe_vm_alloced', `exe', and `exe_len'
-field.
-(PSTAT_EXE): New macro.
-(PSTAT_USER_BASE): Change value to make room.
-(proc_stat_exe, proc_stat_exe_len): New macros.
-* libps/procstat.c (proc_stat_set_flags): Handle PSTAT_EXE case by calling
-proc_get_exe.
-* libps/spec.c (ps_get_exe): New function.
-(ps_exe_getter): New structure.
-(ps_fmt_spec): Add "Exe" specification.
-* procfs/process.c (process_file_symlink_make_node, process_file_gc_exe): New
-functions.
-(procfs_dir_entry): Add "exe" entry.
-* startup/startup.c (launch_core_servers): Set exe paths for startup, auth,
-proc, and fs servers.
-(frob_kernel_process): Set exe path for kernel task.
-(S_startup_essential_task): Set exe path for exec server.
+    Implement /proc/<pid>/exe
+    
+    by adding proc_set/get_exe to the proc server, making
+    exec call proc_set_exe, and libps call proc_get_exe. procfs can then just
+    retrieve the information to make the "exe" symlink.
+    
+    * hurd/process.defs (proc_set_exe, proc_get_exe): New RPCs.
+    * hurd/process_request.defs: Likewise.
+    * hurd/process_reply.defs: Add skips for proc_set_exe and proc_get_exe 
RPCs.
+    * proc/proc.h (struct proc): Add `exe' field.
+    * proc/info.c (S_proc_set_exe, S_proc_get_exe): New functions.
+    * proc/mgt.c (process_has_exited): Free p->exe.
+    (S_proc_child): Duplicate parent `exe' into child's `exe'.
+    * exec/exec.c (do_exec): Call proc_set_exe when a filename is available.
+    * libps/ps.h (struct proc_stat): Add `exe_vm_alloced', `exe', and `exe_len'
+    field.
+    (PSTAT_EXE): New macro.
+    (PSTAT_USER_BASE): Change value to make room.
+    (proc_stat_exe, proc_stat_exe_len): New macros.
+    * libps/procstat.c (proc_stat_set_flags): Handle PSTAT_EXE case by calling
+    proc_get_exe.
+    * libps/spec.c (ps_get_exe): New function.
+    (ps_exe_getter): New structure.
+    (ps_fmt_spec): Add "Exe" specification.
+    * procfs/process.c (process_file_symlink_make_node, process_file_gc_exe): 
New
+    functions.
+    (procfs_dir_entry): Add "exe" entry.
+    * startup/startup.c (launch_core_servers): Set exe paths for startup, auth,
+    proc, and fs servers.
+    (frob_kernel_process): Set exe path for kernel task.
+    (S_startup_essential_task): Set exe path for exec server.
 
-Index: hurd-debian/hurd/process.defs
-===================================================================
---- hurd-debian.orig/hurd/process.defs
-+++ hurd-debian/hurd/process.defs
-@@ -413,3 +413,14 @@ routine proc_get_code (
- routine proc_make_task_namespace (
+diff --git a/exec/exec.c b/exec/exec.c
+index 94f0a733..e9590911 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
+@@ -1314,6 +1314,9 @@ do_exec (file_t file,
+       if (e.error)
+       goto out;
+ 
++      if (abspath)
++      proc_set_exe (boot->portarray[INIT_PORT_PROC], abspath);
++
+       set_name (newtask, argv, pid);
+ 
+       e.error = proc_set_entry (boot->portarray[INIT_PORT_PROC],
+diff --git a/hurd/process.defs b/hurd/process.defs
+index 725326a4..d515a46d 100644
+--- a/hurd/process.defs
++++ b/hurd/process.defs
+@@ -414,8 +414,16 @@ routine proc_make_task_namespace (
        process: process_t;
        notify: mach_port_send_t);
-+
+ 
+-skip; /* proc_set_exe */
+-skip; /* proc_get_exe */
 +/* Set the process binary executable path.  */
 +routine proc_set_exe (
 +      process: process_t;
@@ -47,43 +68,117 @@ Index: hurd-debian/hurd/process.defs
 +      process: process_t;
 +      which: pid_t;
 +      out path: string_t);
-Index: hurd-debian/hurd/process_request.defs
-===================================================================
---- hurd-debian.orig/hurd/process_request.defs
-+++ hurd-debian/hurd/process_request.defs
-@@ -417,3 +417,6 @@ simpleroutine proc_make_task_namespace_r
-       process: process_t;
-       ureplyport reply: reply_port_t;
-       notify: mach_port_send_t);
+ 
+ /* Set the locations of the executable entry.  */
+ routine proc_set_entry (
+diff --git a/libps/procstat.c b/libps/procstat.c
+index f6420eea..d0423410 100644
+--- a/libps/procstat.c
++++ b/libps/procstat.c
+@@ -956,6 +956,23 @@ proc_stat_set_flags (struct proc_stat *ps, ps_flags_t 
flags)
+       }
+     }
+ 
++  /* The process's path to binary executable */
++  if (NEED (PSTAT_EXE, PSTAT_PID))
++    {
++      ps->exe = malloc (sizeof(string_t));
++      if (ps->exe)
++      {
++        if (proc_get_exe (server, ps->pid, ps->exe))
++          free (ps->exe);
++        else
++          {
++            ps->exe_len = strlen(ps->exe);
++            have |= PSTAT_EXE;
++            ps->exe_vm_alloced = 0;
++          }
++      }
++    }
 +
-+skip; /* proc_set_exe  */
-+skip; /* proc_get_exe  */
-Index: hurd-debian/hurd/process_reply.defs
-===================================================================
---- hurd-debian.orig/hurd/process_reply.defs
-+++ hurd-debian/hurd/process_reply.defs
-@@ -194,3 +194,5 @@ simpleroutine proc_get_code_reply (
-       end_code: vm_address_t);
+   /* The ctty id port; note that this is just a magic cookie;
+      we use it to fetch a port to the actual terminal -- it's not useful for
+      much else.  */
+diff --git a/libps/ps.h b/libps/ps.h
+index 3ee142d0..2725b1f4 100644
+--- a/libps/ps.h
++++ b/libps/ps.h
+@@ -272,6 +272,7 @@ struct proc_stat
+   unsigned thread_waits_vm_alloced : 1;
+   unsigned args_vm_alloced : 1;
+   unsigned env_vm_alloced : 1;
++  unsigned exe_vm_alloced : 1;
  
- skip; /* proc_make_task_namespace  */
-+skip; /* proc_set_exe  */
-+skip; /* proc_get_exe  */
-Index: hurd-debian/proc/proc.h
-===================================================================
---- hurd-debian.orig/proc/proc.h
-+++ hurd-debian/proc/proc.h
-@@ -68,6 +68,7 @@ struct proc
-   pthread_cond_t p_wakeup;
+   /* Various libc ports:  */
  
-   /* Miscellaneous information */
-+  char *exe;                  /* path to binary executable */
-   vm_address_t p_argv, p_envp;
-   vm_address_t start_code;    /* all executable segments are in this range */
-   vm_address_t end_code;
-Index: hurd-debian/proc/info.c
-===================================================================
---- hurd-debian.orig/proc/info.c
-+++ hurd-debian/proc/info.c
+@@ -305,6 +306,11 @@ struct proc_stat
+   size_t env_len;
+ 
+   unsigned num_ports;
++
++  /* The path to process's binary executable.  */
++  char *exe;
++  /* The length of EXE.  */
++  size_t exe_len;
+ };
+ 
+ /* Proc_stat flag bits; each bit is set in the FLAGS field if that
+@@ -344,12 +350,13 @@ struct proc_stat
+ #define PSTAT_HOOK          0x800000 /* Has a non-zero hook */
+ #define PSTAT_NUM_PORTS      0x4000000 /* Number of Mach ports in the task */
+ #define PSTAT_TIMES          0x8000000 /* Task/thread user and system times */
++#define PSTAT_EXE           0x10000000 /* Path to binary executable */
+ 
+ /* Flag bits that don't correspond precisely to any field.  */
+ #define PSTAT_NO_MSGPORT     0x1000000 /* Don't use the msgport at all */
+ 
+ /* Bits from PSTAT_USER_BASE on up are available for user-use.  */
+-#define PSTAT_USER_BASE      0x10000000
++#define PSTAT_USER_BASE      0x20000000
+ #define PSTAT_USER_MASK      ~(PSTAT_USER_BASE - 1)
+ 
+ /* If the PSTAT_STATE flag is set, then the proc_stats state field holds a
+@@ -448,6 +455,8 @@ extern char *proc_stat_state_tags;
+ #define proc_stat_tty(ps) ((ps)->tty)
+ #define proc_stat_task_events_info(ps) ((ps)->task_events_info)
+ #define proc_stat_num_ports(ps) ((ps)->num_ports)
++#define proc_stat_exe(ps) ((ps)->exe)
++#define proc_stat_exe_len(ps) ((ps)->exe_len)
+ #define proc_stat_has(ps, needs) (((ps)->flags & needs) == needs)
+ 
+ /* True if PS refers to a thread and not a process.  */
+diff --git a/libps/spec.c b/libps/spec.c
+index 5e540f87..4760c431 100644
+--- a/libps/spec.c
++++ b/libps/spec.c
+@@ -358,6 +358,14 @@ ps_get_num_ports (struct proc_stat *ps)
+ const struct ps_getter ps_num_ports_getter =
+ {"num_ports", PSTAT_NUM_PORTS, (vf) ps_get_num_ports};
+ 
++static void
++ps_get_exe (struct proc_stat *ps, char **exe_p, int *exe_len_p)
++{
++  *exe_p = proc_stat_exe (ps);
++  *exe_len_p = proc_stat_exe_len (ps);
++}
++const struct ps_getter ps_exe_getter =
++{"exe", PSTAT_EXE, ps_get_exe};
+ /* ---------------------------------------------------------------- */
+ /* some printing functions */
+ 
+@@ -1166,6 +1174,8 @@ static const struct ps_fmt_spec specs[] =
+    &ps_zero_fills_getter,  ps_emit_int,           ps_cmp_ints,   
ps_nominal_zint},
+   {"Ports",   0,      -5, -1, 0,
+    &ps_num_ports_getter,       ps_emit_int,       ps_cmp_ints,   0},
++  {"Exe",     0,       0, -1, 0,
++   &ps_exe_getter,       ps_emit_string,  ps_cmp_strings,ps_nominal_string},
+   {0}
+ };
+ 
+diff --git a/proc/info.c b/proc/info.c
+index 3c1bf6d3..6ab9f3fa 100644
+--- a/proc/info.c
++++ b/proc/info.c
 @@ -24,6 +24,7 @@
  #include <sys/mman.h>
  #include <hurd/hurd_types.h>
@@ -92,7 +187,7 @@ Index: hurd-debian/proc/info.c
  #include <errno.h>
  #include <string.h>
  #include <sys/resource.h>
-@@ -799,3 +800,43 @@ S_proc_getnports (struct proc *callerp,
+@@ -1017,3 +1018,43 @@ S_proc_getnports (struct proc *callerp,
  
    return err;
  }
@@ -136,10 +231,10 @@ Index: hurd-debian/proc/info.c
 +  return 0;
 +}
 +
-Index: hurd-debian/proc/mgt.c
-===================================================================
---- hurd-debian.orig/proc/mgt.c
-+++ hurd-debian/proc/mgt.c
+diff --git a/proc/mgt.c b/proc/mgt.c
+index 354f3784..d92bf528 100644
+--- a/proc/mgt.c
++++ b/proc/mgt.c
 @@ -223,6 +223,8 @@ S_proc_child (struct proc *parentp,
        childp->start_code = parentp->start_code;
        childp->end_code = parentp->end_code;
@@ -149,7 +244,7 @@ Index: hurd-debian/proc/mgt.c
  
    if (MACH_PORT_VALID (parentp->p_task_namespace))
      {
-@@ -770,6 +772,8 @@ process_has_exited (struct proc *p)
+@@ -860,6 +862,8 @@ process_has_exited (struct proc *p)
  
    if (!--p->p_login->l_refcnt)
      free (p->p_login);
@@ -158,132 +253,27 @@ Index: hurd-debian/proc/mgt.c
  
    ids_rele (p->p_id);
  
-Index: hurd-debian/exec/exec.c
-===================================================================
---- hurd-debian.orig/exec/exec.c
-+++ hurd-debian/exec/exec.c
-@@ -1312,6 +1312,9 @@ do_exec (file_t file,
-       if (e.error)
-       goto out;
- 
-+      if (filename)
-+      proc_set_exe (boot->portarray[INIT_PORT_PROC], filename);
-+
-       set_name (newtask, argv, pid);
-     }
-   else
-Index: hurd-debian/libps/ps.h
-===================================================================
---- hurd-debian.orig/libps/ps.h
-+++ hurd-debian/libps/ps.h
-@@ -272,6 +272,7 @@ struct proc_stat
-   unsigned thread_waits_vm_alloced : 1;
-   unsigned args_vm_alloced : 1;
-   unsigned env_vm_alloced : 1;
-+  unsigned exe_vm_alloced : 1;
- 
-   /* Various libc ports:  */
- 
-@@ -305,6 +306,11 @@ struct proc_stat
-   size_t env_len;
- 
-   unsigned num_ports;
-+
-+  /* The path to process's binary executable.  */
-+  char *exe;
-+  /* The length of EXE.  */
-+  size_t exe_len;
- };
- 
- /* Proc_stat flag bits; each bit is set in the FLAGS field if that
-@@ -344,12 +350,13 @@ struct proc_stat
- #define PSTAT_HOOK          0x800000 /* Has a non-zero hook */
- #define PSTAT_NUM_PORTS      0x4000000 /* Number of Mach ports in the task */
- #define PSTAT_TIMES          0x8000000 /* Task/thread user and system times */
-+#define PSTAT_EXE           0x10000000 /* Path to binary executable */
- 
- /* Flag bits that don't correspond precisely to any field.  */
- #define PSTAT_NO_MSGPORT     0x1000000 /* Don't use the msgport at all */
- 
- /* Bits from PSTAT_USER_BASE on up are available for user-use.  */
--#define PSTAT_USER_BASE      0x10000000
-+#define PSTAT_USER_BASE      0x20000000
- #define PSTAT_USER_MASK      ~(PSTAT_USER_BASE - 1)
- 
- /* If the PSTAT_STATE flag is set, then the proc_stats state field holds a
-@@ -448,6 +455,8 @@ extern char *proc_stat_state_tags;
- #define proc_stat_tty(ps) ((ps)->tty)
- #define proc_stat_task_events_info(ps) ((ps)->task_events_info)
- #define proc_stat_num_ports(ps) ((ps)->num_ports)
-+#define proc_stat_exe(ps) ((ps)->exe)
-+#define proc_stat_exe_len(ps) ((ps)->exe_len)
- #define proc_stat_has(ps, needs) (((ps)->flags & needs) == needs)
- 
- /* True if PS refers to a thread and not a process.  */
-Index: hurd-debian/libps/procstat.c
-===================================================================
---- hurd-debian.orig/libps/procstat.c
-+++ hurd-debian/libps/procstat.c
-@@ -956,6 +956,23 @@ proc_stat_set_flags (struct proc_stat *p
-       }
-     }
- 
-+  /* The process's path to binary executable */
-+  if (NEED (PSTAT_EXE, PSTAT_PID))
-+    {
-+      ps->exe = malloc (sizeof(string_t));
-+      if (ps->exe)
-+      {
-+        if (proc_get_exe (server, ps->pid, ps->exe))
-+          free (ps->exe);
-+        else
-+          {
-+            ps->exe_len = strlen(ps->exe);
-+            have |= PSTAT_EXE;
-+            ps->exe_vm_alloced = 0;
-+          }
-+      }
-+    }
-+
-   /* The ctty id port; note that this is just a magic cookie;
-      we use it to fetch a port to the actual terminal -- it's not useful for
-      much else.  */
-Index: hurd-debian/libps/spec.c
-===================================================================
---- hurd-debian.orig/libps/spec.c
-+++ hurd-debian/libps/spec.c
-@@ -357,6 +357,14 @@ ps_get_num_ports (struct proc_stat *ps)
- const struct ps_getter ps_num_ports_getter =
- {"num_ports", PSTAT_NUM_PORTS, (vf) ps_get_num_ports};
- 
-+static void
-+ps_get_exe (struct proc_stat *ps, char **exe_p, int *exe_len_p)
-+{
-+  *exe_p = proc_stat_exe (ps);
-+  *exe_len_p = proc_stat_exe_len (ps);
-+}
-+const struct ps_getter ps_exe_getter =
-+{"exe", PSTAT_EXE, ps_get_exe};
- /* ---------------------------------------------------------------- */
- /* some printing functions */
+diff --git a/proc/proc.h b/proc/proc.h
+index b33845d9..a974f629 100644
+--- a/proc/proc.h
++++ b/proc/proc.h
+@@ -68,6 +68,7 @@ struct proc
+   pthread_cond_t p_wakeup;
  
-@@ -1165,6 +1173,8 @@ static const struct ps_fmt_spec specs[]
-    &ps_zero_fills_getter,  ps_emit_int,           ps_cmp_ints,   
ps_nominal_zint},
-   {"Ports",   0,      -5, -1, 0,
-    &ps_num_ports_getter,       ps_emit_int,       ps_cmp_ints,   0},
-+  {"Exe",     0,       0, -1, 0,
-+   &ps_exe_getter,       ps_emit_string,  ps_cmp_strings,ps_nominal_string},
-   {0}
- };
+   /* Miscellaneous information */
++  char *exe;                  /* path to binary executable */
+   vm_address_t p_argv, p_envp;
+   vm_address_t start_code;    /* all executable segments are in this range */
+   vm_address_t end_code;
+diff --git a/procfs/process.c b/procfs/process.c
+index ece37b70..59653b24 100644
+--- a/procfs/process.c
++++ b/procfs/process.c
+@@ -94,6 +94,19 @@ static int args_filename_length (const char *name)
  
-Index: hurd-debian/procfs/process.c
-===================================================================
---- hurd-debian.orig/procfs/process.c
-+++ hurd-debian/procfs/process.c
-@@ -95,6 +95,19 @@ static int args_filename_length (const c
  /* Actual content generators */
  
- static ssize_t
++static ssize_t
 +process_file_gc_exe (struct proc_stat *ps, char **contents)
 +{
 +  if (proc_stat_exe_len (ps) == 0)
@@ -296,11 +286,10 @@ Index: hurd-debian/procfs/process.c
 +  return proc_stat_exe_len(ps);
 +}
 +
-+static ssize_t
+ static ssize_t
  process_file_gc_cmdline (struct proc_stat *ps, char **contents)
  {
-   *contents = proc_stat_args(ps);
-@@ -410,6 +423,14 @@ process_file_make_node (void *dir_hook,
+@@ -410,6 +423,14 @@ process_file_make_node (void *dir_hook, const void 
*entry_hook)
    return np;
  }
  
@@ -315,10 +304,11 @@ Index: hurd-debian/procfs/process.c
  /* Stat needs its own constructor in order to set its mode according to
     the --stat-mode command-line option.  */
  static struct node *
-@@ -425,6 +446,17 @@ process_stat_make_node (void *dir_hook,
+@@ -424,6 +445,17 @@ process_stat_make_node (void *dir_hook, const void 
*entry_hook)
+ /* Implementation of the process directory per se.  */
  
  static struct procfs_dir_entry entries[] = {
-   {
++  {
 +    .name = "exe",
 +    .hook = & (struct process_file_desc) {
 +      .get_contents = process_file_gc_exe,
@@ -329,15 +319,14 @@ Index: hurd-debian/procfs/process.c
 +      .make_node = process_file_symlink_make_node,
 +    },
 +  },
-+  {
+   {
      .name = "cmdline",
      .hook = & (struct process_file_desc) {
-       .get_contents = process_file_gc_cmdline,
-Index: hurd-debian/startup/startup.c
-===================================================================
---- hurd-debian.orig/startup/startup.c
-+++ hurd-debian/startup/startup.c
-@@ -763,6 +763,7 @@ launch_core_servers (void)
+diff --git a/startup/startup.c b/startup/startup.c
+index 81a67716..9a06f7c2 100644
+--- a/startup/startup.c
++++ b/startup/startup.c
+@@ -832,6 +832,7 @@ launch_core_servers (void)
    assert_perror_backtrace (err);
    err = proc_mark_exec (procserver);
    assert_perror_backtrace (err);
@@ -345,7 +334,7 @@ Index: hurd-debian/startup/startup.c
  
    /* Declare that the filesystem and auth are our children. */
    err = proc_child (procserver, fstask);
-@@ -776,6 +777,7 @@ launch_core_servers (void)
+@@ -845,6 +846,7 @@ launch_core_servers (void)
    assert_perror_backtrace (err);
    err = proc_mark_exec (authproc);
    assert_perror_backtrace (err);
@@ -353,7 +342,7 @@ Index: hurd-debian/startup/startup.c
  
    err = install_as_translator ();
    if (err)
-@@ -816,6 +818,7 @@ launch_core_servers (void)
+@@ -883,6 +885,7 @@ launch_core_servers (void)
      {
        proc_mark_important (procproc);
        proc_mark_exec (procproc);
@@ -361,7 +350,7 @@ Index: hurd-debian/startup/startup.c
        mach_port_deallocate (mach_task_self (), procproc);
      }
  
-@@ -831,6 +834,7 @@ launch_core_servers (void)
+@@ -898,6 +901,7 @@ launch_core_servers (void)
    assert_perror_backtrace (err);
    err = proc_mark_exec (fsproc);
    assert_perror_backtrace (err);
@@ -369,7 +358,7 @@ Index: hurd-debian/startup/startup.c
  
    fprintf (stderr, ".\n");
  
-@@ -974,6 +978,8 @@ frob_kernel_process (void)
+@@ -1045,6 +1049,8 @@ frob_kernel_process (void)
    err = record_essential_task ("kernel", task);
    assert_perror_backtrace (err);
  
@@ -378,11 +367,11 @@ Index: hurd-debian/startup/startup.c
    err = task_get_bootstrap_port (task, &kbs);
    assert_perror_backtrace (err);
    if (kbs == MACH_PORT_NULL)
-@@ -1385,6 +1391,7 @@ S_startup_essential_task (mach_port_t se
+@@ -1455,6 +1461,7 @@ S_startup_essential_task (mach_port_t server,
            mach_port_t execproc;
            proc_task2proc (procserver, task, &execproc);
            proc_mark_important (execproc);
-+        proc_set_exe (execproc, "/hurd/exec");
++          proc_set_exe (execproc, "/hurd/exec");
          }
        else if (!strcmp (name, "proc"))
        procinit = 1;
diff --git a/debian/patches/git-pie-core b/debian/patches/git-pie-core
index 2537546..9e65dd7 100644
--- a/debian/patches/git-pie-core
+++ b/debian/patches/git-pie-core
@@ -1,3 +1,46 @@
+commit a8fecd7be76342fea85b5129d450ab01738dcbdf
+Author: Samuel Thibault <address@hidden>
+Date:   Mon Dec 11 02:00:34 2017 +0100
+
+    Reserve IDs for proc_set_exe and proc_get_exe
+    
+    * hurd/process.defs: Reserve IDs for proc_set_exe and proc_get_exe
+    * hurd/process_reply.defs: Likewise.
+    * hurd/process_request.defs: Likewise.
+
+diff --git a/hurd/process.defs b/hurd/process.defs
+index d724e20d..c395705d 100644
+--- a/hurd/process.defs
++++ b/hurd/process.defs
+@@ -413,3 +413,6 @@ routine proc_get_code (
+ routine proc_make_task_namespace (
+       process: process_t;
+       notify: mach_port_send_t);
++
++skip; /* proc_set_exe */
++skip; /* proc_get_exe */
+diff --git a/hurd/process_reply.defs b/hurd/process_reply.defs
+index 2fc21c92..84621e8a 100644
+--- a/hurd/process_reply.defs
++++ b/hurd/process_reply.defs
+@@ -194,3 +194,6 @@ simpleroutine proc_get_code_reply (
+       end_code: vm_address_t);
+ 
+ skip; /* proc_make_task_namespace  */
++
++skip; /* proc_set_exe */
++skip; /* proc_get_exe */
+diff --git a/hurd/process_request.defs b/hurd/process_request.defs
+index 20e0ee14..e5518f06 100644
+--- a/hurd/process_request.defs
++++ b/hurd/process_request.defs
+@@ -417,3 +417,6 @@ simpleroutine proc_make_task_namespace_request (
+       process: process_t;
+       ureplyport reply: reply_port_t;
+       notify: mach_port_send_t);
++
++skip; /* proc_set_exe */
++skip; /* proc_get_exe */
 commit 0ca198f1f90071a054287c204a3fd1b4ea315e18
 Author: Samuel Thibault <address@hidden>
 Date:   Mon Dec 11 02:32:26 2017 +0100
@@ -14,11 +57,11 @@ Date:   Mon Dec 11 02:32:26 2017 +0100
     * exec/elfcore.c (dump_core): Add at_entry note, call proc_get_entry to
     get it, and write it with WRITE_NOTE.
 
-Index: hurd-debian/exec/elfcore.c
-===================================================================
---- hurd-debian.orig/exec/elfcore.c
-+++ hurd-debian/exec/elfcore.c
-@@ -331,6 +331,7 @@ dump_core (task_t task, file_t file, off
+diff --git a/exec/elfcore.c b/exec/elfcore.c
+index 12ecf34f..2dd499bf 100644
+--- a/exec/elfcore.c
++++ b/exec/elfcore.c
+@@ -331,6 +331,7 @@ dump_core (task_t task, file_t file, off_t corelimit,
    {
      DEFINE_NOTE (psinfo_t) psinfo;
      DEFINE_NOTE (pstatus_t) pstatus;
@@ -26,7 +69,7 @@ Index: hurd-debian/exec/elfcore.c
      int flags = PI_FETCH_TASKINFO | PI_FETCH_THREADS | PI_FETCH_THREAD_BASIC;
      char *waits = 0;
      mach_msg_type_number_t num_waits = 0;
-@@ -410,6 +411,18 @@ dump_core (task_t task, file_t file, off
+@@ -410,6 +411,18 @@ dump_core (task_t task, file_t file, off_t corelimit,
            err = proc_get_arg_locations (proc,
                                          &psinfo.data.pr_argv,
                                          &psinfo.data.pr_envp);
@@ -45,12 +88,12 @@ Index: hurd-debian/exec/elfcore.c
            mach_port_deallocate (mach_task_self (), proc);
          }
        {
-Index: hurd-debian/exec/exec.c
-===================================================================
---- hurd-debian.orig/exec/exec.c
-+++ hurd-debian/exec/exec.c
-@@ -1318,6 +1318,11 @@ do_exec (file_t file,
-       proc_set_exe (boot->portarray[INIT_PORT_PROC], filename);
+diff --git a/exec/exec.c b/exec/exec.c
+index d78c54c5..2d74ee1c 100644
+--- a/exec/exec.c
++++ b/exec/exec.c
+@@ -1234,6 +1234,11 @@ do_exec (file_t file,
+       goto out;
  
        set_name (newtask, argv, pid);
 +
@@ -61,14 +104,14 @@ Index: hurd-debian/exec/exec.c
      }
    else
      set_name (newtask, argv, 0);
-Index: hurd-debian/hurd/process.defs
-===================================================================
---- hurd-debian.orig/hurd/process.defs
-+++ hurd-debian/hurd/process.defs
-@@ -424,3 +424,13 @@ routine proc_get_exe (
-       process: process_t;
-       which: pid_t;
-       out path: string_t);
+diff --git a/hurd/process.defs b/hurd/process.defs
+index c395705d..725326a4 100644
+--- a/hurd/process.defs
++++ b/hurd/process.defs
+@@ -416,3 +416,13 @@ routine proc_make_task_namespace (
+ 
+ skip; /* proc_set_exe */
+ skip; /* proc_get_exe */
 +
 +/* Set the locations of the executable entry.  */
 +routine proc_set_entry (
@@ -79,33 +122,33 @@ Index: hurd-debian/hurd/process.defs
 +routine proc_get_entry (
 +      process: process_t;
 +      out entry: vm_address_t);
-Index: hurd-debian/hurd/process_reply.defs
-===================================================================
---- hurd-debian.orig/hurd/process_reply.defs
-+++ hurd-debian/hurd/process_reply.defs
-@@ -196,3 +196,6 @@ simpleroutine proc_get_code_reply (
- skip; /* proc_make_task_namespace  */
- skip; /* proc_set_exe  */
- skip; /* proc_get_exe  */
+diff --git a/hurd/process_reply.defs b/hurd/process_reply.defs
+index 84621e8a..2eefcc37 100644
+--- a/hurd/process_reply.defs
++++ b/hurd/process_reply.defs
+@@ -197,3 +197,6 @@ skip; /* proc_make_task_namespace  */
+ 
+ skip; /* proc_set_exe */
+ skip; /* proc_get_exe */
 +
 +skip; /* proc_set_entry */
 +skip; /* proc_get_entry */
-Index: hurd-debian/hurd/process_request.defs
-===================================================================
---- hurd-debian.orig/hurd/process_request.defs
-+++ hurd-debian/hurd/process_request.defs
-@@ -420,3 +420,6 @@ simpleroutine proc_make_task_namespace_r
+diff --git a/hurd/process_request.defs b/hurd/process_request.defs
+index e5518f06..fc9127ab 100644
+--- a/hurd/process_request.defs
++++ b/hurd/process_request.defs
+@@ -420,3 +420,6 @@ simpleroutine proc_make_task_namespace_request (
  
- skip; /* proc_set_exe  */
- skip; /* proc_get_exe  */
+ skip; /* proc_set_exe */
+ skip; /* proc_get_exe */
 +
 +skip; /* proc_set_entry */
 +skip; /* proc_get_entry */
-Index: hurd-debian/proc/mgt.c
-===================================================================
---- hurd-debian.orig/proc/mgt.c
-+++ hurd-debian/proc/mgt.c
-@@ -350,6 +350,24 @@ S_proc_get_arg_locations (struct proc *p
+diff --git a/proc/mgt.c b/proc/mgt.c
+index 750073a0..354f3784 100644
+--- a/proc/mgt.c
++++ b/proc/mgt.c
+@@ -348,6 +348,24 @@ S_proc_get_arg_locations (struct proc *p,
    return 0;
  }
  
@@ -130,11 +173,11 @@ Index: hurd-debian/proc/mgt.c
  /* Implement proc_dostop as described in <hurd/process.defs>. */
  kern_return_t
  S_proc_dostop (struct proc *p,
-Index: hurd-debian/proc/proc.h
-===================================================================
---- hurd-debian.orig/proc/proc.h
-+++ hurd-debian/proc/proc.h
-@@ -72,6 +72,7 @@ struct proc
+diff --git a/proc/proc.h b/proc/proc.h
+index 333e8840..b33845d9 100644
+--- a/proc/proc.h
++++ b/proc/proc.h
+@@ -71,6 +71,7 @@ struct proc
    vm_address_t p_argv, p_envp;
    vm_address_t start_code;    /* all executable segments are in this range */
    vm_address_t end_code;
@@ -142,15 +185,3 @@ Index: hurd-debian/proc/proc.h
    int p_status;                       /* to return via wait */
    int p_sigcode;
    struct rusage p_rusage;     /* my usage if I'm dead, to return via wait */
-Index: hurd-debian/trans/Makefile
-===================================================================
---- hurd-debian.orig/trans/Makefile
-+++ hurd-debian/trans/Makefile
-@@ -78,6 +78,7 @@ password: passwordServer.o
- proxy-defpager: default_pagerServer.o default_pagerUser.o
- streamio: device_replyServer.o
- symlink: fsysServer.o
-+crash: processUser.o
- 
- fakeroot: ../libnetfs/libnetfs.a
- fifo new-fifo: ../libpipe/libpipe.a
diff --git a/debian/patches/series b/debian/patches/series
index 12b415d..c8b8d60 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -12,24 +12,27 @@ posix-sigcodes.patch
 #random-default-fast.patch
 libexec.patch
 run.patch
+git-exec_paths_exec.patch
+git-exec_paths_fs.patch
+git-exec_paths_use.patch
+git-exec_paths_fix.patch
+git-exec_paths_rpctrace.patch
 exec_filename_exec.patch
 exec_filename_fs.patch
 exec_filename_use.patch
-exec_filename_fix.patch
 mount.patch
 MAKEDEV-apm.patch
 term-for-tcl.patch
 newRPC.patch
-dl_origin.patch
+git-dl_origin.patch
 cross-link.patch
 procfs-compatible
 crash-logging.patch
 using_std.patch
 netdde_log.patch
 libports-iterate-refcount.patch
-exec_filename_rpctrace.patch
-exec_set_exe.patch
-pie-core
-hash-weakref
+git-pie-core
+git-exec_set_exe.patch
+git-hash-weakref
 get-identity_hash.diff
 get-identity_weakref.diff

-- 
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]