summaryrefslogtreecommitdiff
path: root/hscript/user.cc
diff options
context:
space:
mode:
authorA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-08 22:57:44 -0500
committerA. Wilcox <AWilcox@Wilcox-Tech.com>2019-10-08 22:57:44 -0500
commitee19bcceefbd1c4c604d1afe832e0b6f669d5eae (patch)
tree896cfe715aea1e9786896e74d02b5bffab21ba69 /hscript/user.cc
parent831f22fb241e6bbf6e03a61f76932a22a63e4564 (diff)
downloadhorizon-ee19bcceefbd1c4c604d1afe832e0b6f669d5eae.tar.gz
horizon-ee19bcceefbd1c4c604d1afe832e0b6f669d5eae.tar.bz2
horizon-ee19bcceefbd1c4c604d1afe832e0b6f669d5eae.tar.xz
horizon-ee19bcceefbd1c4c604d1afe832e0b6f669d5eae.zip
Make +pretty+ a global var instead of passed everywhere
Diffstat (limited to 'hscript/user.cc')
-rw-r--r--hscript/user.cc3
1 files changed, 2 insertions, 1 deletions
diff --git a/hscript/user.cc b/hscript/user.cc
index 12d01fc..ec4a213 100644
--- a/hscript/user.cc
+++ b/hscript/user.cc
@@ -17,7 +17,8 @@ using namespace Horizon::Keys;
Key *RootPassphrase::parseFromData(const std::string data, int lineno,
int *errors, int *warnings) {
- if(data.size() < 5 || data[0] != '$' || data[2] != '$') {
+ if(data.size() < 5 || data[0] != '$' || (data[1] != '2' && data[1] != '6')
+ || data[2] != '$') {
if(errors) *errors += 1;
output_error("installfile:" + std::to_string(lineno),
"rootpw: value is not a crypt-style encrypted passphrase");