2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-11-12 11:06:17 +00:00

Restrict the netplan file written by Ubuntu diskless boot

imageboot.sh wrote /etc/netplan/10-<iface>-confluentcfg.yaml with the
default mode 0644, and netplan warns that its configuration should not
be accessible by others. confignet already writes its files 0600, but
it leaves an identical file in place, so the boot-time one stayed 0644.
This commit is contained in:
Markus Hilger
2026-11-01 22:39:31 +01:00
parent 89787671cf
commit 6bdc3e17d7
@@ -237,6 +237,8 @@ EOF
fi
fi
echo " version: 2" >> /sysroot/etc/netplan/10-${iface}-confluentcfg.yaml
# netplan warns about configuration readable by others, as confignet knows
chmod 600 /sysroot/etc/netplan/10-${iface}-confluentcfg.yaml
fi
if grep installtodisk /proc/cmdline > /dev/null; then
. /etc/confluent/functions