Skip to content

Commit eb7f70f

Browse files
committed
contrib/fs-idmap: Remove not used flags
We don't really need to check if AT_RECURSIVE is possible here. We just want to check if we can idmap the src, it doesn't matter other nested mounts. Signed-off-by: Rodrigo Campos <[email protected]>
1 parent a4c0d9c commit eb7f70f

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

contrib/cmd/fs-idmap/fs-idmap.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ func main() {
1616
}
1717

1818
src := os.Args[1]
19-
treeFD, err := unix.OpenTree(-1, src, uint(unix.OPEN_TREE_CLONE|unix.OPEN_TREE_CLOEXEC|unix.AT_EMPTY_PATH|unix.AT_RECURSIVE))
19+
treeFD, err := unix.OpenTree(-1, src, uint(unix.OPEN_TREE_CLONE|unix.OPEN_TREE_CLOEXEC|unix.AT_EMPTY_PATH))
2020
if err != nil {
2121
log.Fatalf("error calling open_tree %q: %v", src, err)
2222
}
@@ -44,7 +44,7 @@ func main() {
4444
Attr_set: unix.MOUNT_ATTR_IDMAP,
4545
Userns_fd: uint64(userNsFile.Fd()),
4646
}
47-
if err := unix.MountSetattr(treeFD, "", unix.AT_EMPTY_PATH|unix.AT_RECURSIVE, &attr); err != nil {
47+
if err := unix.MountSetattr(treeFD, "", unix.AT_EMPTY_PATH, &attr); err != nil {
4848
log.Fatalf("error calling mount_setattr: %v", err)
4949
}
5050

0 commit comments

Comments
 (0)