diff options
author | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
---|---|---|
committer | nn35248 <none@none> | 2006-09-11 22:51:59 -0700 |
commit | 9acbbeaf2a1ffe5c14b244867d427714fab43c5c (patch) | |
tree | d1ecd54896325c19a463220e9cbc50864874fc82 /usr/src/uts/common/os/main.c | |
parent | da51466dc253d7c98dda4956059042bd0c476328 (diff) | |
download | illumos-joyent-9acbbeaf2a1ffe5c14b244867d427714fab43c5c.tar.gz |
PSARC/2005/471 BrandZ: Support for non-native zones
6374606 ::nm -D without an object may not work on processes in zones
6409350 BrandZ project integration into Solaris
6455289 pthread_setschedparam() should return EPERM rather than panic libc
6455591 setpriority(3C) gets errno wrong for deficient privileges failure
6458178 fifofs doesn't support lofs mounts of fifos
6460380 Attempted open() of a symlink with the O_NOFOLLOW flag set returns EINVAL, not ELOOP
6463857 renice(1) errors erroneously
--HG--
rename : usr/src/lib/libzonecfg/zones/SUNWblank.xml => usr/src/lib/brand/native/zone/SUNWblank.xml
rename : usr/src/lib/libzonecfg/zones/SUNWdefault.xml => usr/src/lib/brand/native/zone/SUNWdefault.xml
Diffstat (limited to 'usr/src/uts/common/os/main.c')
-rw-r--r-- | usr/src/uts/common/os/main.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/usr/src/uts/common/os/main.c b/usr/src/uts/common/os/main.c index 958bbf96c8..ec9fc6c3e3 100644 --- a/usr/src/uts/common/os/main.c +++ b/usr/src/uts/common/os/main.c @@ -70,6 +70,7 @@ #include <sys/errorq.h> #include <sys/class.h> #include <sys/stack.h> +#include <sys/brand.h> #include <vm/as.h> #include <vm/seg_kmem.h> @@ -124,6 +125,7 @@ cluster_wrapper(void) char initname[INITNAME_SZ] = "/sbin/init"; /* also referenced by zone0 */ char initargs[BOOTARGS_MAX] = ""; /* also referenced by zone0 */ +extern int64_t lwp_sigmask(int, uint_t, uint_t); /* * Construct a stack for init containing the arguments to it, then @@ -144,6 +146,7 @@ exec_init(const char *initpath, const char *args) int error = 0, count = 0; proc_t *p = ttoproc(curthread); klwp_t *lwp = ttolwp(curthread); + int brand_action; if (args == NULL) args = ""; @@ -247,9 +250,17 @@ exec_init(const char *initpath, const char *args) curthread->t_post_sys = 1; curthread->t_sysnum = SYS_execve; + /* + * If we are executing init from zsched, we may have inherited its + * parent process's signal mask. Clear it now so that we behave in + * the same way as when started from the global zone. + */ + (void) lwp_sigmask(SIG_UNBLOCK, 0xffffffff, 0xffffffff); + + brand_action = ZONE_IS_BRANDED(p->p_zone) ? EBA_BRAND : EBA_NONE; again: error = exec_common((const char *)(uintptr_t)exec_fnamep, - (const char **)(uintptr_t)uap, NULL); + (const char **)(uintptr_t)uap, NULL, brand_action); /* * Normally we would just set lwp_argsaved and t_post_sys and |