base-files: Create /root w/ appropriate permissions
authorPhilip Prindeville <philipp@redfish-solutions.com>
Wed, 13 Sep 2023 15:10:32 +0000 (09:10 -0600)
committerHauke Mehrtens <hauke@hauke-m.de>
Sun, 12 Nov 2023 15:32:42 +0000 (16:32 +0100)
If /root is created with too permissive permissions, then sshd won't
trust the contents of /root/.ssh as being adequately protected.

Signed-off-by: Philip Prindeville <philipp@redfish-solutions.com>
package/base-files/Makefile

index bb369a82d9b67ca5f2f08e6f3cafddf75c0c8d30..67fc5d29c1d764c47fdf6cc7420b5ae72935fa23 100644 (file)
@@ -199,7 +199,8 @@ define Package/base-files/install
                $(1)/usr/lib \
                $(1)/usr/bin \
                $(1)/sys \
-               $(1)/www \
+               $(1)/www
+       mkdir -p -m 750 \
                $(1)/root
 
        $(LN) /proc/mounts $(1)/etc/mtab