Summary: | неверные права на /etc/resolv.conf в initrd при загрузке с ip=dhcp | ||
---|---|---|---|
Product: | Sisyphus | Reporter: | Alexey Sheplyakov <asheplyakov> |
Component: | make-initrd | Assignee: | Alexey Gladkov <legion> |
Status: | CLOSED FIXED | QA Contact: | qa-sisyphus |
Severity: | normal | ||
Priority: | P5 | CC: | antohami, asheplyakov, glebfm, iv, klark, ldv, legion, nir, placeholder, sin |
Version: | unstable | ||
Hardware: | all | ||
OS: | Linux |
Description
Alexey Sheplyakov
2022-10-03 20:05:37 MSK
Такое происходит при загрузке по сети. Предполагаю, что виноват altboot. Проблема всё же в make-initrd. Если передать параметр cmdline: ip=dhcp то в initrd у /etc/resolv.conf будут права 600. Такие права, потому что файл создаётся при помощи mktemp: dst="$dir/resolv.conf$suffix" tmp="$(mktemp "$dst.XXXXXX")" { [ ! -f "$dst" ] || sed -n -e "0,/^$hb\$/{ /^$hb\$/q; p; }" "$dst" printf '%s\n' "$hb" cat printf '%s\n\n' "$he" [ ! -f "$dst" ] || sed -n -e "/^$he\$/,\${ /^$he\$/q; p; }" "$dst" } > "$tmp" mv -f -- "$tmp" "$dst" } https://github.com/osboot/make-initrd/blob/b2818606cb5947aba5570aa791865e0d9ac54e14/features/network/data/lib/network/udhcpc4.script#L62 Да. Действительно мой косяк. make-initrd-2.31.0-alt1 -> sisyphus: Thu Oct 06 2022 Alexey Gladkov <legion@altlinux.ru> 2.31.0-alt1 - New version (2.31.0). - Runtime: + Check more carefully for the presence of the INIT= inside new root partition. - Feature kickstart: + Start all luks after partitioning. + Add simple reqpart that automatically creates partitions required by your hardware platform. + Add part --fstype=efi to create EFI partition with custom mountpoint. + Add --hibernation option to part/logvol/raid commands. This option can be used to automatically determine the size of the swap partition big enough for hibernation. + Add support for fat/vfat filesystem. + Add support for zstd/lz4-compressed tarballs in liveimg. - Feature qemu: + Try to add e1000e module. - Feature network: + Fix permissions of /etc/resolv.conf (ALT#43929). - Misc: + Relax check of /usr. This will allow to migrate the filesystem to /usr. |