~alip/sydbox

6b66c0b43bca48a373cbf184620612f924d2defc — Ⓐlï P☮latel 10 months ago a230f80
syd: handle newfstatat(AT_FDCWD, ".") gracefully

Signed-off-by: Ⓐlï P☮latel <alip@exherbo.org>
1 files changed, 2 insertions(+), 1 deletions(-)

M src/sandbox.c
M src/sandbox.c => src/sandbox.c +2 -1
@@ 282,7 282,8 @@ int box_resolve_path(const char *path, const char *prefix, pid_t tid,

	if (path == NULL && prefix == NULL)
		return -EINVAL;
	if (path == NULL || path[0] == '\0')
	if (path == NULL ||
	    (path[0] == '\0' || (path[0] == '.' && path[1] == '\0')))
		abspath = xstrdup(prefix);
	else if (prefix == NULL)
		abspath = xstrdup(path);