]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
Fix AUD_HOST callers
authorAndrew Deason <adeason@sinenomine.net>
Wed, 8 Dec 2010 17:40:24 +0000 (11:40 -0600)
committerDerrick Brashear <shadow@dementia.org>
Tue, 1 Feb 2011 04:12:35 +0000 (20:12 -0800)
Servers using the AUD_HOST audit message should give the host IP in
network-byte order, as that is how the auditing code interprets it.
Fix the users of AUD_HOST that do not do so.

Reviewed-on: http://gerrit.openafs.org/3492
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
Tested-by: Derrick Brashear <shadow@dementia.org>
(cherry picked from commit b20329e01968d3562f78382b27f7de9948a96899)

Change-Id: I5d8b8059101b147583f006bcdd4abd301721be62
Reviewed-on: http://gerrit.openafs.org/3797
Tested-by: BuildBot <buildbot@rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow@dementia.org>
src/ptserver/ptprocs.c
src/volser/volprocs.c

index a3e8b2973578499102eecfce8be7299dc5752bc2..471b56ed92981b604301e229354ae8f683d581eb 100644 (file)
@@ -1226,7 +1226,7 @@ SPR_GetCPS2(struct rx_call *call, afs_int32 aid, afs_int32 ahost,
     afs_int32 cid = ANONYMOUSID;
 
     code = getCPS2(call, aid, ahost, alist, over, &cid);
-    osi_auditU(call, PTS_GetCPS2Event, code, AUD_ID, aid, AUD_HOST, ahost,
+    osi_auditU(call, PTS_GetCPS2Event, code, AUD_ID, aid, AUD_HOST, htonl(ahost),
               AUD_END);
     ViceLog(125, ("PTS_GetCPS2: code %d cid %d aid %d ahost %d\n", code, cid, aid, ahost));
     return code;
@@ -1309,7 +1309,7 @@ SPR_GetHostCPS(struct rx_call *call, afs_int32 ahost, prlist *alist,
     afs_int32 code;
 
     code = getHostCPS(call, ahost, alist, over);
-    osi_auditU(call, PTS_GetHCPSEvent, code, AUD_HOST, ahost, AUD_END);
+    osi_auditU(call, PTS_GetHCPSEvent, code, AUD_HOST, htonl(ahost), AUD_END);
     ViceLog(125, ("PTS_GetHostCPS: code %d ahost %d\n", code, ahost));
     return code;
 }
index 858ac63cc05f892f5c4cc07f3051a988e32d2c8b..a3572affb70b61477fbf0de7c04fd0c65691bcc7 100644 (file)
@@ -1240,7 +1240,7 @@ SAFSVolForward(struct rx_call *acid, afs_int32 fromTrans, afs_int32 fromDate,
     code =
        VolForward(acid, fromTrans, fromDate, destination, destTrans, cookie);
     osi_auditU(acid, VS_ForwardEvent, code, AUD_LONG, fromTrans, AUD_HOST,
-              destination->destHost, AUD_LONG, destTrans, AUD_END);
+              htonl(destination->destHost), AUD_LONG, destTrans, AUD_END);
     return code;
 }
 
@@ -1443,7 +1443,7 @@ SAFSVolForwardMultiple(struct rx_call *acid, afs_int32 fromTrans, afs_int32
        }
 
        osi_auditU(acid, VS_ForwardEvent, (code ? code : codes[i]), AUD_LONG,
-                  fromTrans, AUD_HOST, dest->server.destHost, AUD_LONG,
+                  fromTrans, AUD_HOST, htonl(dest->server.destHost), AUD_LONG,
                   dest->trans, AUD_END);
     }
     free(tcons);
@@ -1593,7 +1593,7 @@ SAFSVolSetForwarding(struct rx_call *acid, afs_int32 atid, afs_int32 anewsite)
 
     code = VolSetForwarding(acid, atid, anewsite);
     osi_auditU(acid, VS_SetForwEvent, code, AUD_LONG, atid, AUD_HOST,
-              anewsite, AUD_END);
+              htonl(anewsite), AUD_END);
     return code;
 }