Capsicumize uuidgen.

This commit is contained in:
Mariusz Zaborski 2018-02-17 12:32:53 +00:00
parent 4fc0a2791e
commit 2ad275d20f
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=329453

View File

@ -28,6 +28,9 @@
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
#include <sys/capsicum.h>
#include <capsicum_helpers.h>
#include <err.h> #include <err.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>
@ -80,6 +83,12 @@ main(int argc, char *argv[])
if (argc) if (argc)
usage(); usage();
caph_cache_catpages();
if (caph_limit_stdio() < 0)
err(1, "Unable to limit stdio");
if (cap_enter() < 0 && errno != ENOSYS)
err(1, "Unable to enter capability mode");
if (count == -1) if (count == -1)
count = 1; count = 1;