diff options
author | Marcos Paulo de Souza <marcos.souza.org@gmail.com> | 2017-09-25 23:27:29 -0300 |
---|---|---|
committer | Atomic Bot <atomic-devel@projectatomic.io> | 2017-09-26 13:48:06 +0000 |
commit | 4766393268c79d36e71758912f865e654b5d881a (patch) | |
tree | 703fe220cfb35b65d19ddd69942969336c7d2fc7 | |
parent | e98443065f9abc3c5e2ee52320ace88340a33108 (diff) | |
download | bubblewrap-4766393268c79d36e71758912f865e654b5d881a.tar.gz |
bubblewrap: Remove not needed MS_MGC_VAL mount flag
As specified by mount(2):
Specifying MS_MGC_VAL was required in kernel versions prior to 2.4, but
since Linux 2.4 is no longer required and is ignored if specified.
Signed-off-by: Marcos Paulo de Souza <marcos.souza.org@gmail.com>
Closes: #220
Approved by: cgwalters
-rw-r--r-- | bind-mount.c | 6 | ||||
-rw-r--r-- | bubblewrap.c | 6 |
2 files changed, 6 insertions, 6 deletions
diff --git a/bind-mount.c b/bind-mount.c index 7d3543f..045fa0e 100644 --- a/bind-mount.c +++ b/bind-mount.c @@ -389,7 +389,7 @@ bind_mount (int proc_fd, if (src) { - if (mount (src, dest, NULL, MS_MGC_VAL | MS_BIND | (recursive ? MS_REC : 0), NULL) != 0) + if (mount (src, dest, NULL, MS_BIND | (recursive ? MS_REC : 0), NULL) != 0) return 1; } @@ -411,7 +411,7 @@ bind_mount (int proc_fd, new_flags = current_flags | (devices ? 0 : MS_NODEV) | MS_NOSUID | (readonly ? MS_RDONLY : 0); if (new_flags != current_flags && mount ("none", resolved_dest, - NULL, MS_MGC_VAL | MS_BIND | MS_REMOUNT | new_flags, NULL) != 0) + NULL, MS_BIND | MS_REMOUNT | new_flags, NULL) != 0) return 3; /* We need to work around the fact that a bind mount does not apply the flags, so we need to manually @@ -426,7 +426,7 @@ bind_mount (int proc_fd, new_flags = current_flags | (devices ? 0 : MS_NODEV) | MS_NOSUID | (readonly ? MS_RDONLY : 0); if (new_flags != current_flags && mount ("none", mount_tab[i].mountpoint, - NULL, MS_MGC_VAL | MS_BIND | MS_REMOUNT | new_flags, NULL) != 0) + NULL, MS_BIND | MS_REMOUNT | new_flags, NULL) != 0) { /* If we can't read the mountpoint we can't remount it, but that should be safe to ignore because its not something the user can access. */ diff --git a/bubblewrap.c b/bubblewrap.c index f5cc90c..4566f2c 100644 --- a/bubblewrap.c +++ b/bubblewrap.c @@ -896,20 +896,20 @@ privileged_op (int privileged_op_socket, break; case PRIV_SEP_OP_PROC_MOUNT: - if (mount ("proc", arg1, "proc", MS_MGC_VAL | MS_NOSUID | MS_NOEXEC | MS_NODEV, NULL) != 0) + if (mount ("proc", arg1, "proc", MS_NOSUID | MS_NOEXEC | MS_NODEV, NULL) != 0) die_with_error ("Can't mount proc on %s", arg1); break; case PRIV_SEP_OP_TMPFS_MOUNT: { cleanup_free char *opt = label_mount ("mode=0755", opt_file_label); - if (mount ("tmpfs", arg1, "tmpfs", MS_MGC_VAL | MS_NOSUID | MS_NODEV, opt) != 0) + if (mount ("tmpfs", arg1, "tmpfs", MS_NOSUID | MS_NODEV, opt) != 0) die_with_error ("Can't mount tmpfs on %s", arg1); break; } case PRIV_SEP_OP_DEVPTS_MOUNT: - if (mount ("devpts", arg1, "devpts", MS_MGC_VAL | MS_NOSUID | MS_NOEXEC, + if (mount ("devpts", arg1, "devpts", MS_NOSUID | MS_NOEXEC, "newinstance,ptmxmode=0666,mode=620") != 0) die_with_error ("Can't mount devpts on %s", arg1); break; |