Date: Thu, 13 Feb 2014 09:24:47 +0000 (UTC) From: Christian Brueffer <brueffer@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r261828 - in stable/10: sbin/dhclient tools/regression/security/cap_test Message-ID: <201402130924.s1D9Olqf079060@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: brueffer Date: Thu Feb 13 09:24:46 2014 New Revision: 261828 URL: http://svnweb.freebsd.org/changeset/base/261828 Log: MFC: r261566 Use CAP_EVENT instead of the deprecated CAP_POLL_EVENT. PR: 185382 (based on) Submitted by: Loganaden Velvindron Reviewed by: pjd Modified: stable/10/sbin/dhclient/bpf.c stable/10/sbin/dhclient/dhclient.c stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Directory Properties: stable/10/ (props changed) Modified: stable/10/sbin/dhclient/bpf.c ============================================================================== --- stable/10/sbin/dhclient/bpf.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/sbin/dhclient/bpf.c Thu Feb 13 09:24:46 2014 (r261828) @@ -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: stable/10/sbin/dhclient/dhclient.c ============================================================================== --- stable/10/sbin/dhclient/dhclient.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/sbin/dhclient/dhclient.c Thu Feb 13 09:24:46 2014 (r261828) @@ -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: stable/10/tools/regression/security/cap_test/cap_test_capabilities.c ============================================================================== --- stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 13 09:09:14 2014 (r261827) +++ stable/10/tools/regression/security/cap_test/cap_test_capabilities.c Thu Feb 13 09:24:46 2014 (r261828) @@ -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?201402130924.s1D9Olqf079060>