mirror of
https://github.com/kernelkit/infix.git
synced 2026-08-03 14:23:02 +02:00
confd: do not fail if pwhash is missing in VPD, instead lock account
If pwhash is missing from system.json, lock account. This allows for more extensive diagnosis on developer builds with a root login. Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
@@ -5,7 +5,12 @@ shell="$1"
|
||||
pwhash="$(jq .pwhash /run/system.json)"
|
||||
|
||||
if [ -z "$pwhash" ] || [ "$pwhash" = "null" ]; then
|
||||
exit 1
|
||||
# Do not fail, lock account instead. This way developers can enable
|
||||
# root account login at build-tiem to diagnose the system.
|
||||
pwhash="!"
|
||||
rc=1
|
||||
else
|
||||
rc=0
|
||||
fi
|
||||
|
||||
cat <<EOF
|
||||
@@ -23,3 +28,5 @@ cat <<EOF
|
||||
}
|
||||
}
|
||||
EOF
|
||||
|
||||
exit $rc
|
||||
|
||||
Reference in New Issue
Block a user