summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJerry Jelinek <jerry.jelinek@joyent.com>2015-08-05 19:49:28 +0000
committerJerry Jelinek <jerry.jelinek@joyent.com>2015-08-05 20:09:56 +0000
commit1c85d1793a71f9fd58e4c699f67dde3ad59993f2 (patch)
treee2a034c83ad1b6508afcc957ebf08b4af0e2b891
parente47481f33f57a102a92ce26118ec2d39ce8bde69 (diff)
downloadillumos-joyent-1c85d1793a71f9fd58e4c699f67dde3ad59993f2.tar.gz
OS-3700 ubuntu 14.04 and centos 6 /dev/shm mode is incorrect
-rw-r--r--usr/src/lib/brand/lx/lx_brand/common/mount.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/usr/src/lib/brand/lx/lx_brand/common/mount.c b/usr/src/lib/brand/lx/lx_brand/common/mount.c
index 72c879d487..2c3d1ae9b5 100644
--- a/usr/src/lib/brand/lx/lx_brand/common/mount.c
+++ b/usr/src/lib/brand/lx/lx_brand/common/mount.c
@@ -724,6 +724,15 @@ lx_mount(uintptr_t p1, uintptr_t p2, uintptr_t p3, uintptr_t p4,
}
/*
+ * Linux defaults to mode=1777 for tmpfs mounts.
+ */
+ if (strstr(options, "mode=") == NULL) {
+ if (options[0] != '\0')
+ (void) strlcat(options, ",", sizeof (options));
+ (void) strlcat(options, "mode=1777", sizeof (options));
+ }
+
+ /*
* Linux seems to always allow overlay mounts. We allow this
* everywhere except under /dev where it interferes with device
* emulation.