From 29df26e4a2407f7605256b0b7b84e3090174f1b3 Mon Sep 17 00:00:00 2001 From: eadler Date: Mon, 18 Jun 2018 04:54:09 +0000 Subject: [PATCH] dc: make use of caph_enter We already use caph library so this makes sense. --- usr.bin/dc/dc.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.bin/dc/dc.c b/usr.bin/dc/dc.c index a2cf8c92e346..79e0aca87a74 100644 --- a/usr.bin/dc/dc.c +++ b/usr.bin/dc/dc.c @@ -137,7 +137,7 @@ main(int argc, char *argv[]) if (caph_limit_stream(fd, CAPH_READ) < 0 || caph_limit_stdio() < 0 || - (cap_enter() < 0 && errno != ENOSYS)) + caph_enter() < 0) err(1, "capsicum"); procfd(fd, argv[0]); @@ -146,7 +146,7 @@ main(int argc, char *argv[]) if (preproc_done) return (0); - if (caph_limit_stdio() < 0 || (cap_enter() < 0 && errno != ENOSYS)) + if (caph_limit_stdio() < 0 || caph_enter()) err(1, "capsicum"); src_setstream(&src, stdin); reset_bmachine(&src);