Enable or disable password storage
This commit is contained in:
parent
5ff2e50dfe
commit
1b0820bf46
|
@ -160,6 +160,13 @@ do
|
||||||
-c|--clear|--erase)
|
-c|--clear|--erase)
|
||||||
clear_passwords
|
clear_passwords
|
||||||
;;
|
;;
|
||||||
|
-e|--enable)
|
||||||
|
shift
|
||||||
|
if [ -f $NO_PASSWORD_STORE_FILE ]; then
|
||||||
|
rm $NO_PASSWORD_STORE_FILE
|
||||||
|
echo $'Password storage has been enabled'
|
||||||
|
fi
|
||||||
|
;;
|
||||||
-u|--user|--username)
|
-u|--user|--username)
|
||||||
shift
|
shift
|
||||||
CURR_USERNAME="${1}"
|
CURR_USERNAME="${1}"
|
||||||
|
|
|
@ -685,19 +685,24 @@ function remove_pinning {
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
function clear_passwords {
|
function store_passwords {
|
||||||
dialog --title $"Clear Passwords" \
|
dialog --title $"Store Passwords" \
|
||||||
--backtitle $"Freedombone Security Configuration" \
|
--backtitle $"Freedombone Security Configuration" \
|
||||||
--defaultno \
|
--yesno $"\nDo you wish to store passwords on the system? Stored passwords are convenient but carry some additional security risk." 10 60
|
||||||
--yesno $"\nThis will remove all user passwords from the system. Are you sure that you want to do this?" 8 60
|
|
||||||
sel=$?
|
sel=$?
|
||||||
case $sel in
|
case $sel in
|
||||||
1) return;;
|
0)
|
||||||
|
${PROJECT_NAME}-pass --enable yes
|
||||||
|
return
|
||||||
|
;;
|
||||||
|
1)
|
||||||
|
${PROJECT_NAME}-pass --clear yes
|
||||||
|
dialog --title $"Passwords were removed and will not be stored" \
|
||||||
|
--msgbox $"\nFor the best security you should now manually change passwords via web interfaces so that there is no possibility of them being recovered from the disk" 9 60
|
||||||
|
return
|
||||||
|
;;
|
||||||
255) return;;
|
255) return;;
|
||||||
esac
|
esac
|
||||||
${PROJECT_NAME}-pass --clear yes
|
|
||||||
dialog --title $"Passwords were removed" \
|
|
||||||
--msgbox $"\nFor the best security you should now manually change passwords via web interfaces so that there is no possibility of them being recovered from the disk" 9 60
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function menu_security_settings {
|
function menu_security_settings {
|
||||||
|
@ -707,7 +712,7 @@ function menu_security_settings {
|
||||||
--title $"Security Settings" \
|
--title $"Security Settings" \
|
||||||
--radiolist $"Choose an operation:" 18 76 18 \
|
--radiolist $"Choose an operation:" 18 76 18 \
|
||||||
1 $"Show ssh host public key" off \
|
1 $"Show ssh host public key" off \
|
||||||
2 $"Clear password store" off \
|
2 $"Password storage" off \
|
||||||
3 $"Regenerate ssh host keys" off \
|
3 $"Regenerate ssh host keys" off \
|
||||||
4 $"Regenerate Diffie-Hellman keys" off \
|
4 $"Regenerate Diffie-Hellman keys" off \
|
||||||
5 $"Update cipersuite" off \
|
5 $"Update cipersuite" off \
|
||||||
|
@ -744,7 +749,7 @@ function menu_security_settings {
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
2)
|
2)
|
||||||
clear_passwords
|
store_passwords
|
||||||
exit 0
|
exit 0
|
||||||
;;
|
;;
|
||||||
3)
|
3)
|
||||||
|
|
Loading…
Reference in New Issue