aboutsummaryrefslogtreecommitdiff
path: root/usr.bin/rwho
diff options
context:
space:
mode:
authorMariusz Zaborski <oshogbo@FreeBSD.org>2018-06-19 23:43:14 +0000
committerMariusz Zaborski <oshogbo@FreeBSD.org>2018-06-19 23:43:14 +0000
commit7672a0148f79063eac8f8e0beb0db5350d02d5d4 (patch)
tree413e973544ce3e0e8cc69352f5f5824b3a8821d5 /usr.bin/rwho
parentd18e2bca4b12aba1820c63c125e409418007db49 (diff)
downloadsrc-7672a0148f79063eac8f8e0beb0db5350d02d5d4.tar.gz
src-7672a0148f79063eac8f8e0beb0db5350d02d5d4.zip
Convert `cap_enter() < 0 && errno != ENOSYS` to `caph_enter() < 0`.
No functional change intended.
Notes
Notes: svn path=/head/; revision=335395
Diffstat (limited to 'usr.bin/rwho')
-rw-r--r--usr.bin/rwho/rwho.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/usr.bin/rwho/rwho.c b/usr.bin/rwho/rwho.c
index 09b5bc1eb14b..6326b2ce251a 100644
--- a/usr.bin/rwho/rwho.c
+++ b/usr.bin/rwho/rwho.c
@@ -51,6 +51,7 @@ __FBSDID("$FreeBSD$");
#include <protocols/rwhod.h>
+#include <capsicum_helpers.h>
#include <dirent.h>
#include <err.h>
#include <errno.h>
@@ -136,7 +137,7 @@ main(int argc, char *argv[])
*/
(void) time(&ct);
(void) localtime(&ct);
- if (cap_enter() < 0 && errno != ENOSYS)
+ if (caph_enter() < 0)
err(1, "cap_enter");
(void) time(&now);
cap_rights_init(&rights, CAP_READ);