mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-13 04:32:48 +01:00
[feat] Remove so-setup permission from sudoers file after iso setup
Closes #1701
This commit is contained in:
@@ -191,6 +191,7 @@ pillar_changes() {
|
|||||||
[[ "$INSTALLEDVERSION" =~ rc.1 ]] && rc1_to_rc2
|
[[ "$INSTALLEDVERSION" =~ rc.1 ]] && rc1_to_rc2
|
||||||
[[ "$INSTALLEDVERSION" =~ rc.2 ]] && rc2_to_rc3
|
[[ "$INSTALLEDVERSION" =~ rc.2 ]] && rc2_to_rc3
|
||||||
[[ "$INSTALLEDVERSION" =~ rc.3 ]] && rc3_to_2.3.0
|
[[ "$INSTALLEDVERSION" =~ rc.3 ]] && rc3_to_2.3.0
|
||||||
|
[[ "$INSTALLEDVERSION" =~ 2.3.2 ]] && up_2.3.2_to_2.3.10
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -292,6 +293,12 @@ unmount_update() {
|
|||||||
umount /tmp/soagupdate
|
umount /tmp/soagupdate
|
||||||
}
|
}
|
||||||
|
|
||||||
|
up_2.3.2_to_2.3.10() {
|
||||||
|
if grep -q "so-setup" /etc/sudoers; then
|
||||||
|
echo "[ INFO ] There is an entry for so-setup in the sudoers file, this can be safely deleted using \"visudo\"."
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
update_centos_repo() {
|
update_centos_repo() {
|
||||||
# Update the files in the repo
|
# Update the files in the repo
|
||||||
echo "Syncing new updates to /nsm/repo"
|
echo "Syncing new updates to /nsm/repo"
|
||||||
|
|||||||
@@ -1019,6 +1019,10 @@ install_cleanup() {
|
|||||||
# If Mysql is running stop it
|
# If Mysql is running stop it
|
||||||
/usr/sbin/so-mysql-stop
|
/usr/sbin/so-mysql-stop
|
||||||
|
|
||||||
|
if [[ $install_type == 'iso' ]]; then
|
||||||
|
info "Removing so-setup permission entry from sudoers file"
|
||||||
|
sed -i '/so-setup/d' /etc/sudoers
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
import_registry_docker() {
|
import_registry_docker() {
|
||||||
|
|||||||
Reference in New Issue
Block a user