audit-add-and-fix-messages-20050708
[openafs.git] / src / viced / afsfileprocs.c
index 7da4edf..4259a5d 100644 (file)
@@ -483,11 +483,21 @@ CheckVnode(AFSFid * fid, Volume ** volptr, Vnode ** vptr, int lock)
                    /* I'm not really worried about when we restarted, I'm   */
                    /* just worried about when the first VBUSY was returned. */
                    TM_GetTimeOfDay(&restartedat, 0);
+                   if (busyonrst) {
+                       FS_LOCK;
+                       afs_perfstats.fs_nBusies++;
+                       FS_UNLOCK;
+                   }
                    return (busyonrst ? VBUSY : VRESTARTING);
                } else {
                    struct timeval now;
                    TM_GetTimeOfDay(&now, 0);
                    if ((now.tv_sec - restartedat.tv_sec) < (11 * 60)) {
+                       if (busyonrst) {
+                           FS_LOCK;
+                           afs_perfstats.fs_nBusies++;
+                           FS_UNLOCK;
+                       }
                        return (busyonrst ? VBUSY : VRESTARTING);
                    } else {
                        return (VRESTARTING);
@@ -584,7 +594,10 @@ GetRights(struct client *client, struct acl_accessList *ACL,
        *anyrights = 0;
     }
     *rights = 0;
+
+    ObtainWriteLock(&client->lock);
     acl_CheckRights(ACL, &client->CPS, rights);
+    ReleaseWriteLock(&client->lock);
 
     /* wait if somebody else is already doing the getCPS call */
     H_LOCK;
@@ -801,7 +814,7 @@ Check_PermissionRights(Vnode * targetptr, struct client *client,
 #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);
        }
@@ -819,13 +832,13 @@ Check_PermissionRights(Vnode * targetptr, struct client *client,
                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 {
@@ -845,7 +858,7 @@ Check_PermissionRights(Vnode * targetptr, struct client *client,
                        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);
                    }
@@ -861,7 +874,7 @@ Check_PermissionRights(Vnode * targetptr, struct client *client,
                        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);
                    }
@@ -901,7 +914,7 @@ Check_PermissionRights(Vnode * targetptr, struct client *client,
                            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);
                        }
@@ -1245,11 +1258,7 @@ DeleteTarget(Vnode * parentptr, Volume * volptr, Vnode ** targetptr,
                        ("DT: inode=%s, name=%s, errno=%d\n",
                         PrintInode(NULL, VN_GET_INO(*targetptr)), Name,
                         errno));
-#ifdef AFS_DEC_ENV
-               if ((errno != ENOENT) && (errno != EIO) && (errno != ENXIO))
-#else
                if (errno != ENOENT)
-#endif
                {
                    ViceLog(0,
                            ("Volume %u now offline, must be salvaged.\n",
@@ -1493,12 +1502,12 @@ Update_TargetVnodeStatus(Vnode * targetptr, afs_uint32 Caller,
            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:
@@ -1898,7 +1907,7 @@ RXGetVolumeStatus(AFSFetchVolumeStatus * status, char **name, char **offMsg,
     }
     strcpy(*motd, V_motd(volptr));
 #endif /* FS_STATS_DETAILED */
-
+    return 0;
 }                              /*RXGetVolumeStatus */
 
 
@@ -2072,7 +2081,7 @@ common_FetchData64(struct rx_call *acall, struct AFSFid *Fid,
     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 */
@@ -2279,7 +2288,9 @@ common_FetchData64(struct rx_call *acall, struct AFSFid *Fid,
     }
 #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 */
@@ -2289,12 +2300,8 @@ SRXAFS_FetchData(struct rx_call * acall, struct AFSFid * Fid, afs_int32 Pos,
                 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
@@ -2308,13 +2315,13 @@ SRXAFS_FetchData64(struct rx_call * acall, struct AFSFid * Fid, afs_int64 Pos,
 #ifdef AFS_64BIT_ENV
 #ifndef AFS_LARGEFILE_ENV
     if (Pos + Len > 0x7fffffff)
-       return E2BIG;
+       return EFBIG;
 #endif /* !AFS_LARGEFILE_ENV */
     tPos = (afs_sfsize_t) Pos;
     tLen = (afs_sfsize_t) Len;
 #else /* AFS_64BIT_ENV */
     if (Pos.high || Len.high)
-       return E2BIG;
+       return EFBIG;
     tPos = Pos.low;
     tLen = Len.low;
 #endif /* AFS_64BIT_ENV */
@@ -2337,7 +2344,7 @@ SRXAFS_FetchACL(struct rx_call * acall, struct AFSFid * Fid,
     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 */
@@ -2432,7 +2439,9 @@ SRXAFS_FetchACL(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
 
@@ -2453,7 +2462,7 @@ SAFSS_FetchStatus(struct rx_call *acall, struct AFSFid *Fid,
     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);
 
@@ -2530,6 +2539,7 @@ SRXAFS_BulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
     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 */
@@ -2631,6 +2641,8 @@ SRXAFS_BulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
                           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) {
@@ -2651,8 +2663,9 @@ SRXAFS_BulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
 
   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 */
@@ -2673,6 +2686,7 @@ SRXAFS_InlineBulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
     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 */
@@ -2732,6 +2746,7 @@ SRXAFS_InlineBulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
                              &rights, &anyrights))) {
            tstatus = &OutStats->AFSBulkStats_val[i];
            tstatus->errorCode = errorCode;
+           PutVolumePackage(parentwhentargetnotdir, targetptr, (Vnode *) 0, volptr);
            parentwhentargetnotdir = (Vnode *) 0;
            targetptr = (Vnode *) 0;
            volptr = (Volume *) 0;
@@ -2789,6 +2804,8 @@ SRXAFS_InlineBulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
                           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) {
@@ -2809,8 +2826,9 @@ SRXAFS_InlineBulkStatus(struct rx_call * acall, struct AFSCBFids * Fids,
 
   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 */
@@ -2823,6 +2841,7 @@ SRXAFS_FetchStatus(struct rx_call * acall, struct AFSFid * Fid,
 {
     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 */
@@ -2847,6 +2866,8 @@ SRXAFS_FetchStatus(struct rx_call * acall, struct AFSFid * Fid,
   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) {
@@ -2865,7 +2886,9 @@ SRXAFS_FetchStatus(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
@@ -2885,7 +2908,7 @@ common_StoreData64(struct rx_call *acall, struct AFSFid *Fid,
     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
@@ -3084,10 +3107,10 @@ common_StoreData64(struct rx_call *acall, struct AFSFid *Fid,
        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
@@ -3096,13 +3119,8 @@ SRXAFS_StoreData(struct rx_call * acall, struct AFSFid * Fid,
                 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
@@ -3120,14 +3138,14 @@ SRXAFS_StoreData64(struct rx_call * acall, struct AFSFid * Fid,
 #ifdef AFS_64BIT_ENV
 #ifndef AFS_LARGEFILE_ENV
     if (FileLength > 0x7fffffff)
-       return E2BIG;
+       return EFBIG;
 #endif /* !AFS_LARGEFILE_ENV */
     tPos = (afs_fsize_t) Pos;
     tLength = (afs_fsize_t) Length;
     tFileLength = (afs_fsize_t) FileLength;
 #else /* AFS_64BIT_ENV */
     if (FileLength.high)
-       return E2BIG;
+       return EFBIG;
     tPos = Pos.low;
     tLength = Length.low;
     tFileLength = FileLength.low;
@@ -3152,7 +3170,7 @@ SRXAFS_StoreACL(struct rx_call * acall, struct AFSFid * Fid,
     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 */
@@ -3246,7 +3264,9 @@ SRXAFS_StoreACL(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
@@ -3267,7 +3287,7 @@ SAFSS_StoreStatus(struct rx_call *acall, struct AFSFid *Fid,
     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);
 
@@ -3343,6 +3363,7 @@ SRXAFS_StoreStatus(struct rx_call * acall, struct AFSFid * Fid,
 {
     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 */
@@ -3367,6 +3388,8 @@ SRXAFS_StoreStatus(struct rx_call * acall, struct AFSFid * Fid,
   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) {
@@ -3385,7 +3408,9 @@ SRXAFS_StoreStatus(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
@@ -3499,6 +3524,7 @@ SRXAFS_RemoveFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
 {
     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 */
@@ -3523,6 +3549,8 @@ SRXAFS_RemoveFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
   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) {
@@ -3541,8 +3569,9 @@ SRXAFS_RemoveFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
     }
 #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 */
@@ -3627,8 +3656,8 @@ SAFSS_CreateFile(struct rx_call *acall, struct AFSFid *DirFid, char *Name,
     Update_TargetVnodeStatus(targetptr, TVS_CFILE, client, InStatus,
                             parentptr, volptr, 0);
 
-    /* set up the return status for the parent dir and the newly created file */
-    GetStatus(targetptr, OutFidStatus, rights, anyrights, parentptr);
+    /* set up the return status for the parent dir and the newly created file, and since the newly created file is owned by the creator, give it PRSFS_ADMINISTER to tell the client its the owner of the file */
+    GetStatus(targetptr, OutFidStatus, rights | PRSFS_ADMINISTER, anyrights, parentptr);
     GetStatus(parentptr, OutDirStatus, rights, anyrights, 0);
 
     /* convert the write lock to a read lock before breaking callbacks */
@@ -3661,6 +3690,7 @@ SRXAFS_CreateFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
 {
     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 */
@@ -3687,6 +3717,8 @@ SRXAFS_CreateFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
   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) {
@@ -3705,8 +3737,9 @@ SRXAFS_CreateFile(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
     }
 #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 */
@@ -3949,7 +3982,13 @@ SAFSS_Rename(struct rx_call *acall, struct AFSFid *OldDirFid, char *OldName,
      * directory structure.  This is to prevent removing a subtree alltogether
      */
     if ((oldvptr != newvptr) && (fileptr->disk.type == vDirectory)) {
-       for (testnode = newvptr->disk.parent; testnode != 0;) {
+        afs_int32 forpass = 0, vnum = 0, top = 0;
+       for (testnode = newvptr->disk.parent; testnode != 0; forpass++) {
+           if (testnode > vnum) vnum = testnode;
+           if (forpass > vnum) {
+               errorCode = FSERR_ELOOP;
+               goto Bad_Rename;
+           }
            if (testnode == oldvptr->vnodeNumber) {
                testnode = oldvptr->disk.parent;
                continue;
@@ -3963,10 +4002,16 @@ SAFSS_Rename(struct rx_call *acall, struct AFSFid *OldDirFid, char *OldName,
                errorCode = FSERR_ELOOP;
                goto Bad_Rename;
            }
+           if (testnode == 1) top = 1;
            testvptr = VGetVnode(&errorCode, volptr, testnode, READ_LOCK);
            assert(errorCode == 0);
            testnode = testvptr->disk.parent;
            VPutVnode(&errorCode, testvptr);
+           if ((top == 1) && (testnode != 0)) {
+               VTakeOffline(volptr);
+               errorCode = EIO;
+               goto Bad_Rename;
+           }
            assert(errorCode == 0);
        }
     }
@@ -4134,6 +4179,7 @@ SRXAFS_Rename(struct rx_call * acall, struct AFSFid * OldDirFid,
 {
     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 */
@@ -4160,6 +4206,8 @@ SRXAFS_Rename(struct rx_call * acall, struct AFSFid * OldDirFid,
   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) {
@@ -4178,8 +4226,10 @@ SRXAFS_Rename(struct rx_call * acall, struct AFSFid * OldDirFid,
     }
 #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 */
@@ -4334,6 +4384,7 @@ SRXAFS_Symlink(acall, DirFid, Name, LinkContents, InStatus, OutFid,
 {
     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 */
@@ -4360,6 +4411,8 @@ SRXAFS_Symlink(acall, DirFid, Name, LinkContents, InStatus, OutFid,
   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) {
@@ -4378,8 +4431,10 @@ SRXAFS_Symlink(acall, DirFid, Name, LinkContents, InStatus, OutFid,
     }
 #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 */
@@ -4529,6 +4584,7 @@ SRXAFS_Link(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
 {
     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 */
@@ -4555,6 +4611,8 @@ SRXAFS_Link(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
   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) {
@@ -4573,7 +4631,9 @@ SRXAFS_Link(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
     }
 #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;
 
@@ -4724,6 +4784,7 @@ SRXAFS_MakeDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
 {
     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 */
@@ -4749,6 +4810,8 @@ SRXAFS_MakeDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
   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) {
@@ -4767,8 +4830,10 @@ SRXAFS_MakeDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
     }
 #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 */
@@ -4881,6 +4946,7 @@ SRXAFS_RemoveDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
 {
     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 */
@@ -4905,6 +4971,8 @@ SRXAFS_RemoveDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
   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) {
@@ -4923,8 +4991,9 @@ SRXAFS_RemoveDir(struct rx_call * acall, struct AFSFid * DirFid, char *Name,
     }
 #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 */
@@ -4999,7 +5068,6 @@ SRXAFS_OldSetLock(struct rx_call * acall, struct AFSFid * Fid,
                  ViceLockType type, struct AFSVolSync * Sync)
 {
     return SRXAFS_SetLock(acall, Fid, type, Sync);
-
 }                              /*SRXAFS_OldSetLock */
 
 
@@ -5009,6 +5077,7 @@ SRXAFS_SetLock(struct rx_call * acall, struct AFSFid * Fid, ViceLockType type,
 {
     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 */
@@ -5033,6 +5102,8 @@ SRXAFS_SetLock(struct rx_call * acall, struct AFSFid * Fid, ViceLockType type,
   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) {
@@ -5051,10 +5122,10 @@ SRXAFS_SetLock(struct rx_call * acall, struct AFSFid * Fid, ViceLockType type,
     }
 #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 */
 
 
@@ -5122,7 +5193,6 @@ SRXAFS_OldExtendLock(struct rx_call * acall, struct AFSFid * Fid,
                     struct AFSVolSync * Sync)
 {
     return SRXAFS_ExtendLock(acall, Fid, Sync);
-
 }                              /*SRXAFS_OldExtendLock */
 
 
@@ -5132,6 +5202,7 @@ SRXAFS_ExtendLock(struct rx_call * acall, struct AFSFid * Fid,
 {
     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 */
@@ -5156,6 +5227,8 @@ SRXAFS_ExtendLock(struct rx_call * acall, struct AFSFid * Fid,
   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) {
@@ -5174,7 +5247,9 @@ SRXAFS_ExtendLock(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
@@ -5253,7 +5328,6 @@ SRXAFS_OldReleaseLock(struct rx_call * acall, struct AFSFid * Fid,
                      struct AFSVolSync * Sync)
 {
     return SRXAFS_ReleaseLock(acall, Fid, Sync);
-
 }                              /*SRXAFS_OldReleaseLock */
 
 
@@ -5263,6 +5337,7 @@ SRXAFS_ReleaseLock(struct rx_call * acall, struct AFSFid * Fid,
 {
     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 */
@@ -5287,6 +5362,8 @@ SRXAFS_ReleaseLock(struct rx_call * acall, struct AFSFid * Fid,
   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) {
@@ -5305,7 +5382,9 @@ SRXAFS_ReleaseLock(struct rx_call * acall, struct AFSFid * Fid,
     }
 #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 */
@@ -5391,7 +5470,8 @@ afs_int32
 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 */
@@ -5423,6 +5503,8 @@ SRXAFS_GetStatistics(struct rx_call *acall, struct ViceStatistics *Statistics)
   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) {
@@ -5441,8 +5523,9 @@ SRXAFS_GetStatistics(struct rx_call *acall, struct ViceStatistics *Statistics)
     }
 #endif /* FS_STATS_DETAILED */
 
+    osi_auditU(acall, GetStatisticsEvent, code, 
+               AUD_ID, t_client ? t_client->ViceId : 0, AUD_END);
     return code;
-
 }                              /*SRXAFS_GetStatistics */
 
 
@@ -5470,6 +5553,8 @@ afs_int32
 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 */
@@ -5488,6 +5573,8 @@ SRXAFS_XStatsVersion(struct rx_call * a_call, afs_int32 * a_versionP)
 
     *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);
@@ -5503,8 +5590,10 @@ SRXAFS_XStatsVersion(struct rx_call * a_call, afs_int32 * a_versionP)
     (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 */
 
 
@@ -5627,7 +5716,8 @@ FillPerfValues(struct afs_PerfStats *a_perfP)
     a_perfP->host_ClientBlocks = CEBlocks;
 
     a_perfP->sysname_ID = afs_perfstats.sysname_ID;
-
+    a_perfP->rx_nBusies = (afs_int32) rx_stats.nBusies;
+    a_perfP->fs_nBusies = afs_perfstats.fs_nBusies;
 }                              /*FillPerfValues */
 
 
@@ -5984,11 +6074,10 @@ SRXAFS_FlushCPS(struct rx_call * acall, struct ViceIds * vids,
     for (i = 0; i < nids; i++, vd++) {
        if (!*vd)
            continue;
-       client = h_ID2Client(*vd);      /* returns client locked, or NULL */
+       client = h_ID2Client(*vd);      /* returns client write locked, or NULL */
        if (!client)
            continue;
 
-       BoostSharedLock(&client->lock);
        client->prfail = 2;     /* Means re-eval client's cps */
 #ifdef notdef
        if (client->tcon) {
@@ -6210,6 +6299,7 @@ SRXAFS_GetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
     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 */
@@ -6272,6 +6362,8 @@ SRXAFS_GetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
     }
     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) {
@@ -6289,6 +6381,10 @@ SRXAFS_GetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
        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 */
@@ -6307,6 +6403,7 @@ SRXAFS_SetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
     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 */
@@ -6361,6 +6458,8 @@ SRXAFS_SetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
     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) {
@@ -6379,10 +6478,10 @@ SRXAFS_SetVolumeStatus(struct rx_call * acall, afs_int32 avolid,
     }
 #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"
@@ -6668,6 +6767,9 @@ FetchData_RXStyle(Volume * volptr, Vnode * targetptr,
        FDH_CLOSE(fdP);
        return EIO;
     }
+    if (Pos > tlen) {
+       Len = 0;
+    }
 
     if (Pos + Len > tlen)
        Len = tlen - Pos;       /* get length we should send */
@@ -6675,7 +6777,7 @@ FetchData_RXStyle(Volume * volptr, Vnode * targetptr,
     {
        afs_int32 high, low;
        SplitOffsetOrSize(Len, high, low);
-       assert(Int64Mode || high == 0);
+       assert(Int64Mode || (Len >= 0 && high == 0) || Len < 0);
        if (Int64Mode) {
            high = htonl(high);
            rx_Write(Call, (char *)&high, sizeof(afs_int32));   /* High order bits */
@@ -7211,6 +7313,81 @@ init_sys_error_to_et(void)
 }
 
 afs_int32
+SRXAFS_CallBackRxConnAddr (struct rx_call * acall, afs_int32 *addr)
+{
+    Error errorCode = 0;
+    struct host *thost;
+    struct client *tclient;
+    static struct rx_securityClass *sc = 0;
+    int i,j;
+    struct rx_connection *tcon;
+    struct rx_connection *conn;
+    
+    if (errorCode = CallPreamble(acall, ACTIVECALL, &tcon))
+           goto Bad_CallBackRxConnAddr1;
+    
+#ifndef __EXPERIMENTAL_CALLBACK_CONN_MOVING
+    errorCode = 1;
+#else
+    H_LOCK;
+    tclient = h_FindClient_r(tcon);
+    thost = tclient->host;
+    
+    /* nothing more can be done */
+    if ( !thost->interface ) 
+       goto Bad_CallBackRxConnAddr;
+    
+    assert(thost->interface->numberOfInterfaces > 0 );
+    
+    /* the only address is the primary interface */
+    /* can't change when there's only 1 address, anyway */
+    if ( thost->interface->numberOfInterfaces == 1 ) 
+       goto Bad_CallBackRxConnAddr;
+    
+    /* initialise a security object only once */
+    if ( !sc )
+       sc = (struct rx_securityClass *) rxnull_NewClientSecurityObject();
+    
+    for ( i=0; i < thost->interface->numberOfInterfaces; i++)
+    {
+           if ( *addr == thost->interface->addr[i] ) {
+                   break;
+           }
+    }
+    
+    if ( *addr != thost->interface->addr[i] ) 
+       goto Bad_CallBackRxConnAddr;
+
+    conn = rx_NewConnection (thost->interface->addr[i],
+                            thost->port, 1, sc, 0);
+    rx_SetConnDeadTime(conn, 2); 
+    rx_SetConnHardDeadTime(conn, AFS_HARDDEADTIME); 
+    H_UNLOCK;
+    errorCode = RXAFSCB_Probe(conn);
+    H_LOCK;
+    if (!errorCode) {
+       if ( thost->callback_rxcon )
+           rx_DestroyConnection(thost->callback_rxcon);
+       thost->callback_rxcon = conn;
+       thost->host           = addr;
+       rx_SetConnDeadTime(thost->callback_rxcon, 50);
+       rx_SetConnHardDeadTime(thost->callback_rxcon, AFS_HARDDEADTIME);
+       H_UNLOCK;
+       errorCode = CallPostamble(tcon, errorCode);
+       return errorCode;
+    } else {
+       rx_DestroyConnection(conn);
+    }      
+  Bad_CallBackRxConnAddr:
+    H_UNLOCK;
+#endif
+
+    errorCode = CallPostamble(tcon, errorCode);
+ Bad_CallBackRxConnAddr1:
+    return errorCode;          /* failure */
+}
+
+afs_int32
 sys_error_to_et(afs_int32 in)
 {
     if (in == 0)