Created
June 9, 2013 16:09
-
-
Save postwait/5744089 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| commit 3091c448da335caa7f1863c1a84ab250e700badd | |
| Author: Theo Schlossnagle <jesus@omniti.com> | |
| Date: Sun Jun 9 16:07:11 2013 +0000 | |
| 3809 Recent libc change breaks Solaris 10 Branded Zone Support | |
| diff --git a/usr/src/lib/brand/solaris10/s10_brand/common/s10_brand.c b/usr/src/lib/brand/solaris10/s10_brand/common/s10_brand.c | |
| index f179a3d..94058ff 100644 | |
| --- a/usr/src/lib/brand/solaris10/s10_brand/common/s10_brand.c | |
| +++ b/usr/src/lib/brand/solaris10/s10_brand/common/s10_brand.c | |
| @@ -1386,6 +1386,21 @@ s10_issetugid(sysret_t *rval) | |
| 0, 0, 0, 0, 0)); | |
| } | |
| +/* | |
| + * S10's pipe() syscall has a different calling convention | |
| + */ | |
| +static int | |
| +s10_pipe(sysret_t *rval) | |
| +{ | |
| + int fds[2], err; | |
| + if ((err = __systemcall(rval, SYS_pipe + 1024, fds, 0)) != 0) | |
| + return (err); | |
| + | |
| + rval->sys_rval1 = fds[0]; | |
| + rval->sys_rval2 = fds[1]; | |
| + return (0); | |
| +} | |
| + | |
| static long | |
| s10_uname(sysret_t *rv, uintptr_t p1) | |
| { | |
| @@ -1900,7 +1915,7 @@ brand_sysent_table_t brand_sysent_table[] = { | |
| NOSYS, /* 39 */ | |
| NOSYS, /* 40 */ | |
| EMULATE(s10_dup, 1 | RV_DEFAULT), /* 41 */ | |
| - NOSYS, /* 42 */ | |
| + EMULATE(s10_pipe, 0 | RV_32RVAL2), /* 42 */ | |
| NOSYS, /* 43 */ | |
| NOSYS, /* 44 */ | |
| NOSYS, /* 45 */ | |
| diff --git a/usr/src/uts/common/brand/solaris10/s10_brand.c b/usr/src/uts/common/brand/solaris10/s10_brand.c | |
| index 3efc9ef..a8b54a1 100644 | |
| --- a/usr/src/uts/common/brand/solaris10/s10_brand.c | |
| +++ b/usr/src/uts/common/brand/solaris10/s10_brand.c | |
| @@ -497,6 +497,7 @@ _init(void) | |
| s10_emulation_table[S10_SYS_access] = 1; /* 33 */ | |
| s10_emulation_table[SYS_kill] = 1; /* 37 */ | |
| s10_emulation_table[S10_SYS_dup] = 1; /* 41 */ | |
| + s10_emulation_table[S10_SYS_pipe] = 1; /* 41 */ | |
| s10_emulation_table[SYS_ioctl] = 1; /* 54 */ | |
| s10_emulation_table[SYS_execve] = 1; /* 59 */ | |
| s10_emulation_table[SYS_acctctl] = 1; /* 71 */ | |
| diff --git a/usr/src/uts/common/brand/solaris10/s10_brand.h b/usr/src/uts/common/brand/solaris10/s10_brand.h | |
| index 0112a78..bb19c3f 100644 | |
| --- a/usr/src/uts/common/brand/solaris10/s10_brand.h | |
| +++ b/usr/src/uts/common/brand/solaris10/s10_brand.h | |
| @@ -119,6 +119,7 @@ enum s10_emulated_features { | |
| #define S10_SYS_utime 30 | |
| #define S10_SYS_access 33 | |
| #define S10_SYS_dup 41 | |
| +#define S10_SYS_pipe 42 | |
| #define S10_SYS_issetugid 75 | |
| #define S10_SYS_fsat 76 | |
| #define S10_SYS_rmdir 79 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment