Date: Mon, 30 Sep 2019 16:10:43 +0000 (UTC) From: Mark Johnston <markj@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r352907 - head/contrib/elftoolchain/cxxfilt Message-ID: <201909301610.x8UGAhup023990@repo.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: markj Date: Mon Sep 30 16:10:42 2019 New Revision: 352907 URL: https://svnweb.freebsd.org/changeset/base/352907 Log: Capsicumize c++filt(1). Reviewed by: emaste Discussed with: oshogbo Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D21106 Modified: head/contrib/elftoolchain/cxxfilt/cxxfilt.c Modified: head/contrib/elftoolchain/cxxfilt/cxxfilt.c ============================================================================== --- head/contrib/elftoolchain/cxxfilt/cxxfilt.c Mon Sep 30 15:59:07 2019 (r352906) +++ head/contrib/elftoolchain/cxxfilt/cxxfilt.c Mon Sep 30 16:10:42 2019 (r352907) @@ -25,6 +25,8 @@ */ #include <sys/param.h> + +#include <capsicum_helpers.h> #include <ctype.h> #include <err.h> #include <getopt.h> @@ -164,6 +166,11 @@ main(int argc, char **argv) argv += optind; argc -= optind; + + if (caph_limit_stdio() < 0) + err(EXIT_FAILURE, "failed to limit stdio rights"); + if (caph_enter() < 0) + err(EXIT_FAILURE, "failed to enter capability mode"); if (*argv != NULL) { for (n = 0; n < argc; n++) {
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201909301610.x8UGAhup023990>