diff --git a/Fix-regular-users-expired-password-reset-issue.patch b/Fix-regular-users-expired-password-reset-issue.patch new file mode 100644 index 0000000000000000000000000000000000000000..17b79ab9e77cab74be9a38d490d1d5e6bdbded5e --- /dev/null +++ b/Fix-regular-users-expired-password-reset-issue.patch @@ -0,0 +1,31 @@ +From cf0d033360d8f41e16fc4898d0efc887995925f5 Mon Sep 17 00:00:00 2001 +From: mengchaoming +Date: Thu, 31 Oct 2024 15:37:50 +0800 +Subject: [PATCH] Fix-regular-users-expired-password-reset-issue + +--- + session.c | 8 ++++++-- + 1 file changed, 6 insertions(+), 2 deletions(-) + +diff --git a/session.c b/session.c +index be6a31a..4e2d598 100644 +--- a/session.c ++++ b/session.c +@@ -1574,8 +1574,12 @@ do_pwchange(Session *s) + fprintf(stderr, + "You must change your password now and login again!\n"); + #ifdef PASSWD_NEEDS_USERNAME +- execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name, +- (char *)NULL); ++ if (getuid() != 0) { ++ execl(_PATH_PASSWD_PROG, "passwd", (char *)NULL); ++ } else { ++ execl(_PATH_PASSWD_PROG, "passwd", s->pw->pw_name, (char *)NULL); ++ } ++ + #else + execl(_PATH_PASSWD_PROG, "passwd", (char *)NULL); + #endif +-- +2.33.0 + diff --git a/openssh.spec b/openssh.spec index 50b2c374d06d49eb503ec60952c3d3fb7b9b1b68..64904b31300c0c0713519e8413719e4b6b1d22de 100644 --- a/openssh.spec +++ b/openssh.spec @@ -6,7 +6,7 @@ %{?no_gtk2:%global gtk2 0} %global sshd_uid 74 -%global openssh_release 5 +%global openssh_release 6 Name: openssh Version: 9.3p2 @@ -101,6 +101,7 @@ Patch78: backport-CVE-2023-48795-upstream-implement-strict-key-exchange-i Patch79: backport-CVE-2023-51385-upstream-ban-user-hostnames-with-most-shell-metachar.patch Patch80: backport-fix-CVE-2024-6387.patch Patch81: backport-CVE-2023-51384-upstream-apply-destination-constraints-to-all-p11-ke.patch +Patch82: Fix-regular-users-expired-password-reset-issue.patch Requires: /sbin/nologin Requires: libselinux >= 2.3-5 audit-libs >= 1.0.8 @@ -251,6 +252,7 @@ popd %patch79 -p1 %patch80 -p1 %patch81 -p1 +%patch82 -p1 autoreconf pushd pam_ssh_agent_auth-pam_ssh_agent_auth-0.10.4 @@ -467,6 +469,12 @@ getent passwd sshd >/dev/null || \ %attr(0644,root,root) %{_mandir}/man8/sftp-server.8* %changelog +* Thu Nov 7 mengchaoming -9.3p2-6 +- Type:bugfix +- CVE: +- SUG:NA +- DESC:Fix regular users expired password reset issue + * Fri Jul 12 2024 renmingshuai - 9.3p2-5 - Type:CVE - CVE:CVE-2023-51384