svn commit: r261220 - head/sys/kern

Christian S.J. Peron csjp at FreeBSD.org
Tue Jan 28 01:49:50 UTC 2014


Author: csjp
Date: Tue Jan 28 01:49:49 2014
New Revision: 261220
URL: http://svnweb.freebsd.org/changeset/base/261220

Log:
  Allow sigwait(2) in capabilities mode.
  
  It's common for multi-threaded processes to create a thread for
  the purpose of synchronously processing signals. Allow such processes to
  utilize a capabilities sandbox.
  
  Discussed with:	rwatson, pjd
  MFC after:	2 weeks

Modified:
  head/sys/kern/capabilities.conf
  head/sys/kern/init_sysent.c

Modified: head/sys/kern/capabilities.conf
==============================================================================
--- head/sys/kern/capabilities.conf	Tue Jan 28 00:31:48 2014	(r261219)
+++ head/sys/kern/capabilities.conf	Tue Jan 28 01:49:49 2014	(r261220)
@@ -667,6 +667,7 @@ sigsuspend
 sigtimedwait
 sigvec
 sigwaitinfo
+sigwait
 
 ##
 ## Allow creating new socket pairs with socket(2) and socketpair(2).

Modified: head/sys/kern/init_sysent.c
==============================================================================
--- head/sys/kern/init_sysent.c	Tue Jan 28 00:31:48 2014	(r261219)
+++ head/sys/kern/init_sysent.c	Tue Jan 28 01:49:49 2014	(r261220)
@@ -463,7 +463,7 @@ struct sysent sysent[] = {
 	{ AS(__acl_set_link_args), (sy_call_t *)sys___acl_set_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 426 = __acl_set_link */
 	{ AS(__acl_delete_link_args), (sy_call_t *)sys___acl_delete_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 427 = __acl_delete_link */
 	{ AS(__acl_aclcheck_link_args), (sy_call_t *)sys___acl_aclcheck_link, AUE_NULL, NULL, 0, 0, 0, SY_THR_STATIC },	/* 428 = __acl_aclcheck_link */
-	{ AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, 0, SY_THR_STATIC },	/* 429 = sigwait */
+	{ AS(sigwait_args), (sy_call_t *)sys_sigwait, AUE_SIGWAIT, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 429 = sigwait */
 	{ AS(thr_create_args), (sy_call_t *)sys_thr_create, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 430 = thr_create */
 	{ AS(thr_exit_args), (sy_call_t *)sys_thr_exit, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 431 = thr_exit */
 	{ AS(thr_self_args), (sy_call_t *)sys_thr_self, AUE_NULL, NULL, 0, 0, SYF_CAPENABLED, SY_THR_STATIC },	/* 432 = thr_self */


More information about the svn-src-head mailing list