diff options
| author | Faraz Vahedi <kfv@kfv.io> | 2024-10-27 16:34:33 +0000 |
|---|---|---|
| committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2024-11-27 14:10:29 +0000 |
| commit | 24a7303821ad2343b9239ab3d12a569a70a2b99a (patch) | |
| tree | c53e1222ead155b41e8f4187eab36a72ca1d3964 /usr.bin | |
| parent | f7a6cf3a020600b77795729d1c01780dae8e6d2e (diff) | |
Diffstat (limited to 'usr.bin')
| -rw-r--r-- | usr.bin/leave/leave.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/usr.bin/leave/leave.c b/usr.bin/leave/leave.c index d4db4349d4de..73507190369e 100644 --- a/usr.bin/leave/leave.c +++ b/usr.bin/leave/leave.c @@ -37,6 +37,8 @@ #include <time.h> #include <unistd.h> +#include <capsicum_helpers.h> + static void doalarm(u_int); static void usage(void) __dead2; @@ -61,6 +63,10 @@ main(int argc, char **argv) if (setlocale(LC_TIME, "") == NULL) warn("setlocale"); + caph_cache_catpages(); + if (caph_limit_stdio() < 0 || caph_enter() < 0) + err(EXIT_FAILURE, "capsicum"); + if (argc < 2) { #define MSG1 "When do you have to leave? " (void)write(STDOUT_FILENO, MSG1, sizeof(MSG1) - 1); |
