Date: Thu, 6 Feb 2014 21:36:14 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r261566 - in head: sbin/dhclient tools/regression/security/cap_test Message-ID: <201402062136.s16LaEv8040246@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Thu Feb 6 21:36:14 2014 New Revision: 261566 URL: http://svnweb.freebsd.org/changeset/base/261566 Log: Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT. PR: 185382 (based on) Submitted by: Loganaden Velvindron Reviewed by: pjd MFC after: 1 week Modified: head/sbin/dhclient/bpf.c head/sbin/dhclient/dhclient.c head/tools/regression/security/cap_test/cap_test_capabilities.c Modified: head/sbin/dhclient/bpf.c ============================================================================== --- head/sbin/dhclient/bpf.c Thu Feb 6 20:35:33 2014 (r261565) +++ head/sbin/dhclient/bpf.c Thu Feb 6 21:36:14 2014 (r261566) @@ -269,7 +269,7 @@ if_register_receive(struct interface_inf 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) Modified: head/sbin/dhclient/dhclient.c ============================================================================== --- head/sbin/dhclient/dhclient.c Thu Feb 6 20:35:33 2014 (r261565) +++ head/sbin/dhclient/dhclient.c Thu Feb 6 21:36:14 2014 (r261566) @@ -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"); Modified: head/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- head/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 6 20:35:33 2014 (r261565) +++ head/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 6 21:36:14 2014 (r261566) @@ -396,7 +396,7 @@ try_file_ops(int filefd, int dirfd, cap_ 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);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201402062136.s16LaEv8040246>