Skip to content

Commit

Permalink
Support mount_setattr syscall
Browse files Browse the repository at this point in the history
  • Loading branch information
rocallahan committed Dec 29, 2024
1 parent d7f54af commit e87c255
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/syscalls.py
Original file line number Diff line number Diff line change
Expand Up @@ -1734,7 +1734,7 @@ def __init__(self, **kwargs):
pidfd_getfd = EmulatedSyscall(all=438)
process_madvise = UnsupportedSyscall(all=440)
epoll_pwait2 = IrregularEmulatedSyscall(all=441)
mount_setattr = UnsupportedSyscall(all=442)
mount_setattr = EmulatedSyscall(all=442)
quotactl_fd = UnsupportedSyscall(all=443)
landlock_create_ruleset = EmulatedSyscall(all=444)
landlock_add_rule = EmulatedSyscall(all=445)
Expand Down
7 changes: 7 additions & 0 deletions src/test/fsmount.c
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@
#include "nsutils.h"
#include "util.h"

#include <sys/mount.h>

int main(void) {
if (try_setup_ns(CLONE_NEWNS) < 0) {
atomic_puts("EXIT-SUCCESS");
Expand All @@ -21,6 +23,11 @@ int main(void) {
ret = syscall(RR_move_mount, mnt_fd, "", AT_FDCWD, "/tmp", MOVE_MOUNT_F_EMPTY_PATH);
test_assert(ret == 0);

struct mount_attr attr;
memset(&attr, 0, sizeof(attr));
ret = syscall(RR_mount_setattr, mnt_fd, "", AT_EMPTY_PATH, &attr, sizeof(attr));
test_assert(ret == 0);

atomic_puts("EXIT-SUCCESS");
return 0;
}

0 comments on commit e87c255

Please sign in to comment.