mirror of
https://github.com/tasket/Qubes-VM-hardening.git
synced 2024-10-01 06:35:42 -04:00
mutable for rm, use mkhomedir_helper
This commit is contained in:
parent
302c968313
commit
55181dc2dd
3
ibrowse.whitelist
Normal file
3
ibrowse.whitelist
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
/rw/home/user/.mozilla/firefox/profile.default/places.sqlite
|
||||||
|
/rw/home/user/.mozilla/firefox/profile.default/places.sqlite-shm
|
||||||
|
/rw/home/user/.mozilla/firefox/profile.default/places.sqlite-wal
|
@ -134,11 +134,11 @@ if qsvc vm-boot-protect || qsvc vm-boot-protect-root; then
|
|||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Don't bother with root protections in template or standalone
|
# Don't bother with root protections in template or standalone
|
||||||
if ! is_rwonly_persistent; then
|
if ! is_rwonly_persistent; then
|
||||||
make_immutable
|
make_immutable
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@ -191,19 +191,24 @@ if qsvc vm-boot-protect-root && is_rwonly_persistent; then
|
|||||||
subdir=`echo $dir |sed -r 's|^/rw/||'`
|
subdir=`echo $dir |sed -r 's|^/rw/||'`
|
||||||
bakdir="$rwbak/BAK-$subdir"
|
bakdir="$rwbak/BAK-$subdir"
|
||||||
origdir="$rwbak/ORIG-$subdir"
|
origdir="$rwbak/ORIG-$subdir"
|
||||||
if [ -d "$bakdir" ] && [ ! -d "$origdir" ]; then
|
if [ -e "$bakdir" ] && [ ! -e "$origdir" ]; then
|
||||||
mv "$bakdir" "$origdir"
|
mv "$bakdir" "$origdir"
|
||||||
fi
|
fi
|
||||||
rm -rf "$bakdir"
|
if [ -e "$bakdir" ]; then
|
||||||
|
chattr -R -i "$bakdir"
|
||||||
|
rm -rf "$bakdir"
|
||||||
|
fi
|
||||||
mv "$rw/$subdir" "$bakdir"
|
mv "$rw/$subdir" "$bakdir"
|
||||||
mkdir -p "$rw/$subdir"
|
mkdir -p "$rw/$subdir"
|
||||||
|
|
||||||
# Populate /home/user w skel files if it was in privdirs
|
# Populate /home/user w skel files if it was in privdirs
|
||||||
case "$subdir" in
|
case "$subdir" in
|
||||||
"home"|"home/"|"home/user"|"home/user/")
|
"home"|"home/"|"home/user"|"home/user/")
|
||||||
mkdir -p $rw/home/user
|
echo "Populating home dir"
|
||||||
cp -aT /etc/skel $rw/home/user
|
#chown user:user $rw/home/user
|
||||||
chown -R user:user $rw/home/user
|
rm -rf /home/user $rw/home/user
|
||||||
|
mkhomedir_helper user
|
||||||
|
mv /home/user $rw/home
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
done
|
done
|
||||||
|
Loading…
Reference in New Issue
Block a user