]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
viced: incorrect FID audit of BulkStatus and InlineBulkStatus
authorMark Vitale <mvitale@sinenomine.net>
Tue, 16 Feb 2016 19:55:03 +0000 (14:55 -0500)
committerStephan Wiesand <stephan.wiesand@desy.de>
Thu, 31 Mar 2016 10:08:38 +0000 (06:08 -0400)
The audit code for object AUD_FIDS is off by one - we list the
first FID twice and skip the last FID.

Repair so all FIDs are properly audited.

Reviewed-on: http://gerrit.openafs.org/12191
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Chas Williams <3chas3@gmail.com>
Reviewed-by: Benjamin Kaduk <kaduk@mit.edu>
(cherry picked from commit 44349d0694c7a185fae4c55c75cb01196d109a26)

Change-Id: I7f662fd54aaab8182fedc5ebd607db37e501b423
Reviewed-on: https://gerrit.openafs.org/12211
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Mark Vitale <mvitale@sinenomine.net>
Reviewed-by: Stephan Wiesand <stephan.wiesand@desy.de>
src/audit/audit.c

index dacbef7e88424ab32bcdc16754398cd2eb16f4f5..17652eeab8637a19a1bbe8a452923acf2bc28741 100644 (file)
@@ -264,9 +264,8 @@ printbuf(int rec, char *audEvent, char *afsName, afs_int32 hostId,
                 vaFid = vaFids->AFSCBFids_val;
 
                 if (vaFid) {
-                    audit_ops->append_msg("FIDS %u FID %u:%u:%u ", vaFids->AFSCBFids_len, vaFid->Volume,
-                             vaFid->Vnode, vaFid->Unique);
-                    for ( i = 1; i < vaFids->AFSCBFids_len; i++, vaFid++ )
+                    audit_ops->append_msg("FIDS %u ", vaFids->AFSCBFids_len);
+                    for ( i = 1; i <= vaFids->AFSCBFids_len; i++, vaFid++ )
                         audit_ops->append_msg("FID %u:%u:%u ", vaFid->Volume,
                                 vaFid->Vnode, vaFid->Unique);
                 } else