mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-14 20:37:06 +00:00
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:
parent
4166913371
commit
65bc027257
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=352907
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue