summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authoremaste <emaste@FreeBSD.org>2015-06-03 13:10:25 +0000
committeremaste <emaste@FreeBSD.org>2015-06-03 13:10:25 +0000
commite6fee85e82f35c9e4608b51187e64068dd3e1366 (patch)
tree6a8a3cec3671ee86cf96d1580569371f6db58af4
parentd97b35fcada2db84ac2ea4c4a927373f878295fa (diff)
downloadFreeBSD-src-e6fee85e82f35c9e4608b51187e64068dd3e1366.zip
FreeBSD-src-e6fee85e82f35c9e4608b51187e64068dd3e1366.tar.gz
MFC r259436,259437 by pjd: Allow for pselect(2) in capability mode.
-rw-r--r--sys/kern/capabilities.conf3
-rw-r--r--sys/kern/init_sysent.c2
2 files changed, 3 insertions, 2 deletions
diff --git a/sys/kern/capabilities.conf b/sys/kern/capabilities.conf
index 746a04c..8d33472 100644
--- a/sys/kern/capabilities.conf
+++ b/sys/kern/capabilities.conf
@@ -559,10 +559,11 @@ sctp_generic_sendmsg_iov
sctp_peeloff
##
-## Allow select(2), which will be scoped by capability rights.
+## Allow pselect(2) and select(2), which will be scoped by capability rights.
##
## XXXRW: But is it?
##
+pselect
select
##
diff --git a/sys/kern/init_sysent.c b/sys/kern/init_sysent.c
index 78070e3..5b6f093 100644
--- a/sys/kern/init_sysent.c
+++ b/sys/kern/init_sysent.c
@@ -556,7 +556,7 @@ struct sysent sysent[] = {
{ AS(pdkill_args), (sy_call_t *)sys_pdkill, AUE_PDKILL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 519 = pdkill */
{ AS(pdgetpid_args), (sy_call_t *)sys_pdgetpid, AUE_PDGETPID, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 520 = pdgetpid */
{ 0, (sy_call_t *)nosys, AUE_NULL, NULL, 0, 0, 0, SY_THR_ABSENT }, /* 521 = pdwait4 */
- { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, 0, SY_THR_STATIC }, /* 522 = pselect */
+ { AS(pselect_args), (sy_call_t *)sys_pselect, AUE_SELECT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC }, /* 522 = pselect */
{ AS(getloginclass_args), (sy_call_t *)sys_getloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 523 = getloginclass */
{ AS(setloginclass_args), (sy_call_t *)sys_setloginclass, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 524 = setloginclass */
{ AS(rctl_get_racct_args), (sy_call_t *)sys_rctl_get_racct, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC }, /* 525 = rctl_get_racct */
OpenPOWER on IntegriCloud