fix: images ship root locked, or the build fails; stamp the build date #31
No reviewers
Labels
No labels
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Keel-Linux/common!31
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "fix/image-ships-root-locked"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Layer (a) of the review finding on Keel-Linux/inithooks#35: Keep must never be offered for a password the image itself shipped.
mk/turnkey/seal-root, run last inroot.patched/postofmk/turnkey.mk: fails the build unless root's shadow field is exactly*,!or!*(whatpasswd --lockmakes of*). The field is compared, never printed. Then it writes the build date, UTC, to/etc/keel/build-date, the stamp inithooks compares the password's last change against.conf/turnkey.d/rootpassandconf/samba-rootpassignore a build timeROOT_PASS(a line says so, without the value): it gave every copy the same password. The first boot preseedROOT_PASS(inithooks) is untouched.turnkey-desktop.mkis left as it is.U6aMy0wojraho(the crypt of the empty string). seal-root refuses it, and so does inithooks#35.Tests (written first)
tests/seal-root.bats(new, 100 percent of seal-root's lines under kcov): accepts*,!,!*and stamps the date; refuses a hash (not printed), the empty-password hash, an empty field, a locked hash, a missing root entry, a missing shadow file; checks that turnkey.mk calls it last. The ROOT_PASS tests inrootpass.bats,samba-rootpass.batsandbefore-firstboot.batsnow expect it ignored.Test plan
/etc/keel/build-datepresent, root*in the tar.zst