From b37bd7096282eadf11cc84c4a925233f689179fc Mon Sep 17 00:00:00 2001 From: Steve Dickson Date: Fri, 20 Aug 2021 14:26:59 -0400 Subject: [PATCH] nfsdcltrack: Fix printf format (bz 1995316) Signed-off-by: Steve Dickson Resolves: bz1995316 --- nfs-utils-2.5.4-nfsdcltrack-printf.patch | 42 ++++++++++++++++++++++++ nfs-utils.spec | 4 ++- 2 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 nfs-utils-2.5.4-nfsdcltrack-printf.patch diff --git a/nfs-utils-2.5.4-nfsdcltrack-printf.patch b/nfs-utils-2.5.4-nfsdcltrack-printf.patch new file mode 100644 index 0000000..9d23e23 --- /dev/null +++ b/nfs-utils-2.5.4-nfsdcltrack-printf.patch @@ -0,0 +1,42 @@ +diff --git a/utils/nfsdcltrack/nfsdcltrack.c b/utils/nfsdcltrack/nfsdcltrack.c +index 2f8bea81..7c1c4bcc 100644 +--- a/utils/nfsdcltrack/nfsdcltrack.c ++++ b/utils/nfsdcltrack/nfsdcltrack.c +@@ -33,6 +33,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -525,7 +526,7 @@ cltrack_gracedone(const char *timestr) + if (*tail) + return -EINVAL; + +- xlog(D_GENERAL, "%s: grace done. gracetime=%ld", __func__, gracetime); ++ xlog(D_GENERAL, "%s: grace done. gracetime=%"PRIu64, __func__, gracetime); + + ret = sqlite_remove_unreclaimed(gracetime); + +diff --git a/utils/nfsdcltrack/sqlite.c b/utils/nfsdcltrack/sqlite.c +index b6573544..78c22af8 100644 +--- a/utils/nfsdcltrack/sqlite.c ++++ b/utils/nfsdcltrack/sqlite.c +@@ -46,6 +46,7 @@ + #include + #include + #include ++#include + #include + #include + #include +@@ -545,7 +546,7 @@ sqlite_remove_unreclaimed(uint64_t grace_start) + int ret; + char *err = NULL; + +- ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %ld", ++ ret = snprintf(buf, sizeof(buf), "DELETE FROM clients WHERE time < %"PRIu64, + grace_start); + if (ret < 0) { + return ret; diff --git a/nfs-utils.spec b/nfs-utils.spec index 8081d96..95f64f2 100644 --- a/nfs-utils.spec +++ b/nfs-utils.spec @@ -18,6 +18,7 @@ Source4: 10-nfsv4.conf # RHEL9.0 # Patch001: nfs-utils-2.5.4-mount-sloppy.patch +Patch002: nfs-utils-2.5.4-nfsdcltrack-printf.patch Patch100: nfs-utils-1.2.1-statdpath-man.patch Patch101: nfs-utils-1.2.1-exp-subtree-warn-off.patch @@ -441,9 +442,10 @@ fi %{_mandir}/*/nfsiostat.8.gz %changelog -* Wed Aug 18 2021 Steve Dickson 2.5.4-3 +* Fri Aug 20 2021 Steve Dickson 2.5.4-3 - mount.nfs: insert 'sloppy' at beginning of the options (bz 1987070) - spec: Fix dependency problems with nfsdclnts (bz 1924708) +- nfsdcltrack: Fix printf format (bz 1995316) * Mon Aug 16 2021 Steve Dickson 2.5.4-2 - Remove nfsconvert command (bz 1937811)