Add auditing to GetXStats

This will record the caller as well as the fact that we received
a GetXStats call.

Change-Id: I101b9fcea37e26e031efa4a8cf74df8351866dcf
Reviewed-on: http://gerrit.openafs.org/11620
Reviewed-by: Daria Brashear <shadow@your-file-system.com>
Tested-by: BuildBot <buildbot@rampaginggeek.com>
This commit is contained in:
Benjamin Kaduk 2014-12-04 16:52:37 -05:00
parent 012fc253c2
commit ccda3b6cbb
2 changed files with 8 additions and 3 deletions

View File

@ -190,6 +190,7 @@
#define SetExtendedVolumeAttributesEvent "AFS_SRX_SetVA" #define SetExtendedVolumeAttributesEvent "AFS_SRX_SetVA"
#define GetStatisticsEvent "AFS_SRX_GetStats" #define GetStatisticsEvent "AFS_SRX_GetStats"
#define XStatsVersionEvent "AFS_SRX_XStatsVer" #define XStatsVersionEvent "AFS_SRX_XStatsVer"
#define GetXStatsEvent "AFS_SRX_GetXStats"
#define NoAuthEvent "AFS_RunNoAuth" #define NoAuthEvent "AFS_RunNoAuth"
#define NoAuthDisableEvent "AFS_NoAuthDsbl" #define NoAuthDisableEvent "AFS_NoAuthDsbl"

View File

@ -5392,6 +5392,8 @@ SRXAFS_GetXStats(struct rx_call *a_call, afs_int32 a_clientVersionNum,
afs_int32 * a_timeP, AFS_CollData * a_dataP) afs_int32 * a_timeP, AFS_CollData * a_dataP)
{ /*SRXAFS_GetXStats */ { /*SRXAFS_GetXStats */
struct client *t_client = NULL; /* tmp ptr to client data */
struct rx_connection *tcon = rx_ConnectionOf(a_call);
int code; /*Return value */ int code; /*Return value */
afs_int32 *dataBuffP; /*Ptr to data to be returned */ afs_int32 *dataBuffP; /*Ptr to data to be returned */
afs_int32 dataBytes; /*Bytes in data buffer */ afs_int32 dataBytes; /*Bytes in data buffer */
@ -5399,6 +5401,7 @@ SRXAFS_GetXStats(struct rx_call *a_call, afs_int32 a_clientVersionNum,
fsstats_StartOp(&fsstats, FS_STATS_RPCIDX_GETXSTATS); fsstats_StartOp(&fsstats, FS_STATS_RPCIDX_GETXSTATS);
t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
/* /*
* Record the time of day and the server version number. * Record the time of day and the server version number.
*/ */
@ -5410,9 +5413,10 @@ SRXAFS_GetXStats(struct rx_call *a_call, afs_int32 a_clientVersionNum,
*/ */
code = 0; code = 0;
ViceLog(1, osi_auditU(a_call, GetXStatsEvent,
("Received GetXStats call for collection %d\n", AUD_ID, t_client ? t_client->z.ViceId : 0,
a_collectionNumber)); AUD_INT, a_clientVersionNum,
AUD_INT, a_collectionNumber, AUD_END);
#if 0 #if 0
/* /*