From 5896c10a1a4ee60e4b2547f8911cc47a4c0d4ebb Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Tue, 3 Nov 2015 09:34:28 +0000 Subject: [PATCH] Move resetting of the tripwire to the control panel Since it's a commonly used function --- src/freedombone-controlpanel | 16 +++++++++++++--- src/freedombone-sec | 19 +------------------ 2 files changed, 14 insertions(+), 21 deletions(-) diff --git a/src/freedombone-controlpanel b/src/freedombone-controlpanel index 7c681589..d07b696a 100755 --- a/src/freedombone-controlpanel +++ b/src/freedombone-controlpanel @@ -450,6 +450,14 @@ function security_settings { any_key } +function reset_tripwire { + clear + echo ' + +' | reset-tripwire + any_key +} + function menu_backup_restore { while true do @@ -545,14 +553,15 @@ function menu_top_level { trap "rm -f $data" 0 1 2 5 15 dialog --backtitle "Freedombone Control Panel" \ --title "Control Panel" \ - --radiolist "Choose an operation:" 14 70 7 \ + --radiolist "Choose an operation:" 15 70 8 \ 1 "Backup and Restore" off \ 2 "Show SIP Phone Extensions" off \ 3 "Logging on/off" off \ 4 "Manage Users" off \ 5 "Email Filtering Rules" off \ 6 "Security Settings" off \ - 7 "Exit" on 2> $data + 7 "Reset Tripwire" off \ + 8 "Exit" on 2> $data sel=$? case $sel in 1) exit 1;; @@ -565,7 +574,8 @@ function menu_top_level { 4) menu_users;; 5) menu_email;; 6) security_settings;; - 7) break;; + 7) reset_tripwire;; + 8) break;; esac done } diff --git a/src/freedombone-sec b/src/freedombone-sec index 8092b13a..2f6d4680 100755 --- a/src/freedombone-sec +++ b/src/freedombone-sec @@ -52,7 +52,6 @@ CURRENT_DIR=$(pwd) REGENERATE_SSH_HOST_KEYS="no" REGENERATE_DH_KEYS="no" -RESET_TRIPWIRE="no" DH_KEYLENGTH=2048 function get_protocols_from_website { @@ -376,25 +375,13 @@ function regenerate_dh_keys { fi } -function reset_tripwire { - if [[ $RESET_TRIPWIRE != "yes" ]]; then - return - fi - clear - echo ' - -' | reset-tripwire - exit 0 -} - function housekeeping { cmd=(dialog --separate-output \ --backtitle "Freedombone Security Configuration" \ --title "Housekeeping options" \ --checklist "If you don't need to do any of these things then just press Enter:" 10 76 16) options=(1 "Regenerate ssh host keys" off - 2 "Regenerate Diffie-Hellman keys" off - 3 "Reset tripwire" off) + 2 "Regenerate Diffie-Hellman keys" off) choices=$("${cmd[@]}" "${options[@]}" 2>&1 >/dev/tty) clear for choice in $choices @@ -406,12 +393,8 @@ function housekeeping { 2) REGENERATE_DH_KEYS="yes" ;; - 3) - RESET_TRIPWIRE="yes" - ;; esac done - reset_tripwire } function import_settings {