Hi Mathieu,

Sent a [wrynose][PATCH] version targeting that branch:

https://patchwork.yoctoproject.org/project/oe-core/patch/[email protected]/

Same fix, verified the same way (readelf -d / dlopen test) since wrynose is
still on util-linux 2.41.3, same as master.

Thanks,
Siva

On Thu, Jun 25, 2026 at 6:25 PM Mathieu Dubois-Briand <
[email protected]> wrote:

> On Thu Jun 25, 2026 at 11:02 AM CEST, Siva Balasubramanian via
> lists.openembedded.org wrote:
> > pam_lastlog2.so uses pam_syslog() and other libpam symbols but the
> > autotools build did not link the module against libpam. With the
> > linker default of --as-needed, libpam was discarded and did not end
> > up in the module's ELF NEEDED entries. The module then fails to load
> > via dlopen() in processes that do not themselves link libpam (e.g.
> > systemd on recent Fedora, or weston on journald-based systems without
> > syslog):
> >
> >   PAM unable to dlopen(/usr/lib/security/pam_lastlog2.so): undefined
> symbol: pam_syslog
> >   PAM adding faulty module: /usr/lib/security/pam_lastlog2.so
> >
> > Backport the upstream fix (in 2.41.5) that moves -lpam into LIBADD so
> > it is placed after the object files and retained as a NEEDED entry.
> > Against 2.41.3 only the LIBADD line needs changing.
> >
> > [YOCTO #16320]
> >
> > Signed-off-by: Siva Balasubramanian <[email protected]>
> > ---
> > Verified by building util-linux with pam in DISTRO_FEATURES (qemux86-64):
> > without the patch the resulting pam_lastlog2.so has no libpam in its ELF
> > NEEDED entries; with the patch readelf -d reports libpam.so.0, matching
> > the upstream fix and resolving the dlopen() failure from the bug report.
> >
> > This is also a candidate for the stable 6.0.x branch (per the bug
> > report), which also ships util-linux 2.41.3; the same single-hunk
> > backport applies.
>
> Hi Siva,
>
> Thanks for the patch.
>
> We already have a pending patch for master, upgrading to 2.42.2 [1]. So
> I believe this patch won't be needed for master. It probably still makes
> sense for stable branches.
>
> [1]:
> https://lore.kernel.org/openembedded-core/[email protected]/
>
> Thanks,
> Mathieu
>
> --
> Mathieu Dubois-Briand, Bootlin
> Embedded Linux and Kernel engineering
> https://bootlin.com
>
>

-- 

Sivakumar B
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#239574): 
https://lists.openembedded.org/g/openembedded-core/message/239574
Mute This Topic: https://lists.openembedded.org/mt/119970715/21656
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub 
[[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to