This commit is contained in:
Bob Mottram 2018-03-17 22:13:01 +00:00
commit 47feb45691
3 changed files with 217 additions and 320 deletions

View File

@ -1780,8 +1780,8 @@ function show_firewall {
echo $"Firewall Settings" echo $"Firewall Settings"
echo '' echo ''
while read -r line; do while read -r line; do
firewall_name=$(awk "$line" -F '=' '{print $1}') firewall_name=$(echo "$line" | awk -F '=' '{print $1}')
firewall_port=$(awk "$line" -F '=' '{print $2}') firewall_port=$(echo "$line" | awk -F '=' '{print $2}')
echo -n -e "$(pad_string "${firewall_name}")" echo -n -e "$(pad_string "${firewall_name}")"
echo "${firewall_port}" echo "${firewall_port}"
done < "$FIREWALL_CONFIG" done < "$FIREWALL_CONFIG"
@ -1881,29 +1881,25 @@ function email_smtp_proxy {
function menu_backup_restore { function menu_backup_restore {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Backup data to USB drive"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Restore GPG key from USB keydrive"
--title $"Backup and Restore" \ 3 $"Restore data from USB drive"
--radiolist $"Choose an operation:" 19 70 12 \ 4 $"Reinstall mariadb"
1 $"Backup data to USB drive" off \ 5 $"Configure remote backups"
2 $"Restore GPG key from USB keydrive" off \ 6 $"Restore from remote backup"
3 $"Restore data from USB drive" off \ 7 $"Backup GPG key to USB (master keydrive)"
4 $"Reinstall mariadb" off \ 8 $"Backup GPG key to USB (fragment keydrive)"
5 $"Configure remote backups" off \ 9 $"Format a USB drive (LUKS encrypted)"
6 $"Restore from remote backup" off \ 10 $"Remove backups from a USB drive")
7 $"Backup GPG key to USB (master keydrive)" off \
8 $"Backup GPG key to USB (fragment keydrive)" off \ # shellcheck disable=SC2068
9 $"Format a USB drive (LUKS encrypted)" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Backup and Restore" --menu $"Choose an operation, or ESC for main menu:" 19 70 12 "${W[@]}" 3>&2 2>&1 1>&3)
10 $"Remove backups from a USB drive" off \
11 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) backup_data;; 1) backup_data;;
2) restore_gpg_key;; 2) restore_gpg_key;;
3) restore_data;; 3) restore_data;;
@ -1914,36 +1910,29 @@ function menu_backup_restore {
8) create_keydrive_fragment;; 8) create_keydrive_fragment;;
9) format_drive;; 9) format_drive;;
10) remove_backups;; 10) remove_backups;;
11) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
function menu_email { function menu_email {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Add a user to a mailing list"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Remove a user from a mailing list"
--title $"Email Menu" \ 3 $"Add an email rule"
--radiolist $"Choose an operation:" 15 70 8 \ 4 $"Block/Unblock an email address"
1 $"Add a user to a mailing list" off \ 5 $"Block/Unblock email with subject text"
2 $"Remove a user from a mailing list" off \ 6 $"Outgoing Email Proxy"
3 $"Add an email rule" off \ 7 $"Extra email domains")
4 $"Block/Unblock an email address" off \
5 $"Block/Unblock email with subject text" off \ # shellcheck disable=SC2068
6 $"Outgoing Email Proxy" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Email Menu" --menu $"Choose an operation, or ESC for main menu:" 15 70 8 "${W[@]}" 3>&2 2>&1 1>&3)
7 $"Extra email domains" off \
8 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) add_to_mailing_list;; 1) add_to_mailing_list;;
2) remove_user_from_mailing_list;; 2) remove_user_from_mailing_list;;
3) email_rule;; 3) email_rule;;
@ -1951,10 +1940,7 @@ function menu_email {
5) block_unblock_subject;; 5) block_unblock_subject;;
6) email_smtp_proxy;; 6) email_smtp_proxy;;
7) email_extra_domains;; 7) email_extra_domains;;
8) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
@ -2073,66 +2059,52 @@ function domain_blocking_show {
function domain_blocking { function domain_blocking {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Block a domain or user"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Unblock a domain or user"
--title $"Domain or User Blocking" \ 3 $"Block an IP address"
--radiolist $"Choose an operation:" 14 60 6 \ 4 $"Unblock an IP address"
1 $"Block a domain or user" off \ 5 $"Show blocked domains and users")
2 $"Unblock a domain or user" off \
3 $"Block an IP address" off \ # shellcheck disable=SC2068
4 $"Unblock an IP address" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Domain or User Blocking" --menu $"Choose an operation, or ESC for main menu:" 13 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
5 $"Show blocked domains and users" off \
6 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) domain_blocking_add;; 1) domain_blocking_add;;
2) domain_blocking_remove;; 2) domain_blocking_remove;;
3) ip_blocking_add;; 3) ip_blocking_add;;
4) ip_blocking_remove;; 4) ip_blocking_remove;;
5) domain_blocking_show;; 5) domain_blocking_show;;
6) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
function menu_users { function menu_users {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Add a user"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Delete a user"
--title $"Manage Users" \ 3 $"Change user password"
--radiolist $"Choose an operation:" 13 70 6 \ 4 $"Change user ssh public key"
1 $"Add a user" off \ 5 $"Reset password tries")
2 $"Delete a user" off \
3 $"Change user password" off \ # shellcheck disable=SC2068
4 $"Change user ssh public key" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Manage Users" --menu $"Choose an operation, or ESC for main menu:" 13 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
5 $"Reset password tries" off \
6 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) add_user;; 1) add_user;;
2) delete_user;; 2) delete_user;;
3) change_password;; 3) change_password;;
4) change_ssh_public_key;; 4) change_ssh_public_key;;
5) reset_password_tries;; 5) reset_password_tries;;
6) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
@ -2202,31 +2174,24 @@ function menu_wifi {
fi fi
fi fi
data=$(mktemp 2>/dev/null) W=(1 $"Enable or disable Wifi"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Configure wifi networks"
--title $"Wifi Menu" \ 3 $"Manually edit wifi networks file"
--radiolist $"${status_str}\\n\\nChoose an operation:" 14 70 6 \ 4 $"Hotspot settings")
1 $"Enable or disable Wifi" off \
2 $"Configure wifi networks" off \ # shellcheck disable=SC2068
3 $"Manually edit wifi networks file" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Wifi Menu" --menu $"${status_str}\\n\\nChoose an operation, or ESC for main menu:" 14 70 6 "${W[@]}" 3>&2 2>&1 1>&3)
4 $"Hotspot settings" off \
5 $"Exit" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) wifi_enable;; 1) wifi_enable;;
2) wifi_settings;; 2) wifi_settings;;
3) wifi_edit_networks;; 3) wifi_edit_networks;;
4) hotspot_settings;; 4) hotspot_settings;;
5) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
@ -2275,41 +2240,38 @@ function menu_app_settings {
function menu_top_level { function menu_top_level {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"About this system"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Passwords"
--title $"Control Panel" \ 3 $"Backup and Restore"
--radiolist $"Choose an operation:" 30 70 22 \ 4 $"Show Firewall"
1 $"About this system" off \ 5 $"Verify Tripwire Code"
2 $"Passwords" off \ 6 $"Reset Tripwire"
3 $"Backup and Restore" off \ 7 $"App Settings"
4 $"Show Firewall" off \ 8 $"Add/Remove Apps"
5 $"Verify Tripwire Code" off \ 9 $"Logging on/off"
6 $"Reset Tripwire" off \ 10 $"Ping enable/disable"
7 $"App Settings" off \ 11 $"Manage Users"
8 $"Add/Remove Apps" off \ 12 $"Email Menu"
9 $"Logging on/off" off \ 13 $"Domain or User Blocking"
10 $"Ping enable/disable" off \ 14 $"Security Settings"
11 $"Manage Users" off \ 15 $"Change the name of this system"
12 $"Email Menu" off \ 16 $"Set a static local IP address"
13 $"Domain or User Blocking" off \ 17 $"Wifi menu"
14 $"Security Settings" off \ 18 $"Add Clacks"
15 $"Change the name of this system" off \ 19 $"Check for updates"
16 $"Set a static local IP address" off \ 20 $"Power off the system"
17 $"Wifi menu" off \ 21 $"Restart the system")
18 $"Add Clacks" off \
19 $"Check for updates" off \ # shellcheck disable=SC2068
20 $"Power off the system" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Administrator Control Panel" --menu $"Choose an operation, or ESC to exit:" 28 60 28 "${W[@]}" 3>&2 2>&1 1>&3)
21 $"Restart the system" off \
22 $"Exit" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
esac
please_wait please_wait
case $(cat "$data") in
case $selection in
1) show_about;; 1) show_about;;
2) view_or_change_passwords;; 2) view_or_change_passwords;;
3) menu_backup_restore;; 3) menu_backup_restore;;
@ -2335,10 +2297,7 @@ function menu_top_level {
19) check_for_updates;; 19) check_for_updates;;
20) shut_down_system;; 20) shut_down_system;;
21) restart_system;; 21) restart_system;;
22) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }

View File

@ -283,34 +283,25 @@ function gpg_set_trust {
fpr=$(gpg --with-colons --fingerprint "$TRUST_ADDRESS" | grep fpr | head -n 1 | awk -F ':' '{print $10}') fpr=$(gpg --with-colons --fingerprint "$TRUST_ADDRESS" | grep fpr | head -n 1 | awk -F ':' '{print $10}')
if [ ${#fpr} -gt 2 ]; then if [ ${#fpr} -gt 2 ]; then
data=$(mktemp 2>/dev/null) W=(1 $"I don't know or won't say"
dialog --backtitle $"Freedombone User Control Panel" \ 2 $"I do NOT trust"
--title $"Trust a PGP/GPG key or website domain" \ 3 $"I trust marginally"
--radiolist $"Set the trust level for $TRUST_ADDRESS:" 18 70 10 \ 4 $"I trust fully"
1 $"I don't know or won't say" off \ 5 $"I trust ultimately")
2 $"I do NOT trust" off \
3 $"I trust marginally" on \ # shellcheck disable=SC2068
4 $"I trust fully" off \ TRUST_LEVEL=$(dialog --backtitle $"Freedombone User Control Panel" --title $"Trust a PGP/GPG key or website domain" --menu $"Set the trust level for $TRUST_ADDRESS:" 18 70 10 "${W[@]}" 3>&2 2>&1 1>&3)
5 $"I trust ultimately" off 2> "$data"
sel=$? if [ ! "$TRUST_LEVEL" ]; then
case $sel in return;
1) rm -f "$data" fi
return;;
255) rm -f "$data" if echo -e "trust\\n${TRUST_LEVEL}\\ny\\nsave\\n" | gpg --command-fd 0 --edit-key "$fpr"; then
return;; gpg --update-trustdb
esac dialog --title $"Trust a PGP/GPG key or website domain" \
TRUST_LEVEL=$(cat "$data") --backtitle $"Freedombone User Control Panel" \
if [ "${TRUST_LEVEL}" -ge 1 ] ; then --msgbox $"$TRUST_ADDRESS was set to trust level ${TRUST_LEVEL}" 6 50
if [ "${TRUST_LEVEL}" -le 5 ] ; then
if echo -e "trust\\n${TRUST_LEVEL}\\ny\\nsave\\n" | gpg --command-fd 0 --edit-key "$fpr"; then
gpg --update-trustdb
dialog --title $"Trust a PGP/GPG key or website domain" \
--backtitle $"Freedombone User Control Panel" \
--msgbox $"$TRUST_ADDRESS was set to trust level ${TRUST_LEVEL}" 6 50
fi
fi
fi fi
rm -f "$data"
fi fi
} }
@ -732,29 +723,25 @@ function gpg_key_trust {
function menu_encryption_keys { function menu_encryption_keys {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Show your PGP/GPG key"
dialog --backtitle $"Freedombone User Control Panel" \ 2 $"Show your full PGP/GPG key, including private key"
--title $"My Encryption Keys" \ 3 $"Publish your PGP/GPG key so that others can find it"
--radiolist $"Choose an operation:" 19 70 11 \ 4 $"Add someone's PGP/GPG key"
1 $"Show your PGP/GPG key" off \ 5 $"Remove someone's PGP/GPG key"
2 $"Show your full PGP/GPG key, including private key" off \ 6 $"Sign a PGP/GPG key or website domain"
3 $"Publish your PGP/GPG key so that others can find it" off \ 7 $"Refresh your PGP/GPG keys"
4 $"Add someone's PGP/GPG key" off \ 8 $"Add an ssh key for logging in"
5 $"Remove someone's PGP/GPG key" off \ 9 $"Remove an ssh key for logging in"
6 $"Sign a PGP/GPG key or website domain" off \ 10 $"Set the trust level for a PGP/GPG key")
7 $"Refresh your PGP/GPG keys" off \
8 $"Add an ssh key for logging in" off \ # shellcheck disable=SC2068
9 $"Remove an ssh key for logging in" off \ selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"My Encryption Keys" --menu $"Choose an operation, or ESC for main menu:" 19 70 11 "${W[@]}" 3>&2 2>&1 1>&3)
10 $"Set the trust level for a PGP/GPG key" off \
11 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) show_gpg_key;; 1) show_gpg_key;;
2) show_full_gpg_key;; 2) show_full_gpg_key;;
3) publish_gpg_key;; 3) publish_gpg_key;;
@ -765,45 +752,35 @@ function menu_encryption_keys {
8) add_ssh_key;; 8) add_ssh_key;;
9) remove_ssh_key;; 9) remove_ssh_key;;
10) gpg_key_trust;; 10) gpg_key_trust;;
11) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
function menu_email { function menu_email {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Add yourself to a mailing list"
dialog --backtitle $"Freedombone User Control Panel" \ 2 $"Remove yourself from a mailing list"
--title $"Change Email Filtering Rules" \ 3 $"Add an email rule for an address"
--radiolist $"Choose an operation:" 14 70 7 \ 4 $"Add an email rule for a subject"
1 $"Add yourself to a mailing list" off \ 5 $"Block or unblock an email address"
2 $"Remove yourself from a mailing list" off \ 6 $"Block or unblock email with subject text")
3 $"Add an email rule for an address" off \
4 $"Add an email rule for a subject" off \ # shellcheck disable=SC2068
5 $"Block or unblock an email address" off \ selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"Change Email Filtering Rules" --menu $"Choose an operation, or ESC for main menu:" 14 70 7 "${W[@]}" 3>&2 2>&1 1>&3)
6 $"Block or unblock email with subject text" off \
7 $"Back to main menu" on 2> "$data" if [ ! "$selection" ]; then
sel=$? break
case $sel in fi
1) rm -f "$data"
break;; case $selection in
255) rm -f "$data"
break;;
esac
case $(cat "$data") in
1) add_to_mailing_list;; 1) add_to_mailing_list;;
2) remove_user_from_mailing_list;; 2) remove_user_from_mailing_list;;
3) email_rule_address;; 3) email_rule_address;;
4) email_rule_subject;; 4) email_rule_subject;;
5) block_unblock_email;; 5) block_unblock_email;;
6) block_unblock_subject;; 6) block_unblock_subject;;
7) rm -f "$data"
break;;
esac esac
rm -f "$data"
done done
} }
@ -899,28 +876,24 @@ function show_your_email_address {
function menu_top_level { function menu_top_level {
while true while true
do do
data=$(mktemp 2>/dev/null) W=(1 $"Use Email"
dialog --backtitle $"Freedombone User Control Panel" \ 2 $"Show your Email Address"
--title $"User Control Panel" \ 3 $"Change Email Filtering/Blocking Rules"
--radiolist $"Choose an operation:" 20 60 13 \ 4 $"Run an App"
1 $"Use Email" off \ 5 $"Browse the Web"
2 $"Show your Email Address" off \ 6 $"My Encryption Keys"
3 $"Change Email Filtering/Blocking Rules" off \ 7 $"Set an outgoing email proxy"
4 $"Run an App" off \ 8 $"Administrator controls"
5 $"Browse the Web" off \ 9 $"Exit to the command line")
6 $"My Encryption Keys" off \
7 $"Set an outgoing email proxy" off \ # shellcheck disable=SC2068
8 $"Administrator controls" off \ selection=$(dialog --backtitle $"Freedombone User Control Panel" --title $"User Control Panel" --menu $"Choose an operation, or ESC to log out:" 20 60 13 "${W[@]}" 3>&2 2>&1 1>&3)
9 $"Exit to the command line" off \ if [ ! "$selection" ]; then
10 $"Log out" on 2> "$data" kill -HUP "$(pgrep -s 0 -o)"
sel=$? break
case $sel in fi
1) rm -f "$data"
exit 1;; case $selection in
255) rm -f "$data"
exit 1;;
esac
case $(cat "$data") in
1) mutt;; 1) mutt;;
2) show_your_email_address;; 2) show_your_email_address;;
3) menu_email;; 3) menu_email;;
@ -929,11 +902,8 @@ function menu_top_level {
6) menu_encryption_keys;; 6) menu_encryption_keys;;
7) smtp_proxy;; 7) smtp_proxy;;
8) menu_admin;; 8) menu_admin;;
9) rm -f "$data" 9) break;;
break;;
10) kill -HUP "$(pgrep -s 0 -o)";;
esac esac
rm -f "$data"
done done
} }

View File

@ -924,86 +924,66 @@ function remove_tor_bridge_relay {
} }
function menu_tor_bridges { function menu_tor_bridges {
data=$(mktemp 2>/dev/null) W=(1 $"Show bridges"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Add a bridge"
--title $"Tor Bridges" \ 3 $"Remove a bridge"
--radiolist $"Choose an operation:" 14 50 6 \ 4 $"Make this system into a bridge"
1 $"Show bridges" off \ 5 $"Stop being a bridge")
2 $"Add a bridge" off \
3 $"Remove a bridge" off \
4 $"Make this system into a bridge" off \
5 $"Stop being a bridge" off \
6 $"Go Back/Exit" on 2> "$data"
sel=$?
case $sel in
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
esac
case $(cat "$data") in # shellcheck disable=SC2068
selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Security Settings" --menu $"Choose an operation, or ESC to go back:" 14 50 6 "${W[@]}" 3>&2 2>&1 1>&3)
if [ ! "$selection" ]; then
exit 0
fi
case $selection in
1) 1)
show_tor_bridges show_tor_bridges
rm -f "$data"
exit 0 exit 0
;; ;;
2) 2)
add_tor_bridge add_tor_bridge
rm -f "$data"
exit 0 exit 0
;; ;;
3) 3)
remove_tor_bridge remove_tor_bridge
rm -f "$data"
exit 0 exit 0
;; ;;
4) 4)
add_tor_bridge_relay add_tor_bridge_relay
rm -f "$data"
exit 0 exit 0
;; ;;
5) 5)
remove_tor_bridge_relay remove_tor_bridge_relay
rm -f "$data"
exit 0
;;
6)
rm -f "$data"
exit 0 exit 0
;; ;;
esac esac
rm -f "$data"
} }
function menu_security_settings { function menu_security_settings {
data=$(mktemp 2>/dev/null) W=(1 $"Run STIG tests"
dialog --backtitle $"Freedombone Control Panel" \ 2 $"Fix STIG test failures"
--title $"Security Settings" \ 3 $"Show ssh host public key"
--radiolist $"Choose an operation:" 23 76 23 \ 4 $"Tor bridges"
1 $"Run STIG tests" off \ 5 $"Password storage"
2 $"Fix STIG test failures" off \ 6 $"Export passwords"
3 $"Show ssh host public key" off \ 7 $"Regenerate ssh host keys"
4 $"Tor bridges" off \ 8 $"Regenerate Diffie-Hellman keys"
5 $"Password storage" off \ 9 $"Update cipersuite"
6 $"Export passwords" off \ 10 $"Create a new Let's Encrypt certificate"
7 $"Regenerate ssh host keys" off \ 11 $"Renew Let's Encrypt certificate"
8 $"Regenerate Diffie-Hellman keys" off \ 12 $"Delete a Let's Encrypt certificate"
9 $"Update cipersuite" off \ 13 $"Enable GPG based authentication (monkeysphere)"
10 $"Create a new Let's Encrypt certificate" off \ 14 $"Register a website with monkeysphere"
11 $"Renew Let's Encrypt certificate" off \ 15 $"Allow ssh login with passwords")
12 $"Delete a Let's Encrypt certificate" off \
13 $"Enable GPG based authentication (monkeysphere)" off \ # shellcheck disable=SC2068
14 $"Register a website with monkeysphere" off \ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Security Settings" --menu $"Choose an operation, or ESC to exit:" 23 76 23 "${W[@]}" 3>&2 2>&1 1>&3)
15 $"Allow ssh login with passwords" off \
16 $"Go Back/Exit" on 2> "$data" if [ ! "$selection" ]; then
sel=$? exit 0
case $sel in fi
1) rm -f "$data"
exit 1;;
255) rm -f "$data"
exit 1;;
esac
clear clear
@ -1019,13 +999,12 @@ function menu_security_settings {
import_settings import_settings
export_settings export_settings
case $(cat "$data") in case $selection in
1) 1)
clear clear
echo $'Running STIG tests...' echo $'Running STIG tests...'
echo '' echo ''
${PROJECT_NAME}-tests --stig showall ${PROJECT_NAME}-tests --stig showall
rm -f "$data"
exit 0 exit 0
;; ;;
2) 2)
@ -1034,28 +1013,23 @@ function menu_security_settings {
echo '' echo ''
${PROJECT_NAME}-tests --stig fix ${PROJECT_NAME}-tests --stig fix
echo $'Fixes applied. You will need to run the STIG tests again to be sure that they were all fixed.' echo $'Fixes applied. You will need to run the STIG tests again to be sure that they were all fixed.'
rm -f "$data"
exit 0 exit 0
;; ;;
3) 3)
dialog --title $"SSH host public keys" \ dialog --title $"SSH host public keys" \
--msgbox "\n$(get_ssh_server_key)" 12 60 --msgbox "\\n$(get_ssh_server_key)" 12 60
rm -f "$data"
exit 0 exit 0
;; ;;
4) 4)
menu_tor_bridges menu_tor_bridges
rm -f "$data"
exit 0 exit 0
;; ;;
5) 5)
store_passwords store_passwords
rm -f "$data"
exit 0 exit 0
;; ;;
6) 6)
export_passwords export_passwords
rm -f "$data"
exit 0 exit 0
;; ;;
7) 7)
@ -1086,15 +1060,9 @@ function menu_security_settings {
15) 15)
allow_ssh_passwords allow_ssh_passwords
change_ssh_settings change_ssh_settings
rm -f "$data"
exit 0
;;
16)
rm -f "$data"
exit 0 exit 0
;; ;;
esac esac
rm -f "$data"
change_website_settings change_website_settings
change_imap_settings change_imap_settings