while (vaEntry != AUD_END) {
switch (vaEntry) {
case AUD_STR: /* String */
+ case AUD_NAME: /* Name */
+ case AUD_ACL: /* ACL */
vaStr = (char *)va_arg(vaList, int);
if (vaStr) {
strcpy(bufferPtr, vaStr);
}
break;
case AUD_INT: /* Integer */
+ case AUD_ID: /* ViceId */
vaInt = va_arg(vaList, int);
*(int *)bufferPtr = vaInt;
bufferPtr += sizeof(vaInt);
struct AFSFid *vaFid;
struct AFSCBFids *vaFids;
int num = LogThreadNum();
+ struct in_addr hostAddr;
/* Don't print the thread id if we recursed */
if ((num > -1) && (rec == 0))
fprintf(out, "[%d]:", num);
if (strcmp(audEvent, "VALST") != 0)
- fprintf(out, "%s %d ", audEvent, errCode);
+ fprintf(out, "EVENT %s CODE %d ", audEvent, errCode);
vaEntry = va_arg(vaList, int);
while (vaEntry != AUD_END) {
case AUD_STR: /* String */
vaStr = (char *)va_arg(vaList, int);
if (vaStr)
- fprintf(out, "%s ", vaStr);
+ fprintf(out, "STR %s ", vaStr);
else
- fprintf(out, "<null>");
+ fprintf(out, "STR <null>");
+ break;
+ case AUD_NAME: /* Name */
+ vaStr = (char *)va_arg(vaList, int);
+ if (vaStr)
+ fprintf(out, "NAME %s ", vaStr);
+ else
+ fprintf(out, "NAME <null>");
+ break;
+ case AUD_ACL: /* ACL */
+ vaStr = (char *)va_arg(vaList, int);
+ if (vaStr)
+ fprintf(out, "ACL %s ", vaStr);
+ else
+ fprintf(out, "ACL <null>");
break;
case AUD_INT: /* Integer */
vaInt = va_arg(vaList, int);
- fprintf(out, "%d ", vaInt);
+ fprintf(out, "INT %d ", vaInt);
+ break;
+ case AUD_ID: /* ViceId */
+ vaInt = va_arg(vaList, int);
+ fprintf(out, "ID %d ", vaInt);
break;
case AUD_DATE: /* Date */
+ vaLong = va_arg(vaList, afs_int32);
+ fprintf(out, "DATE %u ", vaLong);
+ break;
case AUD_HOST: /* Host ID */
vaLong = va_arg(vaList, afs_int32);
- fprintf(out, "%u ", vaLong);
+ hostAddr.s_addr = vaLong;
+ fprintf(out, "HOST %s ", inet_ntoa(hostAddr));
break;
case AUD_LONG: /* afs_int32 */
vaLong = va_arg(vaList, afs_int32);
- fprintf(out, "%d ", vaLong);
+ fprintf(out, "LONG %d ", vaLong);
break;
case AUD_LST: /* Ptr to another list */
vaLst = (char *)va_arg(vaList, int);
case AUD_FID: /* AFSFid - contains 3 entries */
vaFid = (struct AFSFid *)va_arg(vaList, int);
if (vaFid)
- fprintf(out, "%u:%u:%u ", vaFid->Volume, vaFid->Vnode,
+ fprintf(out, "FID %u:%u:%u ", vaFid->Volume, vaFid->Vnode,
vaFid->Unique);
else
- fprintf(out, "%u:%u:%u ", 0, 0, 0);
+ fprintf(out, "FID %u:%u:%u ", 0, 0, 0);
break;
case AUD_FIDS: /* array of Fids */
vaFids = (struct AFSCBFids *)va_arg(vaList, int);
vaFid = NULL;
- if (vaFids)
- vaFid = vaFids->AFSCBFids_val;
- if (vaFid)
- fprintf(out, "%u %u:%u:%u ", vaFids->AFSCBFids_len, vaFid->Volume,
- vaFid->Vnode, vaFid->Unique);
- else
- fprintf(out, "0 0:0:0 ");
+ if (vaFids) {
+ int i;
+ if (vaFid)
+ fprintf(out, "FIDS %u FID %u:%u:%u ", vaFids->AFSCBFids_len, vaFid->Volume,
+ vaFid->Vnode, vaFid->Unique);
+ else
+ fprintf(out, "FIDS 0 FID 0:0:0 ");
+
+ for ( i = 1; i < vaFids->AFSCBFids_len; i++ ) {
+ vaFid = vaFids->AFSCBFids_val;
+ if (vaFid)
+ fprintf(out, "FID %u:%u:%u ", vaFid->Volume,
+ vaFid->Vnode, vaFid->Unique);
+ else
+ fprintf(out, "FID 0:0:0 ");
+ }
+ }
break;
default:
fprintf(out, "--badval-- ");
if (call) {
conn = rx_ConnectionOf(call); /* call -> conn) */
if (conn) {
- secClass = rx_SecurityClassOf(conn); /* conn -> securityIndex */
+ secClass = rx_SecurityClassOf(conn); /* conn -> securityIndex */
if (secClass == 0) { /* unauthenticated */
osi_audit("AFS_Aud_Unauth", (-1), AUD_STR, audEvent, AUD_END);
strcpy(afsName, "--UnAuth--");
rxkad_GetServerInfo(conn, NULL, NULL, name, inst, tcell,
NULL);
if (code) {
- osi_audit("AFS_Aud_NoAFSId", (-1), AUD_STR, audEvent,
- AUD_END);
+ osi_audit("AFS_Aud_NoAFSId", (-1), AUD_STR, audEvent, AUD_END);
strcpy(afsName, "--NoName--");
} else {
strncpy(vname, name, sizeof(vname));
strcat(vname, inst);
}
if ((clen = strlen(tcell))) {
-#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
+#if defined(AFS_ATHENA_STDENV) || defined(AFS_KERBREALM_ENV)
static char local_realm[AFS_REALM_SZ] = "";
if (!local_realm[0]) {
if (afs_krb_get_lrealm(local_realm, 0) != 0 /*KSUCCESS*/)
strcat(vname, tcell);
}
#endif
- strcpy(afsName, vname);
}
+ strcpy(afsName, vname);
}
} else { /* Unauthenticated & unknown */
-
- osi_audit("AFS_Aud_UnknSec", (-1), AUD_STR, audEvent,
- AUD_END);
+ osi_audit("AFS_Aud_UnknSec", (-1), AUD_STR, audEvent, AUD_END);
+ strcpy(afsName, "--Unknown--");
}
done:
peer = rx_PeerOf(conn); /* conn -> peer */
else
osi_audit("AFS_Aud_NoHost", (-1), AUD_STR, audEvent, AUD_END);
} else { /* null conn */
-
osi_audit("AFS_Aud_NoConn", (-1), AUD_STR, audEvent, AUD_END);
}
} else { /* null call */
-
osi_audit("AFS_Aud_NoCall", (-1), AUD_STR, audEvent, AUD_END);
}
-
va_start(vaList, errCode);
- osi_audit(audEvent, errCode, AUD_STR, afsName, AUD_HOST, hostId, AUD_LST,
- vaList, AUD_END);
+ osi_audit(audEvent, errCode, AUD_NAME, afsName, AUD_HOST, hostId,
+ AUD_LST, vaList, AUD_END);
return 0;
}
afs_int32 cid = ANONYMOUSID;
code = iNewEntry(call, aname, aid, oid, &cid);
- osi_auditU(call, PTS_INewEntEvent, code, AUD_LONG, aid, AUD_STR, aname,
- AUD_LONG, oid, AUD_END);
+ osi_auditU(call, PTS_INewEntEvent, code, AUD_ID, aid, AUD_STR, aname,
+ AUD_ID, oid, AUD_END);
ViceLog(25, ("PTS_INewEntry: code %d cid %d aid %d aname %s oid %d", code, cid, aid, aname, oid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = newEntry(call, aname, flag, oid, aid, &cid);
- osi_auditU(call, PTS_NewEntEvent, code, AUD_LONG, *aid, AUD_STR, aname,
- AUD_LONG, oid, AUD_END);
+ osi_auditU(call, PTS_NewEntEvent, code, AUD_ID, *aid, AUD_STR, aname,
+ AUD_ID, oid, AUD_END);
ViceLog(25, ("PTS_NewEntry: code %d cid %d aid %d aname %s oid %d", code, cid, *aid, aname, oid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = whereIsIt(call, aid, apos, &cid);
- osi_auditU(call, PTS_WheIsItEvent, code, AUD_LONG, aid, AUD_LONG, *apos,
+ osi_auditU(call, PTS_WheIsItEvent, code, AUD_ID, aid, AUD_LONG, *apos,
AUD_END);
ViceLog(125, ("PTS_WhereIsIt: code %d cid %d aid %d apos %d", code, cid, aid, *apos));
return code;
afs_int32 cid = ANONYMOUSID;
code = addToGroup(call, aid, gid, &cid);
- osi_auditU(call, PTS_AdToGrpEvent, code, AUD_LONG, gid, AUD_LONG, aid,
+ osi_auditU(call, PTS_AdToGrpEvent, code, AUD_ID, gid, AUD_ID, aid,
AUD_END);
ViceLog(5, ("PTS_AddToGroup: code %d cid %d gid %d aid %d", code, cid, gid, aid));
return code;
code = nameToID(call, aname, aid);
osi_auditU(call, PTS_NmToIdEvent, code, AUD_END);
- ViceLog(125, ("PTS_NameToID: code %d aname %s aid %d", code, aname, aid));
+ ViceLog(125, ("PTS_NameToID: code %d", code));
return code;
}
code = NameToID(tt, aname->namelist_val[i], &aid->idlist_val[i]);
if (code != PRSUCCESS)
aid->idlist_val[i] = ANONYMOUSID;
+ osi_audit(PTS_NmToIdEvent, code, AUD_STR,
+ aname->namelist_val[i], AUD_ID, aid->idlist_val[i],
+ AUD_END);
+ ViceLog(125, ("PTS_NameToID: code %d aname %s aid %d", code,
+ aname->namelist_val[i], aid->idlist_val[i]));
if (count++ > 50)
IOMGR_Poll(), count = 0;
}
afs_int32 code;
code = idToName(call, aid, aname);
- osi_auditU(call, PTS_IdToNmEvent, code, AUD_LONG, aid, AUD_END);
- ViceLog(125, ("PTS_IDToName: code %d aid %d aname %s", code, aid, aname));
+ osi_auditU(call, PTS_IdToNmEvent, code, AUD_END);
+ ViceLog(125, ("PTS_IDToName: code %d", code));
return code;
}
code = IDToName(tt, aid->idlist_val[i], aname->namelist_val[i]);
if (code != PRSUCCESS)
sprintf(aname->namelist_val[i], "%d", aid->idlist_val[i]);
+ osi_audit(PTS_IdToNmEvent, code, AUD_ID, aid->idlist_val[i],
+ AUD_STR, aname->namelist_val[i], AUD_END);
+ ViceLog(125, ("PTS_idToName: code %d aid %d aname %s", code,
+ aid->idlist_val[i], aname->namelist_val[i]));
if (count++ > 50)
IOMGR_Poll(), count = 0;
}
afs_int32 cid = ANONYMOUSID;
code = Delete(call, aid, &cid);
- osi_auditU(call, PTS_DelEvent, code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_DelEvent, code, AUD_ID, aid, AUD_END);
ViceLog(25, ("PTS_Delete: code %d cid %d aid %d", code, cid, aid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = UpdateEntry(call, aid, name, uentry, &cid);
- osi_auditU(call, PTS_UpdEntEvent, code, AUD_LONG, aid, AUD_STR, name, AUD_END);
+ osi_auditU(call, PTS_UpdEntEvent, code, AUD_ID, aid, AUD_STR, name, AUD_END);
ViceLog(5, ("PTS_UpdateEntry: code %d cid %d aid %d name %s", code, cid, aid, name));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = removeFromGroup(call, aid, gid, &cid);
- osi_auditU(call, PTS_RmFmGrpEvent, code, AUD_LONG, gid, AUD_LONG, aid,
+ osi_auditU(call, PTS_RmFmGrpEvent, code, AUD_ID, gid, AUD_ID, aid,
AUD_END);
ViceLog(5, ("PTS_RemoveFromGroup: code %d cid %d gid %d aid %d", code, cid, gid, aid));
return code;
afs_int32 cid = ANONYMOUSID;
code = getCPS(call, aid, alist, over, &cid);
- osi_auditU(call, PTS_GetCPSEvent, code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_GetCPSEvent, code, AUD_ID, aid, AUD_END);
ViceLog(125, ("PTS_GetCPS: code %d cid %d aid %d", code, cid, aid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = getCPS2(call, aid, ahost, alist, over, &cid);
- osi_auditU(call, PTS_GetCPS2Event, code, AUD_LONG, aid, AUD_HOST, ahost,
+ osi_auditU(call, PTS_GetCPS2Event, code, AUD_ID, aid, AUD_HOST, ahost,
AUD_END);
ViceLog(125, ("PTS_GetCPS2: code %d cid %d aid %d ahost %d", code, cid, aid, ahost));
return code;
afs_int32 cid = ANONYMOUSID;
code = setMax(call, aid, gflag, &cid);
- osi_auditU(call, PTS_SetMaxEvent, code, AUD_LONG, aid, AUD_LONG, gflag,
+ osi_auditU(call, PTS_SetMaxEvent, code, AUD_ID, aid, AUD_LONG, gflag,
AUD_END);
ViceLog(125, ("PTS_SetMax: code %d cid %d aid %d gflag %d", code, cid, aid, gflag));
return code;
afs_int32 cid = ANONYMOUSID;
code = listEntry(call, aid, aentry, &cid);
- osi_auditU(call, PTS_LstEntEvent, code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_LstEntEvent, code, AUD_ID, aid, AUD_END);
ViceLog(125, ("PTS_ListEntry: code %d cid %d aid %d", code, cid, aid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = changeEntry(call, aid, name, oid, newid, &cid);
- osi_auditU(call, PTS_ChgEntEvent, code, AUD_LONG, aid, AUD_STR, name,
+ osi_auditU(call, PTS_ChgEntEvent, code, AUD_ID, aid, AUD_STR, name,
AUD_LONG, oid, AUD_LONG, newid, AUD_END);
ViceLog(5, ("PTS_ChangeEntry: code %d cid %d aid %d name %s oid %d newid %d", code, cid, aid, name, oid, newid));
return code;
code =
setFieldsEntry(call, id, mask, flags, ngroups, nusers, spare1,
spare2, &cid);
- osi_auditU(call, PTS_SetFldEntEvent, code, AUD_LONG, id, AUD_END);
+ osi_auditU(call, PTS_SetFldEntEvent, code, AUD_ID, id, AUD_END);
ViceLog(5, ("PTS_SetFieldsEntry: code %d cid %d id %d", code, cid, id));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = listElements(call, aid, alist, over, &cid);
- osi_auditU(call, PTS_LstEleEvent, code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_LstEleEvent, code, AUD_ID, aid, AUD_END);
ViceLog(125, ("PTS_ListElements: code %d cid %d aid %d", code, cid, aid));
return code;
}
afs_int32 cid = ANONYMOUSID;
code = listSuperGroups(call, aid, alist, over, &cid);
- osi_auditU(call, "PTS_LstSGrps", code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_LstSGrps, code, AUD_ID, aid, AUD_END);
ViceLog(125, ("PTS_ListSuperGroups: code %d cid %d aid %d", code, cid, aid));
return code;
#else
afs_int32 cid = ANONYMOUSID;
code = listOwned(call, aid, alist, lastP, &cid);
- osi_auditU(call, PTS_LstOwnEvent, code, AUD_LONG, aid, AUD_END);
+ osi_auditU(call, PTS_LstOwnEvent, code, AUD_ID, aid, AUD_END);
ViceLog(125, ("PTS_ListOwned: code %d cid %d aid %d", code, cid, aid));
return code;
}
#endif
} else { /* !VanillaUser(client) && !FetchData */
- osi_audit(PrivilegeEvent, 0, AUD_INT,
+ osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->ViceId : 0), AUD_INT, CallingRoutine,
AUD_END);
}
else if (VanillaUser(client))
return (EPERM); /* Was EACCES */
else
- osi_audit(PrivilegeEvent, 0, AUD_INT,
+ osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->ViceId : 0), AUD_INT,
CallingRoutine, AUD_END);
}
} else {
if (CallingRoutine != CHK_STOREDATA && !VanillaUser(client)) {
- osi_audit(PrivilegeEvent, 0, AUD_INT,
+ osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->ViceId : 0), AUD_INT,
CallingRoutine, AUD_END);
} else {
else if (VanillaUser(client))
return (EPERM); /* Was EACCES */
else
- osi_audit(PrivilegeEvent, 0, AUD_INT,
+ osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->ViceId : 0), AUD_INT,
CallingRoutine, AUD_END);
}
if (VanillaUser(client))
return (EACCES);
else
- osi_audit(PrivSetID, 0, AUD_INT,
+ osi_audit(PrivSetID, 0, AUD_ID,
(client ? client->ViceId : 0), AUD_INT,
CallingRoutine, AUD_END);
}
if (VanillaUser(client))
return (EACCES);
else
- osi_audit(PrivilegeEvent, 0, AUD_INT,
+ osi_audit(PrivilegeEvent, 0, AUD_ID,
(client ? client->ViceId : 0),
AUD_INT, CallingRoutine, AUD_END);
}
targetptr->disk.modeBits = modebits;
switch (Caller) {
case TVS_SDATA:
- osi_audit(PrivSetID, 0, AUD_INT, client->ViceId, AUD_INT,
+ osi_audit(PrivSetID, 0, AUD_ID, client->ViceId, AUD_INT,
CHK_STOREDATA, AUD_END);
break;
case TVS_CFILE:
case TVS_SSTATUS:
- osi_audit(PrivSetID, 0, AUD_INT, client->ViceId, AUD_INT,
+ osi_audit(PrivSetID, 0, AUD_ID, client->ViceId, AUD_INT,
CHK_STORESTATUS, AUD_END);
break;
default:
struct client *client; /* pointer to the client data */
struct rx_connection *tcon; /* the connection we're part of */
afs_int32 rights, anyrights; /* rights for this and any user */
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchDataEvent, errorCode, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, FetchDataEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return (errorCode);
} /*SRXAFS_FetchData */
afs_int32 Len, struct AFSFetchStatus * OutStatus,
struct AFSCallBack * CallBack, struct AFSVolSync * Sync)
{
- int code;
-
- code =
- common_FetchData64(acall, Fid, Pos, Len, OutStatus, CallBack, Sync,
- 0);
- return code;
+ return common_FetchData64(acall, Fid, Pos, Len, OutStatus, CallBack,
+ Sync, 0);
}
afs_int32
struct client *client; /* pointer to the client data */
afs_int32 rights, anyrights; /* rights for this and any user */
struct rx_connection *tcon = rx_ConnectionOf(acall);
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchACLEvent, errorCode, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, FetchACLEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return errorCode;
} /*SRXAFS_FetchACL */
Volume *volptr = 0; /* pointer to the volume */
struct client *client; /* pointer to the client data */
afs_int32 rights, anyrights; /* rights for this and any user */
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
struct rx_connection *tcon = rx_ConnectionOf(acall);
afs_int32 rights, anyrights; /* rights for this and any user */
register struct AFSFid *tfid; /* file id we're dealing with now */
struct rx_connection *tcon = rx_ConnectionOf(acall);
+ struct client *t_client = NULL; /* tmp pointer to the client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
volptr);
errorCode = CallPostamble(tcon, errorCode);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (errorCode == 0) {
Audit_and_Return:
ViceLog(2, ("SAFS_BulkStatus returns %d\n", errorCode));
- osi_auditU(acall, BulkFetchStatusEvent, errorCode, AUD_FIDS, Fids,
- AUD_END);
+ osi_auditU(acall, BulkFetchStatusEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FIDS, Fids, AUD_END);
return errorCode;
} /*SRXAFS_BulkStatus */
afs_int32 rights, anyrights; /* rights for this and any user */
register struct AFSFid *tfid; /* file id we're dealing with now */
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
AFSFetchStatus *tstatus;
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
volptr);
errorCode = CallPostamble(tcon, errorCode);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (errorCode == 0) {
Audit_and_Return:
ViceLog(2, ("SAFS_InlineBulkStatus returns %d\n", errorCode));
- osi_auditU(acall, InlineBulkFetchStatusEvent, errorCode, AUD_FIDS, Fids,
- AUD_END);
+ osi_auditU(acall, InlineBulkFetchStatusEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FIDS, Fids, AUD_END);
return 0;
} /*SRXAFS_InlineBulkStatus */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_FetchStatus:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, FetchStatusEvent, code, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, FetchStatusEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return code;
} /*SRXAFS_FetchStatus */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
struct rx_connection *tcon;
#if FS_STATS_DETAILED
FS_UNLOCK;
}
#endif /* FS_STATS_DETAILED */
-
- osi_auditU(acall, StoreDataEvent, errorCode, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, StoreDataEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return (errorCode);
-
} /*common_StoreData64 */
afs_int32
afs_uint32 Length, afs_uint32 FileLength,
struct AFSFetchStatus * OutStatus, struct AFSVolSync * Sync)
{
- int code;
-
- code =
- common_StoreData64(acall, Fid, InStatus, Pos, Length, FileLength,
- OutStatus, Sync);
- return code;
-
+ return common_StoreData64(acall, Fid, InStatus, Pos, Length, FileLength,
+ OutStatus, Sync);
} /*SRXAFS_StoreData */
afs_int32
struct client *client; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
struct rx_connection *tcon;
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, StoreACLEvent, errorCode, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, StoreACLEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_ACL, AccessList->AFSOpaque_val, AUD_END);
return errorCode;
} /*SRXAFS_StoreACL */
Volume *volptr = 0; /* pointer to the volume header */
struct client *client; /* pointer to client structure */
afs_int32 rights, anyrights; /* rights for this and any user */
- struct client *t_client; /* tmp ptr to client data */
+ struct client *t_client = NULL; /* tmp ptr to client data */
struct in_addr logHostAddr; /* host ip holder for inet_ntoa */
struct rx_connection *tcon = rx_ConnectionOf(acall);
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_StoreStatus:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, StoreStatusEvent, code, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, StoreStatusEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return code;
} /*SRXAFS_StoreStatus */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_RemoveFile:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RemoveFileEvent, code, AUD_FID, DirFid, AUD_STR, Name,
- AUD_END);
+ osi_auditU(acall, RemoveFileEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name, AUD_END);
return code;
} /*SRXAFS_RemoveFile */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_CreateFile:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, CreateFileEvent, code, AUD_FID, DirFid, AUD_STR, Name,
- AUD_END);
+ osi_auditU(acall, CreateFileEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name, AUD_END);
return code;
} /*SRXAFS_CreateFile */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_Rename:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RenameFileEvent, code, AUD_FID, OldDirFid, AUD_STR,
- OldName, AUD_FID, NewDirFid, AUD_STR, NewName, AUD_END);
+ osi_auditU(acall, RenameFileEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, OldDirFid, AUD_STR, OldName,
+ AUD_FID, NewDirFid, AUD_STR, NewName, AUD_END);
return code;
} /*SRXAFS_Rename */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_Symlink:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SymlinkEvent, code, AUD_FID, DirFid, AUD_STR, Name,
- AUD_END);
+ osi_auditU(acall, SymlinkEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name,
+ AUD_FID, OutFid, AUD_STR, LinkContents, AUD_END);
return code;
} /*SRXAFS_Symlink */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_Link:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, LinkEvent, code, AUD_FID, DirFid, AUD_STR, Name,
+ osi_auditU(acall, LinkEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name,
AUD_FID, ExistingFid, AUD_END);
return code;
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_MakeDir:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, MakeDirEvent, code, AUD_FID, DirFid, AUD_STR, Name,
- AUD_END);
+ osi_auditU(acall, MakeDirEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name,
+ AUD_FID, OutFid, AUD_END);
return code;
} /*SRXAFS_MakeDir */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_RemoveDir:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, RemoveDirEvent, code, AUD_FID, DirFid, AUD_STR, Name,
- AUD_END);
+ osi_auditU(acall, RemoveDirEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, DirFid, AUD_STR, Name, AUD_END);
return code;
} /*SRXAFS_RemoveDir */
ViceLockType type, struct AFSVolSync * Sync)
{
return SRXAFS_SetLock(acall, Fid, type, Sync);
-
} /*SRXAFS_OldSetLock */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_SetLock:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SetLockEvent, code, AUD_FID, Fid, AUD_LONG, type,
- AUD_END);
+ osi_auditU(acall, SetLockEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_LONG, type, AUD_END);
return code;
-
} /*SRXAFS_SetLock */
struct AFSVolSync * Sync)
{
return SRXAFS_ExtendLock(acall, Fid, Sync);
-
} /*SRXAFS_OldExtendLock */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_ExtendLock:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, ExtendLockEvent, code, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, ExtendLockEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return code;
} /*SRXAFS_ExtendLock */
struct AFSVolSync * Sync)
{
return SRXAFS_ReleaseLock(acall, Fid, Sync);
-
} /*SRXAFS_OldReleaseLock */
{
afs_int32 code;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_ReleaseLock:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, ReleaseLockEvent, code, AUD_FID, Fid, AUD_END);
+ osi_auditU(acall, ReleaseLockEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_FID, Fid, AUD_END);
return code;
} /*SRXAFS_ReleaseLock */
SRXAFS_GetStatistics(struct rx_call *acall, struct ViceStatistics *Statistics)
{
afs_int32 code;
- struct rx_connection *tcon;
+ struct rx_connection *tcon = rx_ConnectionOf(acall);
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
Bad_GetStatistics:
code = CallPostamble(tcon, code);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (code == 0) {
}
#endif /* FS_STATS_DETAILED */
+ osi_auditU(acall, GetStatisticsEvent, code,
+ AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
return code;
-
} /*SRXAFS_GetStatistics */
SRXAFS_XStatsVersion(struct rx_call * a_call, afs_int32 * a_versionP)
{ /*SRXAFS_XStatsVersion */
+ struct client *t_client = NULL; /* tmp ptr to client data */
+ struct rx_connection *tcon;
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
*a_versionP = AFS_XSTAT_VERSION;
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
fs_stats_GetDiff(elapsedTime, opStartTime, opStopTime);
(opP->numSuccesses)++;
FS_UNLOCK;
#endif /* FS_STATS_DETAILED */
- return (0);
+ osi_auditU(a_call, XStatsVersionEvent, 0,
+ AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
+ return (0);
} /*SRXAFS_XStatsVersion */
afs_int32 rights, anyrights; /* rights for this and any user */
AFSFid dummyFid;
struct rx_connection *tcon;
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
}
errorCode = CallPostamble(tcon, errorCode);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (errorCode == 0) {
FS_UNLOCK;
}
#endif /* FS_STATS_DETAILED */
+
+ osi_auditU(acall, GetVolumeStatusEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_LONG, avolid, AUD_STR, *Name, AUD_END);
return (errorCode);
} /*SRXAFS_GetVolumeStatus */
afs_int32 rights, anyrights; /* rights for this and any user */
AFSFid dummyFid;
struct rx_connection *tcon = rx_ConnectionOf(acall);
+ struct client *t_client = NULL; /* tmp ptr to client data */
#if FS_STATS_DETAILED
struct fs_stats_opTimingData *opP; /* Ptr to this op's timing struct */
struct timeval opStartTime, opStopTime; /* Start/stop times for RPC op */
ViceLog(2, ("SAFS_SetVolumeStatus returns %d\n", errorCode));
errorCode = CallPostamble(tcon, errorCode);
+ t_client = (struct client *)rx_GetSpecific(tcon, rxcon_client_key);
+
#if FS_STATS_DETAILED
TM_GetTimeOfDay(&opStopTime, 0);
if (errorCode == 0) {
}
#endif /* FS_STATS_DETAILED */
- osi_auditU(acall, SetVolumeStatusEvent, errorCode, AUD_LONG, avolid,
- AUD_STR, Name, AUD_END);
+ osi_auditU(acall, SetVolumeStatusEvent, errorCode,
+ AUD_ID, t_client ? t_client->ViceId : 0,
+ AUD_LONG, avolid, AUD_STR, Name, AUD_END);
return (errorCode);
-
} /*SRXAFS_SetVolumeStatus */
#define DEFAULTVOLUME "root.afs"