chage: Fix regression in print_date
Resolves: #2129336 Signed-off-by: Iker Pedrosa <ipedrosa@redhat.com>
This commit is contained in:
parent
d491f14619
commit
47d965b5dc
32
shadow-4.12.3-chage-print-date-regression.patch
Normal file
32
shadow-4.12.3-chage-print-date-regression.patch
Normal file
@ -0,0 +1,32 @@
|
||||
From e503fd574b7dbf6b21b1168e20938f0922807916 Mon Sep 17 00:00:00 2001
|
||||
From: Xiami <1927254+Xiami2012@users.noreply.github.com>
|
||||
Date: Wed, 5 Oct 2022 18:11:28 +0800
|
||||
Subject: [PATCH] chage: Fix regression in print_date
|
||||
|
||||
Introduced by c6c8130db4319613a91dd07bbb845f6c33c5f79f
|
||||
|
||||
After removing snprintf, the format string should get unescaped once.
|
||||
|
||||
Fixes #564
|
||||
|
||||
Reporter and patch author: DerMouse (github.com/DerMouse)
|
||||
---
|
||||
src/chage.c | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/chage.c b/src/chage.c
|
||||
index 8cf67794..01570d72 100644
|
||||
--- a/src/chage.c
|
||||
+++ b/src/chage.c
|
||||
@@ -228,7 +228,7 @@ static void print_date (time_t date)
|
||||
if (NULL == tp) {
|
||||
(void) printf ("time_t: %lu\n", (unsigned long)date);
|
||||
} else {
|
||||
- (void) strftime (buf, sizeof buf, iflg ? "%%Y-%%m-%%d" : "%%b %%d, %%Y", tp);
|
||||
+ (void) strftime (buf, sizeof buf, iflg ? "%Y-%m-%d" : "%b %d, %Y", tp);
|
||||
(void) puts (buf);
|
||||
}
|
||||
}
|
||||
--
|
||||
2.37.3
|
||||
|
@ -1,7 +1,7 @@
|
||||
Summary: Utilities for managing accounts and shadow password files
|
||||
Name: shadow-utils
|
||||
Version: 4.12.3
|
||||
Release: 2%{?dist}
|
||||
Release: 3%{?dist}
|
||||
Epoch: 2
|
||||
License: BSD and GPLv2+
|
||||
URL: https://github.com/shadow-maint/shadow
|
||||
@ -45,6 +45,8 @@ Patch12: shadow-4.6-sysugid-min-limit.patch
|
||||
Patch13: shadow-4.8-ignore-login-prompt.patch
|
||||
# https://github.com/shadow-maint/shadow/commit/ebf9b232b012725d2be5e750876c7336cf1c37fd
|
||||
Patch14: shadow-4.12.3-useradd-stop-last-fail-log-reset.patch
|
||||
# https://github.com/shadow-maint/shadow/commit/e503fd574b7dbf6b21b1168e20938f0922807916
|
||||
Patch15: shadow-4.12.3-chage-print-date-regression.patch
|
||||
|
||||
### Dependencies ###
|
||||
Requires: audit-libs >= 1.6.5
|
||||
@ -119,6 +121,7 @@ Development files for shadow-utils-subid.
|
||||
%patch12 -p1 -b .sysugid-min-limit
|
||||
%patch13 -p1 -b .login-prompt
|
||||
%patch14 -p1 -b .useradd-stop-last-fail-log-reset
|
||||
%patch15 -p1 -b .chage-print-date-regression
|
||||
|
||||
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
|
||||
cp -f doc/HOWTO.utf8 doc/HOWTO
|
||||
@ -292,6 +295,9 @@ rm -f $RPM_BUILD_ROOT/%{_libdir}/libsubid.a
|
||||
%{_libdir}/libsubid.so
|
||||
|
||||
%changelog
|
||||
* Wed Oct 5 2022 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.12.3-3
|
||||
- chage: Fix regression in print_date. Resolves: #2129336
|
||||
|
||||
* Fri Sep 9 2022 Iker Pedrosa <ipedrosa@redhat.com> - 2:4.12.3-2
|
||||
- useradd: Do not reset non-existent data in {last,fail}log
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user