Capsicumize c++filt(1).

Reviewed by:	emaste
Discussed with:	oshogbo
Sponsored by:	The FreeBSD Foundation
Differential Revision:	https://reviews.freebsd.org/D21106
This commit is contained in:
Mark Johnston 2019-09-30 16:10:42 +00:00
parent 4166913371
commit 65bc027257
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352907

View file

@ -25,6 +25,8 @@
*/
#include <sys/param.h>
#include <capsicum_helpers.h>
#include <ctype.h>
#include <err.h>
#include <getopt.h>
@ -165,6 +167,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++) {
if ((dem = demangle(argv[n])) == NULL)