aboutsummaryrefslogtreecommitdiff
path: root/sandbox.c
diff options
context:
space:
mode:
authorOmar Polo <op@omarpolo.com>2022-10-05 15:10:44 +0000
committerOmar Polo <op@omarpolo.com>2022-10-05 15:10:44 +0000
commit534afd0ddcba7c3d2f8478e89db026010c6190c5 (patch)
treeb2a6601b8a0fe1ba0128c34df1b9df374869ecf4 /sandbox.c
parent4ceb570910de41133b2771cff29cbb78f37fea30 (diff)
make the various strings in the config fixed-length
will help in future restructuring to have fixed-size objects.
Diffstat (limited to 'sandbox.c')
-rw-r--r--sandbox.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/sandbox.c b/sandbox.c
index 52a161d..f1ca7cb 100644
--- a/sandbox.c
+++ b/sandbox.c
@@ -514,7 +514,7 @@ server_landlock(void)
TAILQ_FOREACH(h, &hosts, vhosts) {
TAILQ_FOREACH(l, &h->locations, locations) {
- if (l->dir == NULL)
+ if (*l->dir == '\0')
continue;
if (landlock_unveil_path(fd, l->dir, perms) == -1)
@@ -608,7 +608,7 @@ sandbox_server_process(int can_open_sockets)
TAILQ_FOREACH(h, &hosts, vhosts) {
TAILQ_FOREACH(l, &h->locations, locations) {
- if (l->dir == NULL)
+ if (*l->dir == '\0')
continue;
if (unveil(l->dir, "r") == -1)