base-files: address sed in-place without SELinux awareness
authorDominick Grift <dominick.grift@defensec.nl>
Sun, 1 May 2022 17:54:04 +0000 (19:54 +0200)
committerDaniel Golle <daniel@makrotopia.org>
Mon, 2 May 2022 17:56:02 +0000 (18:56 +0100)
commit5109bd164c8f2273329483f990188fb36cf3ad68
tree0af07ae4c90c3174b445557a4cb8e4e4826edca6
parent7d02fc0951ffcff3ba885374b108d20de92eddbe
base-files: address sed in-place without SELinux awareness

sed(1) in busybox does not support this functionality:
https://git.savannah.gnu.org/cgit/sed.git/tree/sed/execute.c#n598

This causes /etc/group to become mislabeled when a package requests
that a uid/gid be added on OpenWrt with SELinux

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
[move restorecon inside lock]
Signed-off-by: Dominick Grift <dominick.grift@defensec.nl>
package/base-files/files/lib/functions.sh