| Summary: | pam silently disables debug-tweaks and other image configuration | ||
|---|---|---|---|
| Product: | [Build System, Metadata & Runtime] OE-Core | Reporter: | Richard Purdie <richard.purdie> |
| Component: | configuration | Assignee: | Leonardo Sandoval Gonzalez <leonardo.sandoval.gonzalez> |
| Status: | VERIFIED FIXED | QA Contact: | Cristina Agurida <cristina-danielax.agurida> |
| Severity: | normal | ||
| Priority: | Medium+ | CC: | alejandro.hernandez, alexandru.c.georgescu, anibal.limon, bluelightning, cristina-danielax.agurida, georgex.l.musat, patrick.ohly |
| Version: | 1.8 | ||
| Target Milestone: | 1.9 M3 | ||
| Hardware: | x86 | ||
| OS: | Multiple | ||
| Whiteboard: | TC needed | ||
| OS type for building Yocto: | --- | Type of Regression: | --- |
| Verified: | Documentation change: | Yes (doc changes required) | |
|
Description
Richard Purdie
2015-07-20 20:30:58 UTC
Adding a warning/error message is a priority for this bug, once that is in place it can be lowered in priority and perhaps to a next release. In the end it is required to investigate why PAM is behaving like this. According to Paul, this worked in the past so it is required to know whether this is a regression. Right, I'm certain this used to work; last time I fixed it was poky revision .e2d24f517206f6b8d9767c5d6d24795be5969a96. would it be enough to remove related image features when pam distro feature is enable?
-IMAGE_FEATURES[validitems] += "debug-tweaks read-only-rootfs empty-root-password allow-empty-password post-install-logging"
+IMAGE_FEATURES[validitems] += "${@bb.utils.contains("DISTRO_FEATURES", "pam", "", "debug-tweaks read-only-rootfs empty-root-password allow-empty-password post-install-logging", d)}"
The above is done on image.bbclass.
I'd rather we fix the problem itself if at all practical. *** Bug 8094 has been marked as a duplicate of this bug. *** Paul, Reading [1], I believe I have a better idea. The patch that I have right now just replace the *nullok_secure* for *nullok* in case of PAM is present on DISTRO features (you already done it on e2d24f517206f6b8d9767c5d6d24795be5969a96, so I just wrapped that code into a function). Is that all that needs to be change? I do not think other image features need to change behavior if PAM is present. Let me know if I am wrong. [1] https://bugzilla.yoctoproject.org/show_bug.cgi?id=8094 I'm a bit confused - surely ssh_allow_empty_password is already being called in this case? (In reply to comment #7) > I'm a bit confused - surely ssh_allow_empty_password is already being called > in this case? No. What I have implemented so far, and currently being tested is that what you did in the mentioned patch ('s/nullok_secure/nullok') also applies when PAM is enabled (indirectly enabled by poky-lsb distro, or when building lsb images). This way, debug-tweaks & PAM works as expected (i.e. no password is asked to the user). I have not found the root cause yet (I focused too much on PAM but seems that is not related at all).
My conclusions so far is that this issue is not related with PAM; this is how I found the latter: I have created two images (with the poky-lsb distro and debug-tweaks image feature) , a core-image-minimal and a core-image-lsb-sdk, both including PAM, and the first works as expected (no password being asked) and the second doesn't.
One interesting point I am seeing is that the /etc/password on these two rootfs are different
core-image-minimal:
root::0:0:root:/home/root:/bin/sh
core-image-lsb-sdk:
root:x:0:0:root:/home/root:/bin/sh
So, one of the lsd-sdk packages or post scripts are touching /etc/password and setting a password for root, so this is the reason why pwd is being asked.
It appears that something going wrong when upgrade to 1.2.1, http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/meta/recipes-extended/pam/libpam_1.2.1.bb?id=88dd997d9941b63ae9eead6690ecf2b785c0740c If you revert that commit all works as expected. I have a suspicion that we need to be careful which images we test here since openssh uses pam whilst dropbear does not. I think I noticed the problem in the 1.2.1 upgrade patch. I've merged a fix into master for this: http://git.yoctoproject.org/cgit.cgi/poky/commit/?id=c75cefe8a382a63f625123c156137782db118f64 Dainel, please work with Lenoardo and RP to create QA tests to make sure we don't encounter this type of issue again. Verified on master: c75cefe8a382a63f625123c156137782db118f64 |