diff options
author | Balint Reczey <balint@balintreczey.hu> | 2022-10-22 20:09:51 +0200 |
---|---|---|
committer | Balint Reczey <balint@balintreczey.hu> | 2022-10-22 20:09:51 +0200 |
commit | 220f9aac4d7204e6d34f4cb400033ef1a2c2041e (patch) | |
tree | fd8d0122af153688d9cf29ec71f0dcc25d8bc99f | |
parent | deba8c722ec79360eed4a99a197b47828789edac (diff) | |
download | shadow-220f9aac4d7204e6d34f4cb400033ef1a2c2041e.tar.gz |
Cherry-pick upstream patch to fix regression in expiration date handling
Closes: #1021697
-rw-r--r-- | debian/patches/0001-chage-Fix-regression-in-print_date.patch | 32 | ||||
-rw-r--r-- | debian/patches/series | 1 |
2 files changed, 33 insertions, 0 deletions
diff --git a/debian/patches/0001-chage-Fix-regression-in-print_date.patch b/debian/patches/0001-chage-Fix-regression-in-print_date.patch new file mode 100644 index 00000000..969c139b --- /dev/null +++ b/debian/patches/0001-chage-Fix-regression-in-print_date.patch @@ -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.34.1 + diff --git a/debian/patches/series b/debian/patches/series index 06d11736..78ea73e4 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -2,6 +2,7 @@ #900_testsuite_groupmems #901_testsuite_gcov +0001-chage-Fix-regression-in-print_date.patch 008_login_log_failure_in_FTMP 301_lastlog_faillog_do_not_reset_non-existent_data 401_cppw_src.dpatch |