mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-22 02:00:08 +01:00
Don't create or modify etc/fstab and etc/crontab on empty jail creation
This commit is contained in:
@@ -386,8 +386,10 @@ create_jail() {
|
|||||||
# Creates a dummy fstab file
|
# Creates a dummy fstab file
|
||||||
# Disables adjkerntz, avoids spurious error messages
|
# Disables adjkerntz, avoids spurious error messages
|
||||||
# Set strict permissions on the jail by default
|
# Set strict permissions on the jail by default
|
||||||
|
if [ -z "${EMPTY_JAIL}" ]; then
|
||||||
touch "etc/fstab"
|
touch "etc/fstab"
|
||||||
sed -i '' 's|[0-9],[0-9]\{2\}.*[0-9]-[0-9].*root.*kerntz -a|#& # Disabled by bastille|' "etc/crontab"
|
sed -i '' 's|[0-9],[0-9]\{2\}.*[0-9]-[0-9].*root.*kerntz -a|#& # Disabled by bastille|' "etc/crontab"
|
||||||
|
fi
|
||||||
chmod 0700 "${bastille_jailsdir}/${NAME}"
|
chmod 0700 "${bastille_jailsdir}/${NAME}"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user