Skip to content

Commit a7505ae

Browse files
committed
fix(mmserver): follow symlinks when calling move_mount
Our tiny container runtime was failing to mount over /home on systems where /home symlinks to /var/home, for example the Bazzite/Aurora variants of fedora.
1 parent 22590e2 commit a7505ae

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mm-server/src/container/runtime.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -815,7 +815,7 @@ pub(super) fn fuse_mount_into(
815815
c"",
816816
AT_FDCWD,
817817
dst.as_ref(),
818-
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH,
818+
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH | MoveMountFlags::MOVE_MOUNT_T_SYMLINKS,
819819
)?;
820820

821821
Ok(())
@@ -851,7 +851,7 @@ fn reattach_mount(fd: OwnedFd, path: impl AsRef<Path>) -> rustix::io::Result<()>
851851
"",
852852
AT_FDCWD,
853853
path.as_ref(),
854-
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH,
854+
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH | MoveMountFlags::MOVE_MOUNT_T_SYMLINKS,
855855
)
856856
}
857857

@@ -882,7 +882,7 @@ fn mount_fs(
882882
c"",
883883
AT_FDCWD,
884884
dst,
885-
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH,
885+
MoveMountFlags::MOVE_MOUNT_F_EMPTY_PATH | MoveMountFlags::MOVE_MOUNT_T_SYMLINKS,
886886
)?;
887887

888888
Ok(())

0 commit comments

Comments
 (0)