commit a0afbbbf7345e94a6855cd01dfae0e84dbbcd05e
parent 9fe680e3257c040bedc37223cd07b785aedb1ee6
Author: Jacob R. Edwards <jacob@jacobedwards.org>
Date: Sun, 31 Mar 2024 12:51:10 -0700
Use unveil(3)
Diffstat:
1 file changed, 5 insertions(+), 0 deletions(-)
diff --git a/timekeeper.c b/timekeeper.c
@@ -66,6 +66,11 @@ main(void)
[PageAbout] = pagefrag
};
+ if (unveil(DataDir "/frags", "r") ||
+ unveil(DataDir "/timekeeper.db", "rwc") ||
+ unveil(NULL, NULL))
+ kutil_err(NULL, NULL, "unveil");
+
memset(&cfg, 0, sizeof(cfg));
cfg.msg.func_short = warnx;
cfg.srcs.srcsz = 1;