summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Bugaev <bugaevc@gmail.com>2023-05-09 00:30:59 +0300
committerSamuel Thibault <samuel.thibault@ens-lyon.org>2023-05-10 02:08:57 +0200
commitce5e3a32a54e73e60d45659519ac75e812599fc5 (patch)
treeae71de65ed495e635e5af7006d2e73bf3f84da4d
parent12feacb67ee755f2f25a1384c496e991eeee6097 (diff)
libfshelp: Port to x86_64
Message-Id: <20230508213136.608575-5-bugaevc@gmail.com>
-rw-r--r--libfshelp/exec-reauth.c4
-rw-r--r--libfshelp/fshelp.h19
-rw-r--r--libfshelp/start-translator-long.c20
-rw-r--r--libfshelp/start-translator.c5
4 files changed, 29 insertions, 19 deletions
diff --git a/libfshelp/exec-reauth.c b/libfshelp/exec-reauth.c
index 7b87d576..6b99175a 100644
--- a/libfshelp/exec-reauth.c
+++ b/libfshelp/exec-reauth.c
@@ -28,8 +28,8 @@
extern error_t
exec_reauth (auth_t auth, int secure, int must_reauth,
- mach_port_t *ports, unsigned num_ports,
- mach_port_t *fds, unsigned num_fds);
+ mach_port_t *ports, mach_msg_type_number_t num_ports,
+ mach_port_t *fds, mach_msg_type_number_t num_fds);
/* If SUID or SGID is true, adds UID and/or GID respectively to the
authentication in PORTS[INIT_PORT_AUTH], and replaces it with the result.
diff --git a/libfshelp/fshelp.h b/libfshelp/fshelp.h
index 8ecfbd57..b050ecac 100644
--- a/libfshelp/fshelp.h
+++ b/libfshelp/fshelp.h
@@ -107,13 +107,17 @@ typedef error_t (*fshelp_open_fn_t) (int flags,
task's owner to OWNER_UID (or, if OWNER_UID is -1, then clear the
new task's owner. */
error_t
-fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn, void *cookie,
- char *name, char *argz, int argz_len,
+fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
mach_port_t *fds,
- mach_msg_type_name_t fds_type, int fds_len,
+ mach_msg_type_name_t fds_type,
+ mach_msg_type_number_t fds_len,
mach_port_t *ports,
- mach_msg_type_name_t ports_type, int ports_len,
- int *ints, int ints_len,
+ mach_msg_type_name_t ports_type,
+ mach_msg_type_number_t ports_len,
+ int *ints,
+ mach_msg_type_number_t ints_len,
uid_t owner_uid,
int timeout, fsys_t *control);
@@ -123,8 +127,9 @@ fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn, void *cookie,
and the other fds are cleared. */
error_t
fshelp_start_translator (fshelp_open_fn_t underlying_open_fn, void *cookie,
- char *name, char *argz, int argz_len,
- int timeout, fsys_t *control);
+ char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ int timeout, fsys_t *control);
/* Active translator linkage */
diff --git a/libfshelp/start-translator-long.c b/libfshelp/start-translator-long.c
index 3541c681..0d6c574a 100644
--- a/libfshelp/start-translator-long.c
+++ b/libfshelp/start-translator-long.c
@@ -192,14 +192,18 @@ service_fsys_startup (fshelp_open_fn_t underlying_open_fn, void *cookie,
error_t
fshelp_start_translator_long (fshelp_open_fn_t underlying_open_fn,
- void *cookie, char *name, char *argz,
- int argz_len, mach_port_t *fds,
- mach_msg_type_name_t fds_type, int fds_len,
- mach_port_t *ports,
- mach_msg_type_name_t ports_type, int ports_len,
- int *ints, int ints_len,
- uid_t owner_uid,
- int timeout, fsys_t *control)
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ mach_port_t *fds,
+ mach_msg_type_name_t fds_type,
+ mach_msg_type_number_t fds_len,
+ mach_port_t *ports,
+ mach_msg_type_name_t ports_type,
+ mach_msg_type_number_t ports_len,
+ int *ints,
+ mach_msg_type_number_t ints_len,
+ uid_t owner_uid,
+ int timeout, fsys_t *control)
{
error_t err;
file_t executable;
diff --git a/libfshelp/start-translator.c b/libfshelp/start-translator.c
index 7f0ae70d..e2716098 100644
--- a/libfshelp/start-translator.c
+++ b/libfshelp/start-translator.c
@@ -25,8 +25,9 @@
error_t
fshelp_start_translator (fshelp_open_fn_t underlying_open_fn,
- void *cookie, char *name, char *argz,
- int argz_len, int timeout, fsys_t *control)
+ void *cookie, char *name, char *argz,
+ mach_msg_type_number_t argz_len,
+ int timeout, fsys_t *control)
{
mach_port_t ports[INIT_PORT_MAX];
mach_port_t fds[STDERR_FILENO + 1];