Merge pull request #5453 from antonlacon/le11-passwd

buildsystem: cleanup password hashing; drop busybox:host
This commit is contained in:
CvH
2021-10-03 08:00:41 +02:00
committed by GitHub
3 changed files with 4 additions and 1193 deletions

View File

@@ -1496,6 +1496,8 @@ add_user() {
PASSWORD="$2"
if [ "$PASSWORD" = "x" ]; then
PASSWORD="*"
else
PASSWORD=$(python -c "import crypt; print(crypt.crypt('$PASSWORD', crypt.mksalt(crypt.METHOD_SHA512)))")
fi
if ! grep -q "^$1:" ${INSTALL}/usr/cache/shadow; then
echo "$1:$PASSWORD:::::::" >> ${INSTALL}/usr/cache/shadow