summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--debian/changelog8
-rw-r--r--debian/patches/fix-printing-of-time_t-values.patch52
-rw-r--r--debian/patches/mmkubernetes-bugfix-use-correct-type-for-lastBusyTime.patch26
-rw-r--r--debian/patches/series2
4 files changed, 88 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 15944c2..c774285 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,11 @@
+rsyslog (8.2404.0-2) unstable; urgency=medium
+
+ * Fix time_t related issues.
+ Timestamps can be 64bit, even on 32bit architectures.
+ See https://wiki.debian.org/ReleaseGoals/64bit-time
+
+ -- Michael Biebl <biebl@debian.org> Wed, 10 Apr 2024 19:38:43 +0200
+
rsyslog (8.2404.0-1) unstable; urgency=medium
* New upstream version 8.2404.0
diff --git a/debian/patches/fix-printing-of-time_t-values.patch b/debian/patches/fix-printing-of-time_t-values.patch
new file mode 100644
index 0000000..eba2685
--- /dev/null
+++ b/debian/patches/fix-printing-of-time_t-values.patch
@@ -0,0 +1,52 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Wed, 10 Apr 2024 19:28:52 +0200
+Subject: fix printing of time_t values
+
+time_t can be 64bit, even on 32bit architectures. So always use 64bit
+integers (PRId64) when printing time_t values and upcast as necessary.
+
+See https://wiki.debian.org/ReleaseGoals/64bit-time
+
+Fixes: #5355
+---
+ contrib/mmkubernetes/mmkubernetes.c | 4 ++--
+ plugins/imfile/imfile.c | 8 ++++----
+ 2 files changed, 6 insertions(+), 6 deletions(-)
+
+diff --git a/contrib/mmkubernetes/mmkubernetes.c b/contrib/mmkubernetes/mmkubernetes.c
+index a9d7979..1dc8958 100644
+--- a/contrib/mmkubernetes/mmkubernetes.c
++++ b/contrib/mmkubernetes/mmkubernetes.c
+@@ -1722,8 +1722,8 @@ queryKB(wrkrInstanceData_t *pWrkrData, char *url, time_t now, struct json_object
+ now -= pWrkrData->pData->cache->lastBusyTime;
+ if (now < pWrkrData->pData->busyRetryInterval) {
+ LogMsg(0, RS_RET_RETRY, LOG_DEBUG,
+- "mmkubernetes: Waited [%ld] of [%d] seconds for the requested url [%s]\n",
+- now, pWrkrData->pData->busyRetryInterval, url);
++ "mmkubernetes: Waited [%"PRId64"] of [%d] seconds for the requested url [%s]\n",
++ (int64_t) now, pWrkrData->pData->busyRetryInterval, url);
+ ABORT_FINALIZE(RS_RET_RETRY);
+ } else {
+ LogMsg(0, RS_RET_OK, LOG_DEBUG,
+diff --git a/plugins/imfile/imfile.c b/plugins/imfile/imfile.c
+index 3b0bb10..49556f5 100644
+--- a/plugins/imfile/imfile.c
++++ b/plugins/imfile/imfile.c
+@@ -857,13 +857,13 @@ detect_updates(fs_edge_t *const edge)
+ sbool is_file = act->edge->is_file;
+ if (!is_file || act->time_to_delete + FILE_DELETE_DELAY < ttNow) {
+ DBGPRINTF("detect_updates obj gone away, unlinking: "
+- "'%s', ttDelete: %lds, ttNow:%ld isFile: %d\n",
+- act->name, ttNow - (act->time_to_delete + FILE_DELETE_DELAY), ttNow, is_file);
++ "'%s', ttDelete: %"PRId64"s, ttNow:%"PRId64" isFile: %d\n",
++ act->name, (int64_t) ttNow - (act->time_to_delete + FILE_DELETE_DELAY), (int64_t) ttNow, is_file);
+ act_obj_unlink(act);
+ restart = 1;
+ } else {
+- DBGPRINTF("detect_updates obj gone away, keep '%s' open: %ld/%ld/%lds!\n",
+- act->name, act->time_to_delete, ttNow, ttNow - act->time_to_delete);
++ DBGPRINTF("detect_updates obj gone away, keep '%s' open: %"PRId64"/%"PRId64"/%"PRId64"s!\n",
++ act->name, (int64_t) act->time_to_delete, (int64_t) ttNow, (int64_t) ttNow - act->time_to_delete);
+ pollFile(act);
+ }
+ }
diff --git a/debian/patches/mmkubernetes-bugfix-use-correct-type-for-lastBusyTime.patch b/debian/patches/mmkubernetes-bugfix-use-correct-type-for-lastBusyTime.patch
new file mode 100644
index 0000000..987c7e4
--- /dev/null
+++ b/debian/patches/mmkubernetes-bugfix-use-correct-type-for-lastBusyTime.patch
@@ -0,0 +1,26 @@
+From: Michael Biebl <biebl@debian.org>
+Date: Wed, 10 Apr 2024 19:26:05 +0200
+Subject: mmkubernetes bugfix: use correct type for lastBusyTime
+
+We assign time_t now to lastBusyTime, which is not necessarily an int.
+
+On 32bit architectures, time_t can be 64bit.
+
+See https://wiki.debian.org/ReleaseGoals/64bit-time
+---
+ contrib/mmkubernetes/mmkubernetes.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/contrib/mmkubernetes/mmkubernetes.c b/contrib/mmkubernetes/mmkubernetes.c
+index 525962e..a9d7979 100644
+--- a/contrib/mmkubernetes/mmkubernetes.c
++++ b/contrib/mmkubernetes/mmkubernetes.c
+@@ -123,7 +123,7 @@ static struct cache_s {
+ struct hashtable *mdHt;
+ struct hashtable *nsHt;
+ pthread_mutex_t *cacheMtx;
+- int lastBusyTime; /* when we got the last busy response from kubernetes */
++ time_t lastBusyTime; /* when we got the last busy response from kubernetes */
+ time_t expirationTime; /* if cache expiration checking is enable, time to check for expiration */
+ } **caches;
+
diff --git a/debian/patches/series b/debian/patches/series
index d44f829..74cfdb0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
Don-t-create-a-database.patch
Increase-timeouts-in-imfile-basic-2GB-file-and-imfile-tru.patch
+mmkubernetes-bugfix-use-correct-type-for-lastBusyTime.patch
+fix-printing-of-time_t-values.patch