Fix typos in audit format strings

Commit 9ebff4c6ca 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 d5816fd6cd)

(cherry picked from commit 9060181820)

(cherry picked from commit 0cdb370f18)

Change-Id: I0d1cb15d02225a8557da09ed72efbc5103e1ec1b
This commit is contained in:
Benjamin Kaduk 2018-09-11 10:51:01 -05:00
parent 9067d54381
commit 885c02af37

View File

@ -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));