switch to getcwd

This commit is contained in:
Omar Polo 2021-01-17 09:33:45 +00:00
parent 881dc835d0
commit d939d0f09e
2 changed files with 6 additions and 3 deletions

View File

@ -62,6 +62,9 @@ even if the presence of a sandbox.
On OpenBSD, the listener process runs with the `stdio recvfd rpath
inet` pledges and has `unveil(2)`ed only the directories that it
serves; the executor has `stdio sendfd proc exec` as pledges.
serves. Furthermore, the executor process has `stdio sendfd proc exec`
as pledges.
On FreeBSD, the executor process is sandboxed with `capsicum(4)`.
On FreeBSD, the listener process is sandboxed with `capsicum(4)`.
On linux, a seccomp filter is installed for the listener process.

2
gmid.c
View File

@ -673,7 +673,7 @@ absolutify_path(const char *path)
if (*path == '/')
return strdup(path);
wd = getwd(NULL);
wd = getcwd(NULL, 0);
if (asprintf(&r, "%s/%s", wd, path) == -1)
err(1, "asprintf");
free(wd);