SHA256
3
0
forked from pool/shadow

- bsc#1204811: Fix chage date format string regression

* Add shadow-chage-format.patch

OBS-URL: https://build.opensuse.org/package/show/Base:System/shadow?expand=0&rev=129
This commit is contained in:
Michael Vetter 2022-11-02 11:01:13 +00:00 committed by Git OBS Bridge
parent 30472fc2d8
commit ec972ebebd
3 changed files with 39 additions and 1 deletions

29
shadow-chage-format.patch Normal file
View File

@ -0,0 +1,29 @@
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 8cf677942..01570d725 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);
}
}

View File

@ -1,3 +1,9 @@
-------------------------------------------------------------------
Wed Nov 2 10:59:16 UTC 2022 - Michael Vetter <mvetter@suse.com>
- bsc#1204811: Fix chage date format string regression
* Add shadow-chage-format.patch
------------------------------------------------------------------- -------------------------------------------------------------------
Mon Oct 24 22:04:41 UTC 2022 - Michael Vetter <mvetter@suse.com> Mon Oct 24 22:04:41 UTC 2022 - Michael Vetter <mvetter@suse.com>

View File

@ -59,8 +59,10 @@ Patch7: shadow-login_defs-suse.patch
Patch8: useradd-userkeleton.patch Patch8: useradd-userkeleton.patch
# PATCH-FIX-SUSE disable_new_audit_function.patch adam.majer@suse.de -- Disable newer libaudit functionality for older distributions. # PATCH-FIX-SUSE disable_new_audit_function.patch adam.majer@suse.de -- Disable newer libaudit functionality for older distributions.
Patch9: disable_new_audit_function.patch Patch9: disable_new_audit_function.patch
# PATCH-FIX-UPSTREAM shadow-prefix-overflow.patch mvetter@suse.com -- Fix buffer overflow when using --prefix in useradd # PATCH-FIX-UPSTREAM shadow-prefix-overflow.patch mvetter@suse.com -- Fix buffer overflow when using --prefix in useradd
Patch10: https://github.com/shadow-maint/shadow/commit/eaebea55a495a56317ed85e959b3599f73c6bdf2.patch#/shadow-prefix-overflow.patch Patch10: https://github.com/shadow-maint/shadow/commit/eaebea55a495a56317ed85e959b3599f73c6bdf2.patch#/shadow-prefix-overflow.patch
# PATCH-FIX-UPSTREAM shadow-chage-format.patch mvetter@suse.com -- Fix chage format string
Patch11: https://github.com/shadow-maint/shadow/commit/e503fd574b7dbf6b21b1168e20938f0922807916.patch#/shadow-chage-format.patch
BuildRequires: audit-devel > 2.3 BuildRequires: audit-devel > 2.3
BuildRequires: autoconf BuildRequires: autoconf
BuildRequires: automake BuildRequires: automake
@ -132,6 +134,7 @@ Development files for libsubid4.
%patch9 -p1 %patch9 -p1
%endif %endif
%patch10 -p1 %patch10 -p1
%patch11 -p1
iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8 iconv -f ISO88591 -t utf-8 doc/HOWTO > doc/HOWTO.utf8
mv -v doc/HOWTO.utf8 doc/HOWTO mv -v doc/HOWTO.utf8 doc/HOWTO