From c093cea571affbb07b9a4c27fa344689becc1f79 Mon Sep 17 00:00:00 2001 From: Stephane Desneux Date: Fri, 12 Jul 2019 17:13:35 +0000 Subject: netboot: adjust SMACK label for /etc/resolv.conf When using netboot, the kernel is responsible for establishing the IP connection. For this reason, connman is instructed to "forget" this boot interface and /etc/resolv.conf is generated by the initrd script (from /proc/net/pnp). This patch removes the previously set SMACK label 'System' so file has label _, which makes it readable by any process. Bug-AGL: SPEC-2640 Change-Id: I13704827434a795aab2264755dc01ec796be8847 Signed-off-by: Stephane Desneux --- meta-netboot/recipes-core/initramfs-netboot/files/init.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/meta-netboot/recipes-core/initramfs-netboot/files/init.sh b/meta-netboot/recipes-core/initramfs-netboot/files/init.sh index 7064314a5..7b8fbb518 100644 --- a/meta-netboot/recipes-core/initramfs-netboot/files/init.sh +++ b/meta-netboot/recipes-core/initramfs-netboot/files/init.sh @@ -139,6 +139,7 @@ fi # also use /proc/net/pnp to generate /etc/resolv.conf rm -f /etc/resolv.conf grep -v bootserver /proc/net/pnp | sed 's/^domain/search/g' >/etc/resolv.conf +chsmack -A /etc/resolv.conf # unmount tmp and run to let systemd remount them with correct smack labels (SPEC-2596) log_info "Unmounting /tmp and /run" -- cgit 1.2.3-korg