mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-20 09:10:15 +01:00
Properly check for home dir and symlink
This commit is contained in:
@@ -207,10 +207,6 @@ create_jail() {
|
||||
mkdir -p "${bastille_jail_base}"
|
||||
fi
|
||||
|
||||
if [ ! -d "${bastille_jail_path}/usr/home" ]; then
|
||||
mkdir -p "${bastille_jail_path}/usr/home"
|
||||
fi
|
||||
|
||||
if [ ! -d "${bastille_jail_path}/usr/local" ]; then
|
||||
mkdir -p "${bastille_jail_path}/usr/local"
|
||||
fi
|
||||
@@ -259,14 +255,12 @@ create_jail() {
|
||||
echo
|
||||
|
||||
if [ -z "${THICK_JAIL}" ]; then
|
||||
for _link in bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/sbin usr/share usr/src; do
|
||||
LINK_LIST="bin boot lib libexec rescue sbin usr/bin usr/include usr/lib usr/lib32 usr/libdata usr/libexec usr/sbin usr/share usr/src"
|
||||
for _link in ${LINK_LIST}; do
|
||||
ln -sf /.bastille/${_link} ${_link}
|
||||
done
|
||||
fi
|
||||
|
||||
## link home properly
|
||||
ln -s usr/home home
|
||||
|
||||
if [ -z "${THICK_JAIL}" ]; then
|
||||
## rw
|
||||
## copy only required files for thin jails
|
||||
@@ -324,6 +318,15 @@ create_jail() {
|
||||
fi
|
||||
fi
|
||||
|
||||
## create home directory if missing
|
||||
if [ ! -d "${bastille_jail_path}/usr/home" ]; then
|
||||
mkdir -p "${bastille_jail_path}/usr/home"
|
||||
fi
|
||||
## link home properly
|
||||
if [ ! -L "home" ]; then
|
||||
ln -s usr/home home
|
||||
fi
|
||||
|
||||
## rc.conf
|
||||
## + syslogd_flags="-ss"
|
||||
## + sendmail_enable="NO"
|
||||
|
||||
Reference in New Issue
Block a user