summaryrefslogtreecommitdiff
path: root/hurd
diff options
context:
space:
mode:
authorEmilio Pozuelo Monfort <pochu27@gmail.com>2010-05-26 01:27:40 +0200
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2018-01-08 22:46:06 +0100
commit4152b0ca04f4703a6c6f33e59ba0e7bd95837069 (patch)
treee10f7b717da381cacf8a5d98087d664f271f3bba /hurd
parent67fa50fb8f0a6894e5ed6534936afb8044e66613 (diff)
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.
Diffstat (limited to 'hurd')
-rw-r--r--hurd/fs.defs29
-rw-r--r--hurd/hurd_types.h9
2 files changed, 30 insertions, 8 deletions
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,