src/afs/afs_user.c typo
[openafs.git] / src / afs / afs_user.c
index 31de6f0..8fef606 100644 (file)
@@ -13,8 +13,6 @@
 #include <afsconfig.h>
 #include "afs/param.h"
 
-RCSID
-    ("$Header$");
 
 #include "afs/stds.h"
 #include "afs/sysincludes.h"   /* Standard vendor system headers */
@@ -65,7 +63,7 @@ RemoveUserConns(register struct unixuser *au)
     register int i;
     register struct server *ts;
     register struct srvAddr *sa;
-    register struct conn *tc, **lc;
+    register struct afs_conn *tc, **lc;
 
     AFS_STATCNT(RemoveUserConns);
     for (i = 0; i < NSERVERS; i++) {
@@ -78,7 +76,7 @@ RemoveUserConns(register struct unixuser *au)
                        AFS_GUNLOCK();
                        rx_DestroyConnection(tc->id);
                        AFS_GLOCK();
-                       afs_osi_Free(tc, sizeof(struct conn));
+                       afs_osi_Free(tc, sizeof(struct afs_conn));
                        break;  /* at most one instance per server */
                    }           /*Found unreferenced connection for user */
                }               /*For each connection on the server */
@@ -243,7 +241,7 @@ afs_ResetUserConns(register struct unixuser *auser)
 {
     int i;
     struct srvAddr *sa;
-    struct conn *tc;
+    struct afs_conn *tc;
 
     AFS_STATCNT(afs_ResetUserConns);
     ObtainReadLock(&afs_xsrvAddr);
@@ -481,7 +479,7 @@ afs_GetUser(register afs_int32 auid, afs_int32 acell, afs_int32 locktype)
 #ifndef AFS_NOSTATS
     afs_stats_cmfullperf.authent.PAGCreations++;
 #endif /* AFS_NOSTATS */
-    memset((char *)tu, 0, sizeof(struct unixuser));
+    memset(tu, 0, sizeof(struct unixuser));
     tu->next = afs_users[i];
     afs_users[i] = tu;
     if (RmtUser) {
@@ -593,11 +591,12 @@ static size_t afs_GCPAGs_cred_count = 0;
 /*
  * LOCKS: afs_GCPAGs_perproc_func requires write lock on afs_xuser
  */
+#if !defined(LINUX_KEYRING_SUPPORT) && (!defined(STRUCT_TASK_HAS_CRED) || defined(EXPORTED_RCU_READ_LOCK))
 void
-afs_GCPAGs_perproc_func(AFS_PROC * pproc)
+afs_GCPAGs_perproc_func(afs_proc_t * pproc)
 {
     afs_int32 pag, hash, uid;
-    const struct AFS_UCRED *pcred;
+    const afs_ucred_t *pcred;
 
     afs_GCPAGs_perproc_count++;
 
@@ -609,11 +608,11 @@ afs_GCPAGs_perproc_func(AFS_PROC * pproc)
 
     pag = PagInCred(pcred);
 #if defined(AFS_DARWIN_ENV) || defined(AFS_FBSD40_ENV) || defined(AFS_LINUX22_ENV)
-    uid = (pag != NOPAG ? pag : pcred->cr_uid);
+    uid = (pag != NOPAG ? pag : afs_cr_uid(pcred));
 #elif defined(AFS_SUN510_ENV)
     uid = (pag != NOPAG ? pag : crgetruid(pcred));
 #else
-    uid = (pag != NOPAG ? pag : pcred->cr_ruid);
+    uid = (pag != NOPAG ? pag : afs_cr_ruid(pcred));
 #endif
     hash = UHash(uid);
 
@@ -641,6 +640,7 @@ afs_GCPAGs_perproc_func(AFS_PROC * pproc)
        }
     }
 }
+#endif
 
 /*
  * Go through the process table, find all unused PAGs