chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
a834879
)
nspawn: mount a clean instance of sysfs
author
Lennart Poettering
<lennart@poettering.net>
Tue, 4 Sep 2012 23:32:43 +0000
(16:32 -0700)
committer
Lennart Poettering
<lennart@poettering.net>
Tue, 4 Sep 2012 23:32:43 +0000
(16:32 -0700)
src/nspawn/nspawn.c
patch
|
blob
|
history
diff --git
a/src/nspawn/nspawn.c
b/src/nspawn/nspawn.c
index 40b99343d79c4fb2574fe52ba3b0a142b730de0a..a8c8b7caf455e815186f927b7c0b6e68490ff3b9 100644
(file)
--- a/
src/nspawn/nspawn.c
+++ b/
src/nspawn/nspawn.c
@@
-269,8
+269,7
@@
static int mount_all(const char *dest) {
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND, true }, /* Bind mount first */
{ NULL, "/proc/sys", NULL, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
{ "proc", "/proc", "proc", NULL, MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
{ "/proc/sys", "/proc/sys", NULL, NULL, MS_BIND, true }, /* Bind mount first */
{ NULL, "/proc/sys", NULL, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
- { "/sys", "/sys", NULL, NULL, MS_BIND, true }, /* Bind mount first */
- { NULL, "/sys", NULL, NULL, MS_BIND|MS_RDONLY|MS_REMOUNT, true }, /* Then, make it r/o */
+ { "sysfs", "/sys", "sysfs", NULL, MS_RDONLY|MS_NOSUID|MS_NOEXEC|MS_NODEV, true },
{ "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true },
{ "/dev/pts", "/dev/pts", NULL, NULL, MS_BIND, true },
{ "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true },
{ "tmpfs", "/dev", "tmpfs", "mode=755", MS_NOSUID|MS_STRICTATIME, true },
{ "/dev/pts", "/dev/pts", NULL, NULL, MS_BIND, true },
{ "tmpfs", "/run", "tmpfs", "mode=755", MS_NOSUID|MS_NODEV|MS_STRICTATIME, true },
@@
-296,7
+295,7
@@
static int mount_all(const char *dest) {
break;
}
break;
}
- t = path_is_mount_point(where,
fals
e);
+ t = path_is_mount_point(where,
tru
e);
if (t < 0) {
log_error("Failed to detect whether %s is a mount point: %s", where, strerror(-t));
free(where);
if (t < 0) {
log_error("Failed to detect whether %s is a mount point: %s", where, strerror(-t));
free(where);