diff options
author | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2018-02-17 12:32:53 +0000 |
---|---|---|
committer | Mariusz Zaborski <oshogbo@FreeBSD.org> | 2018-02-17 12:32:53 +0000 |
commit | 2ad275d20f820797c36d7e75090d04e260fd8b12 (patch) | |
tree | ba6fe512ec937301300b9cca63bdd34361d2e7a8 /bin/uuidgen/uuidgen.c | |
parent | 4fc0a2791eec3d9fc45dadc7f4677fccf24d25f6 (diff) |
Capsicumize uuidgen.
Notes
Notes:
svn path=/head/; revision=329453
Diffstat (limited to 'bin/uuidgen/uuidgen.c')
-rw-r--r-- | bin/uuidgen/uuidgen.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/bin/uuidgen/uuidgen.c b/bin/uuidgen/uuidgen.c index af1e7299eed8..23a6fa42bad8 100644 --- a/bin/uuidgen/uuidgen.c +++ b/bin/uuidgen/uuidgen.c @@ -28,6 +28,9 @@ #include <sys/cdefs.h> __FBSDID("$FreeBSD$"); +#include <sys/capsicum.h> + +#include <capsicum_helpers.h> #include <err.h> #include <stdio.h> #include <stdlib.h> @@ -80,6 +83,12 @@ main(int argc, char *argv[]) if (argc) 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) count = 1; |