aboutsummaryrefslogtreecommitdiffstats
path: root/community/ceph/11-parse_rfc1123_alt.patch
diff options
context:
space:
mode:
Diffstat (limited to 'community/ceph/11-parse_rfc1123_alt.patch')
-rw-r--r--community/ceph/11-parse_rfc1123_alt.patch53
1 files changed, 0 insertions, 53 deletions
diff --git a/community/ceph/11-parse_rfc1123_alt.patch b/community/ceph/11-parse_rfc1123_alt.patch
deleted file mode 100644
index 32a7cd8a130..00000000000
--- a/community/ceph/11-parse_rfc1123_alt.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-Patch by Robin Mueller
-
-libmusl doesn't support the z character in the format pattern for strptime this
-is a special functionality of glibc.
-
-patch is slightly adapted version of glibc code:
-https://elixir.bootlin.com/glibc/latest/source/time/strptime_l.c#L776
-
---- a/src/rgw/rgw_common.cc 2021-07-08 16:03:56.000000000 +0200
-+++ b/src/rgw/rgw_common.cc 2021-08-18 13:08:22.938903459 +0200
-@@ -531,7 +531,41 @@
- {
- // FIPS zeroization audit 20191115: this memset is not security related.
- memset(t, 0, sizeof(*t));
-- return check_str_end(strptime(s, "%a, %d %b %Y %H:%M:%S %z", t));
-+ s = strptime(s, "%a, %d %b %Y %H:%M:%S", t);
-+ if (s) {
-+ s++;
-+ int val;
-+ val = 0;
-+ while (isspace(*s))
-+ ++s;
-+ if (*s == 'Z') {
-+ ++s;
-+ t->tm_gmtoff = 0;
-+ } else {
-+ if (*s != '+' && *s != '-')
-+ return NULL;
-+ bool neg = *s++ == '-';
-+ int n = 0;
-+ while (n < 4 && *s >= '0' && *s <= '9') {
-+ val = val * 10 + *s++ - '0';
-+ ++n;
-+ if (*s == ':' && n == 2 && isdigit (*(s + 1)))
-+ ++s;
-+ }
-+ if (n == 2)
-+ val *= 100;
-+ else if (n != 4)
-+ /* Only two or four digits recognized. */
-+ return NULL;
-+ else if (val % 100 >= 60)
-+ /* Minutes valid range is 0 through 59. */
-+ return NULL;
-+ t->tm_gmtoff = (val / 100) * 3600 + (val % 100) * 60;
-+ if (neg)
-+ t->tm_gmtoff = -t->tm_gmtoff;
-+ }
-+ }
-+ return check_str_end(s);
- }
-
- bool parse_rfc2616(const char *s, struct tm *t)