From 20db1701409d85e61564c561790419bc42b6cdca Mon Sep 17 00:00:00 2001 From: CyberLeo Date: Mon, 15 Feb 2010 05:43:01 -0600 Subject: [PATCH] script/gentree: restrict permissions on confdirs, to keep out nosey neighbours --- script/gentree | 3 +++ src/overlay/sbin/saveconfig | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/script/gentree b/script/gentree index c7c5735..550768b 100755 --- a/script/gentree +++ b/script/gentree @@ -200,8 +200,11 @@ do_imgconf() { chk mkdir -p "${sroot}/conf" echo "ufs:/dev/ufs/conf" > "${sroot}/conf/diskless_remount" || chk chk mkdir -p "${sconf}/backup" + chk chmod 750 "${sconf}/backup" chk mkdir -p "${sconf}/base" + chk chmod 750 "${sconf}/base" chk mkdir -p "${sconf}/default" + chk chmod 750 "${sconf}/default" # Create packdirs for each for pack in "${base}/conf"/*.md_size diff --git a/src/overlay/sbin/saveconfig b/src/overlay/sbin/saveconfig index 2f5cffc..6f9048d 100755 --- a/src/overlay/sbin/saveconfig +++ b/src/overlay/sbin/saveconfig @@ -44,7 +44,7 @@ fi # Store config in temp staging area rm -Rf /conf/tmp || exit 1 mkdir -p /conf/tmp || exit 1 -chmod 700 /conf/tmp || exit 1 +chmod 750 /conf/tmp || exit 1 # Grab a list of confpacks to store for pack in /conf/base/*/md_size -- 2.42.0