summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorbrueffer <brueffer@FreeBSD.org>2014-02-13 09:24:46 +0000
committerbrueffer <brueffer@FreeBSD.org>2014-02-13 09:24:46 +0000
commitb27bfe4c09b399b2270ddfc103260fc72a0a2184 (patch)
treebd5cb47534b26aef0075948fddc8d3577231bda7
parent2a0c06b06734af87b60753f6646870c393aeb126 (diff)
downloadFreeBSD-src-b27bfe4c09b399b2270ddfc103260fc72a0a2184.zip
FreeBSD-src-b27bfe4c09b399b2270ddfc103260fc72a0a2184.tar.gz
MFC: r261566
Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT. PR: 185382 (based on) Submitted by: Loganaden Velvindron Reviewed by: pjd
-rw-r--r--sbin/dhclient/bpf.c2
-rw-r--r--sbin/dhclient/dhclient.c2
-rw-r--r--tools/regression/security/cap_test/cap_test_capabilities.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/sbin/dhclient/bpf.c b/sbin/dhclient/bpf.c
index c0a1720..311bcc7 100644
--- a/sbin/dhclient/bpf.c
+++ b/sbin/dhclient/bpf.c
@@ -269,7 +269,7 @@ if_register_receive(struct interface_info *info)
if (ioctl(info->rfdesc, BIOCLOCK, NULL) < 0)
error("Cannot lock bpf");
- cap_rights_init(&rights, CAP_IOCTL, CAP_POLL_EVENT, CAP_READ);
+ cap_rights_init(&rights, CAP_IOCTL, CAP_EVENT, CAP_READ);
if (cap_rights_limit(info->rfdesc, &rights) < 0 && errno != ENOSYS)
error("Can't limit bpf descriptor: %m");
if (cap_ioctls_limit(info->rfdesc, cmds, 2) < 0 && errno != ENOSYS)
diff --git a/sbin/dhclient/dhclient.c b/sbin/dhclient/dhclient.c
index e16e464..f605233 100644
--- a/sbin/dhclient/dhclient.c
+++ b/sbin/dhclient/dhclient.c
@@ -494,7 +494,7 @@ main(int argc, char *argv[])
add_protocol("AF_ROUTE", routefd, routehandler, ifi);
if (shutdown(routefd, SHUT_WR) < 0)
error("can't shutdown route socket: %m");
- cap_rights_init(&rights, CAP_POLL_EVENT, CAP_READ);
+ cap_rights_init(&rights, CAP_EVENT, CAP_READ);
if (cap_rights_limit(routefd, &rights) < 0 && errno != ENOSYS)
error("can't limit route socket: %m");
diff --git a/tools/regression/security/cap_test/cap_test_capabilities.c b/tools/regression/security/cap_test/cap_test_capabilities.c
index d4347ee..02288ad 100644
--- a/tools/regression/security/cap_test/cap_test_capabilities.c
+++ b/tools/regression/security/cap_test/cap_test_capabilities.c
@@ -396,7 +396,7 @@ try_file_ops(int filefd, int dirfd, cap_rights_t rights)
pollfd.revents = 0;
ret = poll(&pollfd, 1, 0);
- if (rights & CAP_POLL_EVENT)
+ if (rights & CAP_EVENT)
CHECK((pollfd.revents & POLLNVAL) == 0);
else
CHECK((pollfd.revents & POLLNVAL) != 0);
@@ -546,7 +546,7 @@ test_capabilities(void)
TRY(CAP_SEM_POST);
TRY(CAP_SEM_WAIT);
TRY(CAP_POST_EVENT);
- TRY(CAP_POLL_EVENT);
+ TRY(CAP_EVENT);
TRY(CAP_IOCTL);
TRY(CAP_TTYHOOK);
TRY(CAP_PDGETPID);
OpenPOWER on IntegriCloud