mirror of
https://gitlab.com/apparmor/apparmor.git
synced 2025-03-04 08:24:42 +01:00
mount regression test: convert mount test to use MS_NODEV
The mount regression test passes MS_MANDLOCK to the mount(2) syscall in
the test program. When the kernel is configured without
CONFIG_MANDATORY_FILE_LOCKING set, attempting to mount a filesystem with
this option always fails with EPERM. To fix, convert the test program to
use the MS_NODEV option instead.
(cherry picked from commit 49ba6af2bf
)
Signed-off-by: Steve Beattie <steve.beattie@canonical.com>
Acked-by: John Johansen <john.johansen@canonical.com>
Bug: https://bugs.launchpad.net/apparmor/+bug/1765025
PR: https://gitlab.com/apparmor/apparmor/merge_requests/109
This commit is contained in:
parent
3f657164f2
commit
e3e01943d4
1 changed files with 1 additions and 1 deletions
|
@ -24,7 +24,7 @@ int main(int argc, char *argv[])
|
||||||
}
|
}
|
||||||
|
|
||||||
if (strcmp(argv[1], "mount") == 0) {
|
if (strcmp(argv[1], "mount") == 0) {
|
||||||
if (mount(argv[2], argv[3], "ext2", 0xc0ed0000 | MS_MANDLOCK, NULL ) == -1) {
|
if (mount(argv[2], argv[3], "ext2", 0xc0ed0000 | MS_NODEV, NULL ) == -1) {
|
||||||
fprintf(stderr, "FAIL: mount %s on %s failed - %s\n",
|
fprintf(stderr, "FAIL: mount %s on %s failed - %s\n",
|
||||||
argv[2], argv[3],
|
argv[2], argv[3],
|
||||||
strerror(errno));
|
strerror(errno));
|
||||||
|
|
Loading…
Add table
Reference in a new issue