aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/xwrap.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/xwrap.c b/lib/xwrap.c
index 2e2ccbc1..778cb38d 100644
--- a/lib/xwrap.c
+++ b/lib/xwrap.c
@@ -554,7 +554,7 @@ char *xabspath(char *path, int exact)
if (missing) missing--;
else {
- if (-1 == (x = openat(dirfd, "..", 0))) goto error;
+ if (-1 == (x = openat(dirfd, "..", O_PATH))) goto error;
close(dirfd);
dirfd = x;
}
@@ -578,7 +578,7 @@ char *xabspath(char *path, int exact)
}
if (errno != EINVAL && (exact || todo)) goto error;
- fd = openat(dirfd, new->str, 0);
+ fd = openat(dirfd, new->str, O_PATH);
if (fd == -1 && (exact || todo || errno != ENOENT)) goto error;
close(dirfd);
dirfd = fd;
@@ -591,7 +591,7 @@ char *xabspath(char *path, int exact)
llist_traverse(done, free);
done=0;
close(dirfd);
- dirfd = open("/", 0);
+ dirfd = open("/", O_PATH);
}
free(new);
@@ -611,7 +611,7 @@ char *xabspath(char *path, int exact)
try = 2;
while (done) {
- struct string_list *temp = llist_pop(&done);;
+ struct string_list *temp = llist_pop(&done);
if (todo) try++;
try += strlen(temp->str);