Date: Mon, 18 Jun 2018 04:54:10 +0000 (UTC) From: Eitan Adler <eadler@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r335312 - head/usr.bin/dc Message-ID: <201806180454.w5I4sAmk082083@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: eadler Date: Mon Jun 18 04:54:09 2018 New Revision: 335312 URL: https://svnweb.freebsd.org/changeset/base/335312 Log: dc: make use of caph_enter We already use caph library so this makes sense. Modified: head/usr.bin/dc/dc.c Modified: head/usr.bin/dc/dc.c ============================================================================== --- head/usr.bin/dc/dc.c Mon Jun 18 04:12:58 2018 (r335311) +++ head/usr.bin/dc/dc.c Mon Jun 18 04:54:09 2018 (r335312) @@ -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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201806180454.w5I4sAmk082083>