Openembedded Core Discussions
 help / color / mirror / Atom feed
From: "Mathieu Dubois-Briand" <mathieu.dubois-briand@bootlin.com>
To: <sivakumar.bs@gmail.com>, <openembedded-core@lists.openembedded.org>
Cc: "Chen Qi" <Qi.Chen@windriver.com>
Subject: Re: [OE-core][PATCH v1] util-linux: backport pam_lastlog2 libpam linking fix
Date: Thu, 25 Jun 2026 14:55:30 +0200	[thread overview]
Message-ID: <DJI5A0TDU4MZ.27335X1KDK4AQ@bootlin.com> (raw)
In-Reply-To: <20260625090231.2575081-1-sivakumar.bs@gmail.com>

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 <sivakumar.bs@gmail.com>
> ---
> 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/20260619083305.3505156-2-alex.kanavin@gmail.com/

Thanks,
Mathieu

-- 
Mathieu Dubois-Briand, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



  reply	other threads:[~2026-06-25 12:55 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-06-25  9:02 [OE-core][PATCH v1] util-linux: backport pam_lastlog2 libpam linking fix Siva Balasubramanian
2026-06-25 12:55 ` Mathieu Dubois-Briand [this message]
2026-06-25 15:06   ` Siva Kumar Balasubramanian
2026-07-06  6:30 ` [OE-core][wrynose][PATCH v2] " Siva Balasubramanian
2026-07-06  9:31   ` Yoann Congal
2026-07-06 10:56     ` Siva Kumar Balasubramanian
2026-07-06 12:16       ` Yoann Congal
2026-07-06 11:55 ` [OE-core][wrynose][PATCH] util-linux: upgrade 2.41.3 -> 2.41.5 Siva Balasubramanian

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=DJI5A0TDU4MZ.27335X1KDK4AQ@bootlin.com \
    --to=mathieu.dubois-briand@bootlin.com \
    --cc=Qi.Chen@windriver.com \
    --cc=openembedded-core@lists.openembedded.org \
    --cc=sivakumar.bs@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox