aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorStephane Desneux <stephane.desneux@iot.bzh>2019-07-12 17:13:35 +0000
committerStephane Desneux <stephane.desneux@iot.bzh>2019-07-12 17:18:01 +0000
commitc093cea571affbb07b9a4c27fa344689becc1f79 (patch)
tree1696c732211e7ed04964b6ca2b035f533519d483
parent7f34f6d4346f09b0e7cd72518f30ba2c39f6eade (diff)
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 <stephane.desneux@iot.bzh>
-rw-r--r--meta-netboot/recipes-core/initramfs-netboot/files/init.sh1
1 files changed, 1 insertions, 0 deletions
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"