aboutsummaryrefslogtreecommitdiff
path: root/src/bin/src/exec.c
diff options
context:
space:
mode:
authorXavier Del Campo Romero <xavi92@disroot.org>2025-11-12 00:37:26 +0100
committerXavier Del Campo Romero <xavi92@disroot.org>2025-11-16 22:57:45 +0100
commit2ce58c995946f85666e793c4f06efff683e76ae4 (patch)
treefbf2658bb0b0f61dadcf4ca27f997eaded78aae5 /src/bin/src/exec.c
parent5ce25ae3b5d8666d373f7d7e336546ce8508c213 (diff)
downloadwnix-master.tar.gz
Diffstat (limited to 'src/bin/src/exec.c')
-rw-r--r--src/bin/src/exec.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/bin/src/exec.c b/src/bin/src/exec.c
index 83c0e5f..1796af9 100644
--- a/src/bin/src/exec.c
+++ b/src/bin/src/exec.c
@@ -30,6 +30,7 @@
#include <nanowasm/nw.h>
#include <nanowasm/dbg.h>
#include <fcntl.h>
+#include <sys/stat.h>
#include <sys/types.h>
#include <stdlib.h>
#include <string.h>
@@ -318,7 +319,8 @@ failure:
}
int bin_exec(const char *const path, const char *const *const argv,
- const uid_t uid, const gid_t gid)
+ const struct fs_stdstreams *const ss, const pid_t parent, const uid_t uid,
+ const gid_t gid)
{
const pid_t pid = bin_pid();
char *pathdup = NULL;
@@ -353,9 +355,12 @@ int bin_exec(const char *const path, const char *const *const argv,
{
.path = pathdup,
.dbg.aio = serial,
+ .parent = parent,
.pid = pid,
.uid = uid,
- .gid = gid
+ .gid = gid,
+ .ss = *ss,
+ .umask = S_IWGRP | S_IWOTH
};
if (copy_args(p, path, argv)