aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/ktrdump
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2018-11-04 19:24:49 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2018-11-04 19:24:49 +0000
commit377421df9690cddad7f0c8cba84bd392e62a3b6c (patch)
tree8abd5aa51822658825b9055a2be48f3f3c0b7bcb /usr.bin/ktrdump
parenteda66948fe3eb3134f19c97689f9ca55abce8565 (diff)
downloadsrc-377421df9690cddad7f0c8cba84bd392e62a3b6c.tar.gz
src-377421df9690cddad7f0c8cba84bd392e62a3b6c.zip
capsicum: use a new capsicum helpers in tools
Use caph_{rights,ioctls,fcntls}_limit to simplify the code.
Notes
Notes: svn path=/head/; revision=340138
Diffstat (limited to 'usr.bin/ktrdump')
-rw-r--r--usr.bin/ktrdump/ktrdump.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/usr.bin/ktrdump/ktrdump.c b/usr.bin/ktrdump/ktrdump.c
index 0f39da01d640..750f138f5485 100644
--- a/usr.bin/ktrdump/ktrdump.c
+++ b/usr.bin/ktrdump/ktrdump.c
@@ -132,8 +132,7 @@ main(int ac, char **av)
if ((in = open(optarg, O_RDONLY)) == -1)
err(1, "%s", optarg);
cap_rights_init(&rights, CAP_FSTAT, CAP_MMAP_R);
- if (cap_rights_limit(in, &rights) < 0 &&
- errno != ENOSYS)
+ if (caph_rights_limit(in, &rights) < 0)
err(1, "unable to limit rights for %s",
optarg);
break;