composepost: fix fchmod flags for tmpdir (glibc compat)
The `AT_SYMLINK_NOFOLLOW` flag for chmod was not implemented in glibc until very recent releases (v2.32 in 2020-08). Before that version, passing this flag will always result in `ENOTSUP`. Refs: * https://github.com/bminor/glibc/blob/glibc-2.31/sysdeps/unix/sysv/linux/fchmodat.c#L36 * https://github.com/bminor/glibc/blob/glibc-2.32/sysdeps/unix/sysv/linux/fchmodat.c
This commit is contained in:
parent
c708b47fc9
commit
6c75f57766
@ -78,7 +78,7 @@ fn compose_init_rootfs(rootfs_dfd: &openat::Dir, tmp_is_dir: bool) -> Result<()>
|
||||
Some(nix_rootfs.as_raw_fd()),
|
||||
"tmp",
|
||||
Mode::from_bits(tmp_mode).unwrap(),
|
||||
nix::sys::stat::FchmodatFlags::NoFollowSymlink,
|
||||
nix::sys::stat::FchmodatFlags::FollowSymlink,
|
||||
)?;
|
||||
} else {
|
||||
rootfs_dfd.symlink("tmp", "sysroot/tmp")?;
|
||||
|
Loading…
Reference in New Issue
Block a user