All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] linux-pam: add patch for spurious password expires in 0 days warning
@ 2024-03-27 14:01 Andreas Hilse via buildroot
  2024-05-13 21:19 ` Thomas Petazzoni via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Hilse via buildroot @ 2024-03-27 14:01 UTC (permalink / raw)
  To: buildroot; +Cc: Andreas Hilse

Buildroot 2024.02 brings updated linux-pam 1.6.0 package which has a
regression, that warns users about their password expiring in 0 days
when logging in, even with password expiration not being active.
There is no newer version released yet.
Patch is working as intended, tested by me.

Patch taken from linux-pam PR: https://github.com/linux-pam/linux-pam/pull/744

Signed-off-by: Andreas Hilse <andreas.hilse@gmail.com>
---
 .../0002-do-not-warn-if-password-aging.patch  | 27 +++++++++++++++++++
 1 file changed, 27 insertions(+)
 create mode 100644 package/linux-pam/0002-do-not-warn-if-password-aging.patch

diff --git a/package/linux-pam/0002-do-not-warn-if-password-aging.patch b/package/linux-pam/0002-do-not-warn-if-password-aging.patch
new file mode 100644
index 0000000000..7df83bf058
--- /dev/null
+++ b/package/linux-pam/0002-do-not-warn-if-password-aging.patch
@@ -0,0 +1,27 @@
+From 470b5bdd8fd29d6b35e3a80f9a57bdd4b2438200 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann <tobias@stoeckmann.org>
+Date: Fri, 19 Jan 2024 10:09:00 +0100
+Subject: [PATCH] pam_unix: do not warn if password aging is disabled
+
+Later checks will print a warning if daysleft is 0. If password
+aging is disabled, leave daysleft at -1.
+
+Resolves: https://github.com/linux-pam/linux-pam/issues/743
+Fixes: 9ebc14085a3b ("pam_unix: allow disabled password aging")
+Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>
+---
+ modules/pam_unix/passverify.c | 1 -
+ 1 file changed, 1 deletion(-)
+
+diff --git a/modules/pam_unix/passverify.c b/modules/pam_unix/passverify.c
+index 5c4f862e7..1bc98fa25 100644
+--- a/modules/pam_unix/passverify.c
++++ b/modules/pam_unix/passverify.c
+@@ -314,7 +314,6 @@ PAMH_ARG_DECL(int check_shadow_expiry,
+ 	}
+ 	if (spent->sp_lstchg < 0) {
+ 		D(("password aging disabled"));
+-		*daysleft = 0;
+ 		return PAM_SUCCESS;
+ 	}
+ 	if (curdays < spent->sp_lstchg) {
-- 
2.34.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] linux-pam: add patch for spurious password expires in 0 days warning
  2024-03-27 14:01 [Buildroot] [PATCH] linux-pam: add patch for spurious password expires in 0 days warning Andreas Hilse via buildroot
@ 2024-05-13 21:19 ` Thomas Petazzoni via buildroot
  2024-05-14  9:33   ` Andreas Hilse via buildroot
  0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni via buildroot @ 2024-05-13 21:19 UTC (permalink / raw)
  To: Andreas Hilse via buildroot; +Cc: Andreas Hilse, Andreas Hilse

Hello Andreas,

On Wed, 27 Mar 2024 15:01:25 +0100
Andreas Hilse via buildroot <buildroot@buildroot.org> wrote:

> Buildroot 2024.02 brings updated linux-pam 1.6.0 package which has a
> regression, that warns users about their password expiring in 0 days
> when logging in, even with password expiration not being active.
> There is no newer version released yet.
> Patch is working as intended, tested by me.
> 
> Patch taken from linux-pam PR: https://github.com/linux-pam/linux-pam/pull/744

The patch is now upstream, at
https://github.com/linux-pam/linux-pam/commit/470b5bdd8fd29d6b35e3a80f9a57bdd4b2438200

Could you adjust the commit title to:

	package/linux-pam: add patch for spurious password expires in 0 days warning

> diff --git a/package/linux-pam/0002-do-not-warn-if-password-aging.patch b/package/linux-pam/0002-do-not-warn-if-password-aging.patch
> new file mode 100644
> index 0000000000..7df83bf058
> --- /dev/null
> +++ b/package/linux-pam/0002-do-not-warn-if-password-aging.patch
> @@ -0,0 +1,27 @@
> +From 470b5bdd8fd29d6b35e3a80f9a57bdd4b2438200 Mon Sep 17 00:00:00 2001
> +From: Tobias Stoeckmann <tobias@stoeckmann.org>
> +Date: Fri, 19 Jan 2024 10:09:00 +0100
> +Subject: [PATCH] pam_unix: do not warn if password aging is disabled
> +
> +Later checks will print a warning if daysleft is 0. If password
> +aging is disabled, leave daysleft at -1.
> +
> +Resolves: https://github.com/linux-pam/linux-pam/issues/743
> +Fixes: 9ebc14085a3b ("pam_unix: allow disabled password aging")
> +Signed-off-by: Tobias Stoeckmann <tobias@stoeckmann.org>

and here, add:

Upstream: https://github.com/linux-pam/linux-pam/commit/470b5bdd8fd29d6b35e3a80f9a57bdd4b2438200

followed by your Signed-off-by line ?

Thanks!

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Buildroot] [PATCH] linux-pam: add patch for spurious password expires in 0 days warning
  2024-05-13 21:19 ` Thomas Petazzoni via buildroot
@ 2024-05-14  9:33   ` Andreas Hilse via buildroot
  0 siblings, 0 replies; 3+ messages in thread
From: Andreas Hilse via buildroot @ 2024-05-14  9:33 UTC (permalink / raw)
  To: Thomas Petazzoni; +Cc: Andreas Hilse via buildroot

Hello Thomas,

There is already a new version 1.6.1 released by linux-pam that
contains the bugfix. I guess updating directly would be better.
What do you think?

Thanks!
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-14  9:33 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-03-27 14:01 [Buildroot] [PATCH] linux-pam: add patch for spurious password expires in 0 days warning Andreas Hilse via buildroot
2024-05-13 21:19 ` Thomas Petazzoni via buildroot
2024-05-14  9:33   ` Andreas Hilse via buildroot

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.