Fix AUD_HOST callers

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.

Change-Id: Iaf6abec850e691febfa3e07bff368eab6fb71409
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>
This commit is contained in:
Andrew Deason 2010-12-08 11:40:24 -06:00 committed by Derrick Brashear
parent ddc4057ce7
commit b20329e019
2 changed files with 5 additions and 5 deletions

View File

@ -1176,7 +1176,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;
@ -1259,7 +1259,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;
}

View File

@ -1238,7 +1238,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;
}
@ -1441,7 +1441,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);
@ -1591,7 +1591,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;
}