summaryrefslogtreecommitdiff
path: root/usr/src
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2014-07-09 20:38:58 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2014-07-09 20:38:58 +0000
commitc5067e844cb97201b59a32c9f0f80db90cf6104b (patch)
treec664d8ae79458673efd58002ca2b56782577b966 /usr/src
parent40fa04c2ff6f1c2824bd838efaad336d9336135e (diff)
downloadillumos-joyent-c5067e844cb97201b59a32c9f0f80db90cf6104b.tar.gz
OS-3193 lxbrand ubuntu 14 ping error: prctl: Function not implemented
Diffstat (limited to 'usr/src')
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/misc.c16
-rw-r--r--usr/src/lib/brand/lx/lx_brand/sys/lx_misc.h2
2 files changed, 17 insertions, 1 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/misc.c b/usr/src/lib/brand/lx/lx_brand/common/misc.c
index 126e9f1357..4b0020d551 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/misc.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/misc.c
@@ -527,6 +527,10 @@ lx_setgroups(uintptr_t p1, uintptr_t p2)
return ((r == -1) ? -errno : r);
}
+/*
+ * Linux currently defines 42 options for prctl (PR_CAPBSET_READ,
+ * PR_CAPBSET_DROP, etc.). Most of these are not emulated.
+ */
int
lx_prctl(int option, uintptr_t arg2, uintptr_t arg3,
uintptr_t arg4, uintptr_t arg5)
@@ -535,8 +539,18 @@ lx_prctl(int option, uintptr_t arg2, uintptr_t arg3,
size_t size = sizeof (psinfo.pr_fname);
int fd;
- if (option != LX_PR_SET_NAME)
+ if (option == LX_PR_SET_KEEPCAPS) {
+ /*
+ * See lx_capget and lx_capset. We totally punt on capabilities
+ * so do the same here.
+ */
+ return (0);
+ }
+
+ if (option != LX_PR_SET_NAME) {
+ lx_unsupported("prctl option %d", option);
return (-ENOSYS);
+ }
if (uucopy((void *)arg2, psinfo.pr_fname,
MIN(LX_PR_SET_NAME_NAMELEN, size)) != 0)
diff --git a/usr/src/lib/brand/lx/lx_brand/sys/lx_misc.h b/usr/src/lib/brand/lx/lx_brand/sys/lx_misc.h
index 6b8cca86b7..e7dd549e59 100644
--- a/usr/src/lib/brand/lx/lx_brand/sys/lx_misc.h
+++ b/usr/src/lib/brand/lx/lx_brand/sys/lx_misc.h
@@ -107,7 +107,9 @@ extern boolean_t lx_is_rpm;
* Constants for prctl(). We only include the ones here that we actually
* support; everything else will be ENOSYS.
*/
+#define LX_PR_SET_KEEPCAPS 8
#define LX_PR_SET_NAME 15
+
#define LX_PR_SET_NAME_NAMELEN 16
/*