Check on $USER was always true
This commit is contained in:
parent
2e6c4f541f
commit
536de976cc
|
@ -18,4 +18,6 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
### Fixed
|
||||
|
||||
* Check on $USER was always true
|
||||
|
||||
### Security
|
||||
|
|
4
shellpki
4
shellpki
|
@ -485,7 +485,9 @@ main() {
|
|||
PKIUSER="shellpki"
|
||||
fi
|
||||
|
||||
[ "${USER}" != "root" ] || [ "${USER}" != "${PKIUSER}" ] || error "Please become root before running ${0} !"
|
||||
if [ "${USER}" != "root" ] && [ "${USER}" != "${PKIUSER}" ]; then
|
||||
error "Please become root before running ${0} !"
|
||||
fi
|
||||
|
||||
# retrieve CA path from config file
|
||||
CADIR=$(grep -E "^dir" "${CONFFILE}" | cut -d'=' -f2|xargs -n1)
|
||||
|
|
Loading…
Reference in a new issue