mirror of
https://github.com/hackacad/bastille.git
synced 2025-12-21 17:52:01 +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
|
||||
# Disables adjkerntz, avoids spurious error messages
|
||||
# Set strict permissions on the jail by default
|
||||
touch "etc/fstab"
|
||||
sed -i '' 's|[0-9],[0-9]\{2\}.*[0-9]-[0-9].*root.*kerntz -a|#& # Disabled by bastille|' "etc/crontab"
|
||||
if [ -z "${EMPTY_JAIL}" ]; then
|
||||
touch "etc/fstab"
|
||||
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}"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user