diff options
author | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 22:57:44 -0500 |
---|---|---|
committer | A. Wilcox <AWilcox@Wilcox-Tech.com> | 2019-10-08 22:57:44 -0500 |
commit | ee19bcceefbd1c4c604d1afe832e0b6f669d5eae (patch) | |
tree | 896cfe715aea1e9786896e74d02b5bffab21ba69 /hscript/user.cc | |
parent | 831f22fb241e6bbf6e03a61f76932a22a63e4564 (diff) | |
download | horizon-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.cc | 3 |
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"); |