From 885c02af3761c0f2bf3350dc4beef09a92770aa7 Mon Sep 17 00:00:00 2001 From: Benjamin Kaduk Date: Tue, 11 Sep 2018 10:51:01 -0500 Subject: [PATCH] Fix typos in audit format strings Commit 9ebff4c6caa8b499d999cfd515d4d45eb3179769 introduced audit framework support for several butc-related data types, but had a typo ('$d' for '%d') in a couple of places, that was not reported by compiler format-string checking. Fix the typo to properly print all the auditable data. (cherry picked from commit d5816fd6cd1876760a985a817dbbb3940cf3bddb) (cherry picked from commit 90601818205aeefd1cf99b8766a7bfd03bf9b96a) (cherry picked from commit 0cdb370f1813158a6dbd577e5c250bc26ac4590c) Change-Id: I0d1cb15d02225a8557da09ed72efbc5103e1ec1b --- src/audit/audit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/audit/audit.c b/src/audit/audit.c index bb1ce90374..a1e79f7de2 100644 --- a/src/audit/audit.c +++ b/src/audit/audit.c @@ -386,7 +386,7 @@ printbuf(int rec, char *audEvent, char *afsName, afs_int32 hostId, if (vaDI) { audit_ops->append_msg( - "TCDUMPINTERFACE %.*s:%.*s:%.*s:%d:%d:%d:$d:%.*s:%.*s:%d:%d:%d:%d:%d ", + "TCDUMPINTERFACE %.*s:%.*s:%.*s:%d:%d:%d:%d:%.*s:%.*s:%d:%d:%d:%d:%d ", TC_MAXDUMPPATH, vaDI->dumpPath, TC_MAXNAMELEN, vaDI->volumeSetName, TC_MAXNAMELEN, vaDI->dumpName, vaDI->parentDumpId, vaDI->dumpLevel, vaDI->doAppend, @@ -411,7 +411,7 @@ printbuf(int rec, char *audEvent, char *afsName, afs_int32 hostId, audit_ops->append_msg("DUMPS %d ", vaDA->tc_dumpArray_len); for (i = 0; i < vaDA->tc_dumpArray_len; i++, desc++) { hostAddr.s_addr = desc->hostAddr; - audit_ops->append_msg("DUMP %d:%d:%.*s:$d:%d:%d:%s ", + audit_ops->append_msg("DUMP %d:%d:%.*s:%d:%d:%d:%s ", desc->vid, desc->vtype, TC_MAXNAMELEN, desc->name, desc->partition, desc->date, desc->cloneDate, inet_ntoa(hostAddr));