Compare commits
6 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 94385da1c2 | |||
| a143aca1c9 | |||
| f476e8b263 | |||
| 477077497f | |||
| 8b42aebdfb | |||
| d39c5351ae |
Vendored
+21
-1
@@ -1,7 +1,27 @@
|
||||
shadow (1:4.17.2-4) unstable; urgency=medium
|
||||
|
||||
* Revert upstreams chfn.c strsep change (Closes: #1096187)
|
||||
|
||||
-- Chris Hofstaedtler <zeha@debian.org> Mon, 17 Feb 2025 12:28:56 +0100
|
||||
|
||||
shadow (1:4.17.2-3) unstable; urgency=medium
|
||||
|
||||
* Revert upstreams strtoday calculation "fix" (Closes: #1095430)
|
||||
|
||||
-- Chris Hofstaedtler <zeha@debian.org> Sun, 16 Feb 2025 20:24:35 +0100
|
||||
|
||||
shadow (1:4.17.2-2) unstable; urgency=medium
|
||||
|
||||
* Upload to unstable.
|
||||
* Apply upstream revert of "Use local time for human-readable dates"
|
||||
(Closes: #1095430)
|
||||
|
||||
-- Chris Hofstaedtler <zeha@debian.org> Sat, 15 Feb 2025 17:21:17 +0100
|
||||
|
||||
shadow (1:4.17.2-1) experimental; urgency=medium
|
||||
|
||||
* New upstream version 4.17.2
|
||||
* Apply upstream match from Marc Haber to document E_BAD_NAME
|
||||
* Apply upstream patch from Marc Haber to document E_BAD_NAME
|
||||
* Refresh patches
|
||||
|
||||
-- Chris Hofstaedtler <zeha@debian.org> Sun, 09 Feb 2025 18:14:51 +0100
|
||||
|
||||
+52
@@ -0,0 +1,52 @@
|
||||
From: Chris Hofstaedtler <zeha@debian.org>
|
||||
Date: Mon, 17 Feb 2025 12:26:07 +0100
|
||||
Subject: Partially revert "lib/, src/: Use strsep(3) instead of its pattern"
|
||||
|
||||
This reverts src/chfn.c from commit 16cb664865541162c504a6f5ef5ca4b38b5e0c9a.
|
||||
---
|
||||
src/chfn.c | 17 +++++++++++------
|
||||
1 file changed, 11 insertions(+), 6 deletions(-)
|
||||
|
||||
diff --git a/src/chfn.c b/src/chfn.c
|
||||
index 4c96fba..f06cb44 100644
|
||||
--- a/src/chfn.c
|
||||
+++ b/src/chfn.c
|
||||
@@ -216,27 +216,32 @@ static void new_fields (void)
|
||||
*/
|
||||
static char *copy_field (char *in, char *out, char *extra)
|
||||
{
|
||||
- while (NULL != in) {
|
||||
- char *f;
|
||||
+ char *cp = NULL;
|
||||
|
||||
- f = strsep(&in, ",");
|
||||
+ while (NULL != in) {
|
||||
+ cp = strchr (in, ',');
|
||||
+ if (NULL != cp) {
|
||||
+ *cp++ = '\0';
|
||||
+ }
|
||||
|
||||
- if (strchr(f, '=') == NULL)
|
||||
+ if (strchr (in, '=') == NULL) {
|
||||
break;
|
||||
+ }
|
||||
|
||||
if (NULL != extra) {
|
||||
if (!streq(extra, "")) {
|
||||
strcat (extra, ",");
|
||||
}
|
||||
|
||||
- strcat(extra, f);
|
||||
+ strcat (extra, in);
|
||||
}
|
||||
+ in = cp;
|
||||
}
|
||||
if ((NULL != in) && (NULL != out)) {
|
||||
strcpy (out, in);
|
||||
}
|
||||
|
||||
- return in;
|
||||
+ return cp;
|
||||
}
|
||||
|
||||
/*
|
||||
@@ -0,0 +1,28 @@
|
||||
From: Chris Hofstaedtler <zeha@debian.org>
|
||||
Date: Sun, 16 Feb 2025 20:21:35 +0100
|
||||
Subject: Revert "lib/strtoday.c: strtoday(): Fix calculation"
|
||||
|
||||
This reverts commit 1175932c0c86ee46ee298fd9cfa01653a2ba3a27.
|
||||
|
||||
Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095430
|
||||
---
|
||||
lib/strtoday.c | 5 +++--
|
||||
1 file changed, 3 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/strtoday.c b/lib/strtoday.c
|
||||
index 01f2e9b..f947778 100644
|
||||
--- a/lib/strtoday.c
|
||||
+++ b/lib/strtoday.c
|
||||
@@ -67,9 +67,10 @@ long strtoday (const char *str)
|
||||
return retdate;
|
||||
}
|
||||
|
||||
- t = get_date(str, NULL);
|
||||
+ t = get_date (str, NULL);
|
||||
if ((time_t) - 1 == t) {
|
||||
return -2;
|
||||
}
|
||||
- return t / DAY;
|
||||
+ /* convert seconds to days since 1970-01-01 */
|
||||
+ return (t + DAY / 2) / DAY;
|
||||
}
|
||||
Vendored
+3
@@ -8,3 +8,6 @@ debian/Define-LOGIN_NAME_MAX-on-HURD.patch
|
||||
debian/Stop-building-programs-we-do-not-install.patch
|
||||
upstream/a015e919834c90b99947829c6c823f7fe93a8097-E_BAD_NAME.patch
|
||||
upstream/man-useradd.8.xml-Document-new-exit-code-19-E_BAD_NAME.patch
|
||||
upstream/Revert-lib-src-Use-local-time-for-human-readable-dates.patch
|
||||
Revert-lib-strtoday.c-strtoday-Fix-calculation.patch
|
||||
Partially-revert-lib-src-Use-strsep-3-instead-of-its-patt.patch
|
||||
|
||||
+70
@@ -0,0 +1,70 @@
|
||||
From: Alejandro Colomar <alx@kernel.org>
|
||||
Date: Fri, 14 Feb 2025 21:25:01 +0100
|
||||
Subject: Revert "lib/, src/: Use local time for human-readable dates"
|
||||
|
||||
This reverts commit 3f5b4b56268269fefed55aa106f382037297d663.
|
||||
|
||||
The dates are stored as UTC, and are stored as a number of days since
|
||||
Epoch. We don't have enough precision to translate it into local time.
|
||||
Using local time has caused endless issues in users.
|
||||
|
||||
This patch is not enough for fixing this issue completely, since
|
||||
printing a date without time-zone information means that the date is a
|
||||
local date, but what we're printing is a UTC date. A future patch
|
||||
should add time-zone information to the date.
|
||||
|
||||
For now, let's revert this change that has caused so many issues.
|
||||
|
||||
Fixes: 3f5b4b562682 (2024-08-01; "lib/, src/: Use local time for human-readable dates")
|
||||
Link: <https://github.com/ansible/ansible/blob/devel/test/integration/targets/user/tasks/test_expires.yml#L2-L20>
|
||||
Link: <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1095430>
|
||||
Link: <https://lists.iana.org/hyperkitty/list/tz@iana.org/message/ENE5IFV3GAH6WK22UJ6YU57D6TQINSP5/>
|
||||
Link: <https://github.com/shadow-maint/shadow/issues/1202>
|
||||
Link: <https://github.com/shadow-maint/shadow/issues/1057>
|
||||
Link: <https://github.com/shadow-maint/shadow/issues/939>
|
||||
Link: <https://github.com/shadow-maint/shadow/pull/1058>
|
||||
Link: <https://github.com/shadow-maint/shadow/pull/1059#issuecomment-2309888519>
|
||||
Link: <https://github.com/shadow-maint/shadow/pull/952>
|
||||
Link: <https://github.com/shadow-maint/shadow/pull/942>
|
||||
Reported-by: Chris Hofstaedtler <zeha@debian.org>
|
||||
Reported-by: Gus Kenion <https://github.com/kenion>
|
||||
Reported-by: Alejandro Colomar <alx@kernel.org>
|
||||
Reported-by: Michael Vetter <jubalh@iodoru.org>
|
||||
Reported-by: Lee Garrett <lgarrett@rocketjump.eu>
|
||||
Cc: Paul Eggert <eggert@cs.ucla.edu>
|
||||
Cc: Tim Parenti <tim@timtimeonline.com>
|
||||
Cc: Iker Pedrosa <ipedrosa@redhat.com>
|
||||
Cc: "Serge E. Hallyn" <serge@hallyn.com>
|
||||
Cc: Brian Inglis <Brian.Inglis@SystematicSW.ab.ca>
|
||||
Signed-off-by: Alejandro Colomar <alx@kernel.org>
|
||||
---
|
||||
lib/time/day_to_str.h | 2 +-
|
||||
src/chage.c | 2 +-
|
||||
2 files changed, 2 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/lib/time/day_to_str.h b/lib/time/day_to_str.h
|
||||
index b70e989..fe3308d 100644
|
||||
--- a/lib/time/day_to_str.h
|
||||
+++ b/lib/time/day_to_str.h
|
||||
@@ -38,7 +38,7 @@ day_to_str(size_t size, char buf[size], long day)
|
||||
return;
|
||||
}
|
||||
|
||||
- if (localtime_r(&date, &tm) == NULL) {
|
||||
+ if (gmtime_r(&date, &tm) == NULL) {
|
||||
strtcpy(buf, "future", size);
|
||||
return;
|
||||
}
|
||||
diff --git a/src/chage.c b/src/chage.c
|
||||
index a7933e0..67e7e77 100644
|
||||
--- a/src/chage.c
|
||||
+++ b/src/chage.c
|
||||
@@ -243,7 +243,7 @@ print_day_as_date(long day)
|
||||
return;
|
||||
}
|
||||
|
||||
- if (localtime_r(&date, &tm) == NULL) {
|
||||
+ if (gmtime_r(&date, &tm) == NULL) {
|
||||
puts(_("future"));
|
||||
return;
|
||||
}
|
||||
Reference in New Issue
Block a user