summaryrefslogtreecommitdiff
path: root/src/nspawn/nspawn-mount.c
diff options
context:
space:
mode:
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>2019-03-26 08:58:00 +0100
committerGitHub <noreply@github.com>2019-03-26 08:58:00 +0100
commite1af3bc62a07f1dd31854cc408f7f333fb252883 (patch)
treeff03175c9e1f85ad67e319d176dac19abbc6abb3 /src/nspawn/nspawn-mount.c
parent83eee14f4618debb0914cfffdbe0a3f8bdd30048 (diff)
parent9ce4e4b0f6088c494bfd29f4d7f7d3866839f933 (diff)
downloadsystemd-e1af3bc62a07f1dd31854cc408f7f333fb252883.tar.gz
Merge pull request #12106 from poettering/nosuidns
add "nosuid" flag to exec directory mounts of DynamicUser=1 services
Diffstat (limited to 'src/nspawn/nspawn-mount.c')
-rw-r--r--src/nspawn/nspawn-mount.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/nspawn/nspawn-mount.c b/src/nspawn/nspawn-mount.c
index 81e3065227..42153c5a11 100644
--- a/src/nspawn/nspawn-mount.c
+++ b/src/nspawn/nspawn-mount.c
@@ -731,7 +731,7 @@ static int mount_bind(const char *dest, CustomMount *m) {
return r;
if (m->read_only) {
- r = bind_remount_recursive(where, true, NULL);
+ r = bind_remount_recursive(where, MS_RDONLY, MS_RDONLY, NULL);
if (r < 0)
return log_error_errno(r, "Read-only bind mount failed: %m");
}
@@ -939,7 +939,7 @@ static int setup_volatile_state(
/* --volatile=state means we simply overmount /var with a tmpfs, and the rest read-only. */
- r = bind_remount_recursive(directory, true, NULL);
+ r = bind_remount_recursive(directory, MS_RDONLY, MS_RDONLY, NULL);
if (r < 0)
return log_error_errno(r, "Failed to remount %s read-only: %m", directory);
@@ -1005,7 +1005,7 @@ static int setup_volatile_yes(
bind_mounted = true;
- r = bind_remount_recursive(t, true, NULL);
+ r = bind_remount_recursive(t, MS_RDONLY, MS_RDONLY, NULL);
if (r < 0) {
log_error_errno(r, "Failed to remount %s read-only: %m", t);
goto fail;