]> git.michaelhowe.org Git - packages/o/openafs.git/commitdiff
STABLE14-resync-20041018 openafs-devel-1_3_72
authorDerrick Brashear <shadow@dementia.org>
Mon, 18 Oct 2004 08:11:37 +0000 (08:11 +0000)
committerDerrick Brashear <shadow@dementia.org>
Mon, 18 Oct 2004 08:11:37 +0000 (08:11 +0000)
cheat. pull in all the 1.3.71->head changes in one delta

61 files changed:
configure-libafs.in
configure.in
src/afs/LINUX/osi_groups.c
src/afs/LINUX/osi_prototypes.h
src/afs/SOLARIS/osi_vnodeops.c
src/afs/afs_buffer.c
src/afs/afs_osi.h
src/afs/afs_osi_pag.c
src/afs/afs_prototypes.h
src/auth/Makefile.in
src/bucoord/commands.c
src/bucoord/dump_sched.c
src/bucoord/restore.c
src/butc/lwps.c
src/butc/recoverDb.c
src/butm/test_ftm.c
src/config/param.amd64_linux26.h [new file with mode: 0644]
src/des/cbc_encrypt.c
src/des/des_prototypes.h
src/des/pcbc_encrypt.c
src/kauth/Makefile.in
src/libafsauthent/Makefile.in
src/libafsauthent/NTMakefile
src/libafsrpc/Makefile.in
src/libafsrpc/afsrpc.def
src/libafsrpc/mapfile [deleted file]
src/ptserver/pts.c
src/ptserver/ptuser.c
src/rx/rx.h
src/rx/rx_getaddr.c
src/rx/rx_globals.h
src/rx/rx_prototypes.h
src/rx/rx_rdwr.c
src/rxkad/Makefile.in
src/scout/Makefile.in
src/shlibafsauthent/Makefile.in
src/shlibafsrpc/Makefile.in
src/shlibafsrpc/NTMakefile [deleted file]
src/shlibafsrpc/afsrpc.def [deleted file]
src/shlibafsrpc/afsrpc.rc [deleted file]
src/ubik/Makefile.in
src/ubik/NTMakefile
src/ubik/udebug.c
src/ubik/uinit.c [new file with mode: 0644]
src/util/Makefile.in
src/util/ktime.c
src/util/netutils.c
src/util/serverLog.c
src/venus/fs.c
src/viced/callback.c
src/viced/host.c
src/viced/viced.c
src/vlserver/vlclient.c
src/vol/listinodes.c
src/vol/namei_ops.h
src/vol/ntops.c
src/vol/ntops.h
src/volser/volmain.c
src/volser/volprocs.c
src/volser/voltrans.c
src/volser/vsutils.c

index 93fe6746c9a1e1ad0b5d9a1697ca279fe6b43f9e..e2bc7a75b23c3a3f672de21fe49cc2c8e8bc0727 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(src/libafs/Makefile.common.in)
-AM_INIT_AUTOMAKE(openafs-libafs,1.3.71)
+AM_INIT_AUTOMAKE(openafs-libafs,1.3.72)
 AC_CONFIG_HEADER(src/config/afsconfig.h)
 define(OPENAFS_CONFIGURE_LIBAFS)
 
index 7395939a7dd69b0347221f137c764aa7e9aa7d6e..84067d4ff87fd8e7f7a0301b2e598e0452b92299 100644 (file)
@@ -1,5 +1,5 @@
 AC_INIT(src/config/stds.h)
-AM_INIT_AUTOMAKE(openafs,1.3.71)
+AM_INIT_AUTOMAKE(openafs,1.3.72)
 AC_CONFIG_HEADER(src/config/afsconfig.h)
 
 AC_PROG_CC
index c872ec28fdffde21d6aab0877aa8a85655bf1946..26fd2d2ad2fd8cddbb5b04f70caad2ac347933da 100644 (file)
@@ -222,7 +222,7 @@ setpag(cred_t ** cr, afs_uint32 pagvalue, afs_uint32 * newpag,
 
 
 /* Intercept the standard system call. */
-extern long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
+extern asmlinkage long (*sys_setgroupsp) (int gidsetsize, gid_t * grouplist);
 asmlinkage long
 afs_xsetgroups(int gidsetsize, gid_t * grouplist)
 {
@@ -256,7 +256,7 @@ afs_xsetgroups(int gidsetsize, gid_t * grouplist)
 
 #if defined(AFS_LINUX24_ENV)
 /* Intercept the standard uid32 system call. */
-extern long (*sys_setgroups32p) (int gidsetsize, gid_t * grouplist);
+extern asmlinkage long (*sys_setgroups32p) (int gidsetsize, gid_t * grouplist);
 asmlinkage long
 afs_xsetgroups32(int gidsetsize, gid_t * grouplist)
 {
index b39361a6d9730f862220db6e54cf0a7793647f4b..233e8af93733a544cff2af508275f040115f069a 100644 (file)
@@ -36,9 +36,6 @@ extern int osi_lookupname(char *aname, uio_seg_t seg, int followlink,
 extern int osi_InitCacheInfo(char *aname);
 extern int osi_rdwr(int rw, struct osi_file *file, caddr_t addrp,
                    size_t asize, size_t * resid);
-extern void inline setup_uio(uio_t * uiop, struct iovec *iovecp, char *buf,
-                            afs_offs_t pos, int count, uio_flag_t flag,
-                            uio_seg_t seg);
 extern int osi_file_uio_rdwr(struct osi_file *osifile, uio_t * uiop, int rw);
 extern void afs_osi_SetTime(osi_timeval_t * tvp);
 extern void osi_linux_free_inode_pages(void);
index d86fbbe78dadc3edbb9968950e3d2b4faf19bc3c..07600f8c9c350e3e2bb5cfbe5434053eca3b4c35 100644 (file)
@@ -1069,7 +1069,7 @@ afs_nfsrdwr(avc, auio, arw, ioflag, acred)
        /* do ulimit processing; shrink resid or fail */
 #if    defined(AFS_SUN56_ENV)
        if (auio->uio_loffset + auio->afsio_resid > auio->uio_llimit) {
-           if (auio->uio_llimit >= auio->uio_llimit) {
+           if (auio->uio_loffset >= auio->uio_llimit) {
                ReleaseWriteLock(&avc->lock);
                afs_BozonUnlock(&avc->pvnLock, avc);
                return EFBIG;
index 47a24d4d1a9512989f565c03aae5cb2de2bc85bc..0b56b262fb6fe25c0ebf8277f6cf9adb989ba4eb 100644 (file)
@@ -63,7 +63,7 @@ RCSID
 /* page hash table size - this is pretty intertwined with pHash */
 #define PHSIZE (PHPAGEMASK + PHFIDMASK + 1)
 /* the pHash macro */
-#define pHash(fid,page) ((((afs_int32)((fid)[0])) & PHFIDMASK) \
+#define pHash(fid,page) ((((afs_int32)((fid)->inode)) & PHFIDMASK) \
                         | (page & PHPAGEMASK))
 
 #ifdef dirty
@@ -88,7 +88,7 @@ static int nbuffers;
 static afs_int32 timecounter;
 
 /* Prototypes for static routines */
-static struct buffer *afs_newslot(afs_inode_t * afid, afs_int32 apage,
+static struct buffer *afs_newslot(struct fcache * afid, afs_int32 apage,
                                  register struct buffer *lp);
 
 static int dinit_flag = 0;
@@ -150,7 +150,7 @@ DInit(int abuffers)
 }
 
 void *
-DRead(register afs_inode_t * fid, register int page)
+DRead(register struct fcache * fid, register int page)
 {
     /* Read a page from the disk. */
     register struct buffer *tb, *tb2;
@@ -224,14 +224,13 @@ DRead(register afs_inode_t * fid, register int page)
     MObtainWriteLock(&tb->lock, 260);
     MReleaseWriteLock(&afs_bufferLock);
     tb->lockers++;
-    tfile = afs_CFileOpen(fid[0]);
-    if (page * AFS_BUFFER_PAGESIZE >= tfile->size) {
+    if (page * AFS_BUFFER_PAGESIZE >= fid->chunkBytes) {
        dirp_Zap(tb->fid);
        tb->lockers--;
        MReleaseWriteLock(&tb->lock);
-       afs_CFileClose(tfile);
        return NULL;
     }
+    tfile = afs_CFileOpen(fid->inode);
     code =
        afs_CFileRead(tfile, tb->page * AFS_BUFFER_PAGESIZE, tb->data,
                      AFS_BUFFER_PAGESIZE);
@@ -274,7 +273,7 @@ FixupBucket(register struct buffer *ap)
 
 /* lp is pointer to a fairly-old buffer */
 static struct buffer *
-afs_newslot(afs_inode_t * afid, afs_int32 apage, register struct buffer *lp)
+afs_newslot(struct fcache * afid, afs_int32 apage, register struct buffer *lp)
 {
     /* Find a usable buffer slot */
     register afs_int32 i;
@@ -341,7 +340,7 @@ afs_newslot(afs_inode_t * afid, afs_int32 apage, register struct buffer *lp)
     }
 
     if (lp->dirty) {
-       tfile = afs_CFileOpen(lp->fid[0]);
+       tfile = afs_CFileOpen(lp->fid->inode);
        afs_CFileWrite(tfile, lp->page * AFS_BUFFER_PAGESIZE, lp->data,
                       AFS_BUFFER_PAGESIZE);
        lp->dirty = 0;
@@ -433,7 +432,7 @@ DVOffset(register void *ap)
  * method of DRead...
  */
 void
-DZap(afs_inode_t * fid)
+DZap(struct fcache * fid)
 {
     register int i;
     /* Destroy all buffers pertaining to a particular fid. */
@@ -470,7 +469,7 @@ DFlush(void)
            tb->lockers++;
            MReleaseReadLock(&afs_bufferLock);
            if (tb->dirty) {
-               tfile = afs_CFileOpen(tb->fid[0]);
+               tfile = afs_CFileOpen(tb->fid->inode);
                afs_CFileWrite(tfile, tb->page * AFS_BUFFER_PAGESIZE,
                               tb->data, AFS_BUFFER_PAGESIZE);
                tb->dirty = 0;  /* Clear the dirty flag */
@@ -485,7 +484,7 @@ DFlush(void)
 }
 
 void *
-DNew(register afs_inode_t * fid, register int page)
+DNew(register struct fcache * fid, register int page)
 {
     /* Same as read, only do *not* even try to read the page, since it probably doesn't exist. */
     register struct buffer *tb;
index 923c92e950481b59c7734bb6cc1e965791437a1d..9471ba8e16d9529bfae7b4f17fc938047a905fab 100644 (file)
@@ -187,9 +187,9 @@ typedef struct timeval osi_timeval_t;
  * The following three routines provide the fid routines used by the buffer
  * and directory packages.
  */
-#define dirp_Zap(afid)    (*(afid) = -1)
-#define dirp_Eq(afid, bfid) (*(afid) == *(bfid))
-#define dirp_Cpy(dfid,sfid) (*(dfid) = *(sfid))
+#define dirp_Zap(afid)    ((afid) = 0)
+#define dirp_Eq(afid, bfid) ((afid) == (bfid))
+#define dirp_Cpy(dfid,sfid) ((dfid) = (sfid))
 
 
 /*
index 12b7d54ecd2155c85dbfdd75305fbaed3aa7b1de..7f191b47225d03ae975b9a0155aeaef87a25223c 100644 (file)
@@ -139,6 +139,43 @@ getpag(void)
  * activates tokens repeatedly) for that entire period.
  */
 
+static int afs_pag_sleepcnt = 0;
+
+static int 
+afs_pag_sleep(struct AFS_UCRED **acred) 
+{
+  int rv = 0;
+  if(!afs_suser(acred)) {
+    if(osi_Time() - pag_epoch < pagCounter) {
+      rv = 1;
+    }
+  }
+
+  return rv;
+}
+
+static int 
+afs_pag_wait(struct AFS_UCRED **acred)
+{
+  if(afs_pag_sleep(acred)) {
+    if(!afs_pag_sleepcnt) {
+      printf("%s() PAG throttling triggered, pid %d... sleeping.  sleepcnt %d\n",
+            __func__, getpid(), afs_pag_sleepcnt);
+    }
+    
+    afs_pag_sleepcnt++;
+    
+    do {
+      /* XXX spins on EINTR */
+      afs_osi_Wait(1000, (struct afs_osi_WaitHandle *)0, 0);
+    } while(afs_pag_sleep(acred));
+    
+    afs_pag_sleepcnt--;
+  }
+
+  return 0;
+}
+
 int
 #if    defined(AFS_SUN5_ENV)
 afs_setpag(struct AFS_UCRED **credpp)
@@ -148,6 +185,15 @@ afs_setpag(struct proc *p, void *args, int *retval)
 afs_setpag(void)
 #endif
 {
+
+#if     defined(AFS_SUN5_ENV)
+    struct AFS_UCRED **acred = *credpp;
+#elif  defined(AFS_OBSD_ENV)
+    struct AFS_UCRED **acred = p->p_ucred;
+#else
+    struct AFS_UCRED **acred = NULL;
+#endif
+
     int code = 0;
 
 #if defined(AFS_SGI53_ENV) && defined(MP)
@@ -156,18 +202,10 @@ afs_setpag(void)
 #endif /* defined(AFS_SGI53_ENV) && defined(MP) */
 
     AFS_STATCNT(afs_setpag);
-#if    defined(AFS_SUN5_ENV)
-    if (!afs_suser(*credpp))
-#elif  defined(AFS_OBSD_ENV)
-    if (!afs_osi_suser(p->p_ucred))
-#else
-    if (!afs_suser(NULL))
-#endif
-    {
-       while (osi_Time() - pag_epoch < pagCounter) {
-           afs_osi_Wait(1000, (struct afs_osi_WaitHandle *)0, 0);
-       }
-    }
+
+    afs_pag_wait(acred);
+
+
 #if    defined(AFS_SUN5_ENV)
     code = AddPag(genpag(), credpp);
 #elif  defined(AFS_OSF_ENV) || defined(AFS_XBSD_ENV)
@@ -213,13 +251,16 @@ afs_setpag(void)
 #endif
 
     afs_Trace1(afs_iclSetp, CM_TRACE_SETPAG, ICL_TYPE_INT32, code);
+
 #if defined(KERNEL_HAVE_UERROR)
     if (!getuerror())
        setuerror(code);
 #endif
+
 #if defined(AFS_SGI53_ENV) && defined(MP)
     AFS_GUNLOCK();
 #endif /* defined(AFS_SGI53_ENV) && defined(MP) */
+
     return (code);
 }
 
@@ -240,6 +281,15 @@ afs_setpag_val(struct proc *p, void *args, int *retval, int pagval)
 afs_setpag_val(int pagval)
 #endif
 {
+
+#if     defined(AFS_SUN5_ENV)
+    struct AFS_UCRED **acred = *credp;
+#elif  defined(AFS_OBSD_ENV)
+    struct AFS_UCRED **acred = p->p_ucred;
+#else
+    struct AFS_UCRED **acred = NULL;
+#endif
+
     int code = 0;
 
 #if defined(AFS_SGI53_ENV) && defined(MP)
@@ -248,16 +298,9 @@ afs_setpag_val(int pagval)
 #endif /* defined(AFS_SGI53_ENV) && defined(MP) */
 
     AFS_STATCNT(afs_setpag);
-#ifdef AFS_SUN5_ENV
-    if (!afs_suser(*credpp))
-#else
-    if (!afs_suser(NULL))
-#endif
-    {
-       while (osi_Time() - pag_epoch < pagCounter) {
-           afs_osi_Wait(1000, (struct afs_osi_WaitHandle *)0, 0);
-       }
-    }
+
+    afs_pag_wait(acred);
+
 #if    defined(AFS_SUN5_ENV)
     code = AddPag(pagval, credpp);
 #elif  defined(AFS_OSF_ENV) || defined(AFS_XBSD_ENV)
index c08265e4c9d4ee82b768440022a72cfdd375b004..a185eaf4e16aeb45da911a017f420540763e88c9 100644 (file)
@@ -31,12 +31,12 @@ extern void afs_FreeAllAxs(struct axscache **headp);
 
 /* afs_buffer.c */
 extern void DInit(int abuffers);
-extern void *DRead(register afs_inode_t * fid, register int page);
+extern void *DRead(register struct fcache * fid, register int page);
 extern void DRelease(register struct buffer *bp, int flag);
 extern int DVOffset(register void *ap);
-extern void DZap(afs_inode_t * fid);
+extern void DZap(struct fcache * fid);
 extern void DFlush(void);
-extern void *DNew(register afs_inode_t * fid, register int page);
+extern void *DNew(register struct fcache * fid, register int page);
 extern void shutdown_bufferpackage(void);
 
 /* afs_call.c */
index f768f1b77ec24e2c954a17d3e372a2d2b1b45e40..33797066b1f71740388826f2c11100e5c6d76703 100644 (file)
@@ -36,7 +36,7 @@ copyauth.o: copyauth.c ${INCLS} AFS_component_version_number.o
 setkey.o: setkey.c ${INCLS} AFS_component_version_number.o
 
 ktc.krb.o: ktc.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
-       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/ktc.c -o ktc.krb.o
+       ${CCOBJ} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/ktc.c -o ktc.krb.o
 
 libauth.a: $(OBJS) AFS_component_version_number.o
        -$(RM) -f libauth.a
index 423de31bdd97262c297592c19af22a0e04dcb700..49c08773afb66361ecd597d9ad3cb4cf3b043dbf 100644 (file)
@@ -626,7 +626,8 @@ compactDateString(date_long, string, size)
     if (*date_long == NEVERDATE) {
        sprintf(string, "NEVER");
     } else {
-       ltime = localtime(date_long);
+        time_t t = *date_long;
+       ltime = localtime(&t);
        /* prints date in U.S. format of mm/dd/yyyy */
        strftime(string, size, "%m/%d/%Y %H:%M", ltime);
     }
@@ -2902,13 +2903,14 @@ dumpInfo(dumpid, detailFlag)
        printf("----\n");
        printDumpEntry(&dumpEntry);
     } else {
+        time_t t = dumpEntry.created;
        if (dbDump)
            printf("Dump: id %u, created: %s\n", dumpEntry.id,
-                  ctime(&dumpEntry.created));
-       else
+                  ctime(&t));
+       else
            printf("Dump: id %u, level %d, volumes %d, created: %s\n",
                   dumpEntry.id, dumpEntry.level, dumpEntry.nVolumes,
-                  ctime(&dumpEntry.created));
+                  ctime(&t));
     }
 
     if (!detailFlag && (strlen(dumpEntry.tapes.tapeServer) > 0)
index fcf76f7b006976d4d18717f8a613388d6ccf0839..f99db4159b4f42047e58796f02a0d6cb32c0d1fe 100644 (file)
@@ -581,7 +581,8 @@ ListDumpSchedule(adump, alevel)
     case BC_ABS_EXPDATE:
        /* absolute expiration date. Never expires if date is 0 */
        if (adump->expDate) {
-           printf("expires at %.24s", cTIME(&adump->expDate));
+            time_t t = adump->expDate;
+           printf("expires at %.24s", cTIME(&t));
        }
        break;
 
index 1222911277310713ae8a81234ed60c0828b51584..513de7ea9d927e4b9a8cc2c00d41842059788e66 100644 (file)
@@ -195,7 +195,7 @@ bc_Restorer(aindex)
     afs_int32 partitionAll;    /* Likewise for partition */
     struct hostent *hostPtr;
     long haddr;
-    u_long did;
+    time_t did;
     int foundtape, c;
 
     extern statusP createStatusNode();
index 1ce9e4120be18df75fbb2107ae3621dbb19ed4f4..534ab48b46b1f125a4fa29efb8529b8eb521070b 100644 (file)
@@ -2287,6 +2287,7 @@ PrintTapeLabel(labelptr)
      struct butm_tapeLabel *labelptr;
 {
     char tapeName[BU_MAXTAPELEN + 32];
+    time_t t;
 
     printf("Tape label\n");
     printf("----------\n");
@@ -2294,9 +2295,12 @@ PrintTapeLabel(labelptr)
     printf("permanent tape name = %s\n", tapeName);
     TAPENAME(tapeName, labelptr->AFSName, labelptr->dumpid);
     printf("AFS tape name = %s\n", tapeName);
-    printf("creationTime = %s", ctime(&labelptr->creationTime));
-    if (labelptr->expirationDate)
-       printf("expirationDate = %s", cTIME(&labelptr->expirationDate));
+    t = labelptr->creationTime;
+    printf("creationTime = %s", ctime(&t));
+    if (labelptr->expirationDate) {
+        t = labelptr->expirationDate;
+       printf("expirationDate = %s", cTIME(&t));
+    }
     printf("cell = %s\n", labelptr->cell);
     printf("size = %u Kbytes\n", labelptr->size);
     printf("dump path = %s\n", labelptr->dumpPath);
index 1b66eb9c67b7ad9978bd606e7049c8c17a769cd8..11c53b35e02a65e3afff356e4b5fc9421cde69d9 100644 (file)
@@ -59,6 +59,7 @@ PrintDumpLabel(labelptr)
      struct butm_tapeLabel *labelptr;
 {
     char tapeName[BU_MAXTAPELEN + 32];
+    time_t t;
 
     printf("Dump label\n");
     printf("----------\n");
@@ -66,9 +67,12 @@ PrintDumpLabel(labelptr)
     printf("permanent tape name = %s\n", tapeName);
     TAPENAME(tapeName, labelptr->AFSName, labelptr->dumpid);
     printf("AFS tape name = %s\n", tapeName);
-    printf("creationTime = %s", ctime(&labelptr->creationTime));
-    if (labelptr->expirationDate)
-       printf("expirationDate = %s", cTIME(&labelptr->expirationDate));
+    t = labelptr->creationTime;
+    printf("creationTime = %s", ctime(&t));
+    if (labelptr->expirationDate) {
+        t = labelptr->expirationDate;
+       printf("expirationDate = %s", cTIME(&t));
+    }
     printf("cell = %s\n", labelptr->cell);
     printf("size = %u Kbytes\n", labelptr->size);
     printf("dump path = %s\n", labelptr->dumpPath);
@@ -87,6 +91,8 @@ static
 PrintVolumeHeader(volHeader)
      struct volumeHeader *volHeader;
 {
+    time_t t;
+
     printf("-- volume --\n");
     printf("volume name: %s\n", volHeader->volumeName);
     printf("volume ID %d\n", volHeader->volumeID);
@@ -97,7 +103,8 @@ PrintVolumeHeader(volHeader)
     printf("parentID %d\n", volHeader->parentID);
     printf("endTime %d\n", volHeader->endTime);
     /* printf("versionflags %d\n", volHeader->versionflags); */
-    printf("clonedate %s\n", ctime(&volHeader->cloneDate));
+    t = volHeader->cloneDate;
+    printf("clonedate %s\n", ctime(&t));
 }
 
 /* Ask
index 973e6f218ef127e39021fbbf909e104065b8d2aa..f8d1406ae0c308702c5c94f6c0d1131e040573a7 100644 (file)
@@ -324,8 +324,8 @@ PerformDumpTest(TestInfo * tip)
     }
     past = time(0) - label.creationTime;
     if ((past < 0) || (past > 5 * 60)) {
-       printf("label creation time is long ago: %s\n",
-              ctime(&label.creationTime));
+        time_t t = label.creationTime;
+       printf("label creation time is long ago: %s\n", ctime(&t));
        ERROR_EXIT(5);
     }
     if (strcmp(label.AFSName, tip->tapeName) != 0) {
diff --git a/src/config/param.amd64_linux26.h b/src/config/param.amd64_linux26.h
new file mode 100644 (file)
index 0000000..9a8444e
--- /dev/null
@@ -0,0 +1,147 @@
+#ifndef UKERNEL
+/* This section for kernel libafs compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously amd64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define AFS_LINUX20_ENV        1
+#define AFS_LINUX22_ENV        1
+#define AFS_LINUX24_ENV        1
+#define AFS_LINUX26_ENV        1
+#define AFS_AMD64_LINUX20_ENV   1
+#define AFS_AMD64_LINUX22_ENV   1
+#define AFS_AMD64_LINUX24_ENV   1
+#define AFS_AMD64_LINUX26_ENV   1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 183
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1    /* User space interface to file system */
+#define AFS_64BIT_ENV          1
+#define AFS_64BIT_CLIENT       1
+#define AFS_64BITPOINTER_ENV   1       /* pointers are 64 bits */
+
+#if defined(__KERNEL__) && !defined(KDUMP_KERNEL)
+#include <linux/threads.h>
+
+#include <linux/config.h>
+#ifdef CONFIG_SMP
+#ifndef AFS_SMP
+#define AFS_SMP 1
+#endif
+#endif
+/* Using "AFS_SMP" to map to however many #define's are required to get
+ * MP to compile for Linux
+ */
+#ifdef AFS_SMP
+#ifndef CONFIG_SMP
+#define CONFIG_SMP 1
+#endif
+#ifndef __SMP__
+#define __SMP__
+#endif
+#define AFS_GLOBAL_SUNLOCK
+#endif
+
+#endif /* __KERNEL__  && !DUMP_KERNEL */
+
+#include <afs/afs_sysnames.h>
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS       2     /* Set to Userdisabled, allow sysctl to override */
+
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1  /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#ifdef KERNEL
+#ifndef MIN
+#define MIN(A,B) ((A) < (B) ? (A) : (B))
+#endif
+#ifndef MAX
+#define MAX(A,B) ((A) > (B) ? (A) : (B))
+#endif
+#endif /* KERNEL */
+
+/* Machine / Operating system information */
+#define SYS_NAME       "amd64_linux26"
+#define SYS_NAME_ID    SYS_NAME_ID_amd64_linux26
+
+#define USE_UCONTEXT
+
+#endif /* AFS_PARAM_H */
+
+
+
+#else /* !defined(UKERNEL) */
+
+/* This section for user space compiles only */
+
+#ifndef AFS_PARAM_H
+#define AFS_PARAM_H
+
+/* In user space the AFS_LINUX20_ENV should be sufficient. In the kernel,
+ * it's a judgment call. If something is obviously amd64 specific, use that
+ * #define instead. Note that "20" refers to the linux 2.0 kernel. The "2"
+ * in the sysname is the current version of the client. This takes into
+ * account the perferred OS user space configuration as well as the kernel.
+ */
+
+#define UKERNEL                        1       /* user space kernel */
+#define AFS_ENV                        1
+#define AFS_USR_LINUX20_ENV    1
+#define AFS_USR_LINUX22_ENV    1
+#define AFS_USR_LINUX24_ENV    1
+#define AFS_USR_LINUX26_ENV    1
+#define AFS_NONFSTRANS 1
+
+#define AFS_MOUNT_AFS "afs"    /* The name of the filesystem type. */
+#define AFS_SYSCALL 183
+#define AFS_64BIT_IOPS_ENV  1
+#define AFS_NAMEI_ENV     1    /* User space interface to file system */
+#include <afs/afs_sysnames.h>
+
+#define AFS_USERSPACE_IP_ADDR 1
+#define RXK_LISTENER_ENV 1
+#define AFS_GCPAGS             0       /* if nonzero, garbage collect PAGs */
+
+
+/* Machine / Operating system information */
+#define SYS_NAME       "amd64_linux26"
+#define SYS_NAME_ID    SYS_NAME_ID_amd64_linux26
+#define AFSLITTLE_ENDIAN    1
+#define AFS_HAVE_FFS        1  /* Use system's ffs. */
+#define AFS_HAVE_STATVFS    0  /* System doesn't support statvfs */
+#define AFS_VM_RDWR_ENV            1   /* read/write implemented via VM */
+
+#define        afsio_iov       uio_iov
+#define        afsio_iovcnt    uio_iovcnt
+#define        afsio_offset    uio_offset
+#define        afsio_seg       uio_segflg
+#define        afsio_fmode     uio_fmode
+#define        afsio_resid     uio_resid
+#define        AFS_UIOSYS      1
+#define        AFS_UIOUSER     UIO_USERSPACE
+#define        AFS_CLBYTES     MCLBYTES
+#define        AFS_MINCHANGE   2
+#define        VATTR_NULL      usr_vattr_null
+
+#define AFS_DIRENT
+#ifndef CMSERVERPREF
+#define CMSERVERPREF
+#endif
+
+#define USE_UCONTEXT
+
+#endif /* AFS_PARAM_H */
+
+#endif /* !defined(UKERNEL) */
index 5583f03800392d42d5fde6cb68c020023fd59b7f..a2c8a52a4820631fbf0779d7278cdf49e3e82985 100644 (file)
@@ -61,7 +61,7 @@ RCSID
     des_cblock *iv;            * 8 bytes of ivec *
 */
 afs_int32
-des_cbc_encrypt(des_cblock * in, des_cblock * out, register afs_int32 length,
+des_cbc_encrypt(void * in, void * out, register afs_int32 length,
                des_key_schedule key, des_cblock * iv, int encrypt)
 {
     register afs_uint32 *input = (afs_uint32 *) in;
index d7871d22ae59488e036e25d2693f3fd995a7b988..dee7c20f17d4d7f93f30d5a7af170e5603a06866 100644 (file)
@@ -18,19 +18,19 @@ extern void test_set(FILE * stream, const char *src, int testbit,
 extern int des_debug;
 
 /* cbc_encrypt.c */
-extern afs_int32 des_cbc_encrypt(des_cblock * in, des_cblock * out,
+extern afs_int32 des_cbc_encrypt(void * in, void * out,
                                 register afs_int32 length,
                                 des_key_schedule key, des_cblock * iv,
                                 int encrypt);
 
 /* pcbc_encrypt.c */
-extern afs_int32 des_pcbc_encrypt(des_cblock * in, des_cblock * out,
+extern afs_int32 des_pcbc_encrypt(void * in, void * out,
                                  register afs_int32 length,
                                  des_key_schedule key, des_cblock * iv,
                                  int encrypt);
 
 /* des.c */
-extern afs_int32 des_ecb_encrypt(afs_uint32 * clear, afs_uint32 * cipher,
+extern afs_int32 des_ecb_encrypt(void * clear, void * cipher,
                                 register des_key_schedule schedule,
                                 int encrypt);
 
index 854d3b0afd239c6bac5463a386013bee39b65cc7..12a22a8b66232e8da3369fa35260d9aba0701da8 100644 (file)
@@ -74,7 +74,7 @@ RCSID
     des_cblock *iv;             * 8 bytes of ivec *
 */
 afs_int32
-des_pcbc_encrypt(des_cblock * in, des_cblock * out, register afs_int32 length,
+des_pcbc_encrypt(void * in, void * out, register afs_int32 length,
                 des_key_schedule key, des_cblock * iv, int encrypt)
 {
     register afs_uint32 *input = (afs_uint32 *) in;
index 921267042af5b1884923993771a8e7dc7ad9b90d..853eaedfa8a7f8ddb11a6d042cd9c12f9a61cc74 100644 (file)
@@ -185,10 +185,10 @@ kpwvalid: kpwvalid.o $(LIBS)
        ${CC} ${LDFLAGS} -o kpwvalid kpwvalid.o ${LIBS} ${XLIBS}
 
 user.krb.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
-       ${CC} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/user.c -o user.krb.o
+       ${CCOBJ} ${CFLAGS} -DAFS_KERBEROS_ENV -c ${srcdir}/user.c -o user.krb.o
 
 user.o: user.c ${INCLS} ${TOP_INCDIR}/afs/vice.h
-       ${CC} ${CFLAGS} -c ${srcdir}/user.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/user.c
 
 kdb: kdb.o ${INCLS} ${LIBS} libkauth.a
        ${CC} ${LDFLAGS} -o kdb kdb.o libkauth.a ${LIBS} ${XLIBS}
index dbd6b4ac8d72f4f70281f1fdfa00fdf2b7f3dfc7..04e57910d36d0f88e2601f0fa253213ffea2eed4 100644 (file)
@@ -48,6 +48,7 @@ KAUTHOBJS = \
        read_passwd.o
 
 UBIKOBJS = \
+       uinit.o \
        ubikclient.o \
        uerrors.o \
        ubik_int.cs.o \
@@ -160,6 +161,9 @@ read_passwd.o: ${KAUTH}/read_passwd.c
 ubikclient.o: ${UBIK}/ubikclient.c
        ${CCRULE}
 
+uinit.o: ${UBIK}/uinit.c
+       ${CCRULE}
+
 uerrors.o: ${UBIK}/uerrors.c
        ${CCRULE}
 
index 0e65c5eaf05192f827b6000ec287fc5c49a56b53..5b8669e7f4880b49d0d572919ccea8b894c309cb 100644 (file)
@@ -53,6 +53,7 @@ KAUTHOBJS = \
        $(OUT)\user_nt.obj
 
 UBIKOBJS = \
+       $(OUT)\uinit.obj \
        $(OUT)\ubikclient.obj \
        $(OUT)\uerrors.obj \
        $(OUT)\ubik_int.cs.obj \
index 435b106cf32a034fde4e3430d7f5d11a25ee866d..ff2f2639f56cc335969f3930eab255a63618a299 100644 (file)
@@ -202,11 +202,11 @@ md4.o: ${RXKAD}/md4.c
 md5.o: ${RXKAD}/md5.c
        ${CCRULE} ${RXKAD}/md5.c
 
-fcrypt.o: ${TOP_OBJDIR}/src/rxkad/fcrypt.c
-       ${CCRULE} ${TOP_OBJDIR}/src/rxkad/fcrypt.c
+fcrypt.o: ${TOP_OBJDIR}/src/rxkad/domestic/fcrypt.c
+       ${CCRULE} ${TOP_OBJDIR}/src/rxkad/domestic/fcrypt.c
 
-crypt_conn.o: ${TOP_OBJDIR}/src/rxkad/crypt_conn.c
-       ${CCRULE} ${TOP_OBJDIR}/src/rxkad/crypt_conn.c
+crypt_conn.o: ${TOP_OBJDIR}/src/rxkad/domestic/crypt_conn.c
+       ${CCRULE} ${TOP_OBJDIR}/src/rxkad/domestic/crypt_conn.c
 
 AFS_component_version_number.o: ${TOP_OBJDIR}/src/rx/AFS_component_version_number.c
        ${CCRULE} ${TOP_OBJDIR}/src/rx/AFS_component_version_number.c
index 37cfd4d87dfd6e8156390d2727a054f8ee6429b8..943267bb1d27ede1e6ca4e138a3cb27bf83092f2 100644 (file)
@@ -198,4 +198,5 @@ EXPORTS
        rx_enable_hot_thread                    @203 DATA
        xdr_int64                               @204
        xdr_uint64                              @205
-    rx_SetMaxMTU            @206
+       rx_SetMaxMTU                            @206
+       rx_GetConnection                        @207
diff --git a/src/libafsrpc/mapfile b/src/libafsrpc/mapfile
deleted file mode 100644 (file)
index ab29840..0000000
+++ /dev/null
@@ -1,117 +0,0 @@
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-# 
-# This software has been released under the terms of the IBM Public
-# License.  For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-{
-    global:
-       des_cbc_init;
-       des_check_key_parity;
-       des_cksum_init;
-       des_des_init;
-       des_fixup_key_parity;
-       des_init_random_number_generator;
-       des_is_weak_key;
-       des_key_sched;
-       des_random_key;
-       des_string_to_key;
-       ktohl;
-       life_to_time;
-       rx_DestroyConnection;
-       rx_EndCall;
-       rx_Finalize;
-       rx_GetCachedConnection;
-       rx_GetCall;
-       rx_GetIFInfo;
-       rx_GetSpecific;
-       rx_Init;
-       rx_KeyCreate;
-       rx_NewCall;
-       rx_NewConnection;
-       rx_NewService;
-       rx_PrintPeerStats;
-       rx_PrintStats;
-       rx_PrintTheseStats;
-       rx_ReadProc;
-       rx_ReleaseCachedConnection;
-       rx_ServerProc;
-       rx_SetSpecific;
-       rx_StartServer;
-       rx_WriteProc;
-       rxevent_Init;
-       rxevent_Post;
-       rxkad_GetServerInfo;
-       rxkad_NewClientSecurityObject;
-       rxkad_NewServerSecurityObject;
-       rxkad_client_init;
-       rxkad_crypt_init;
-       rxnull_NewClientSecurityObject;
-       rxnull_NewServerSecurityObject;
-       rxs_Release;
-       time_to_life;
-       tkt_CheckTimes;
-       tkt_DecodeTicket;
-       tkt_MakeTicket;
-       xdrrx_create;
-       hton_syserr_conv;
-       rxkad_stats;
-       com_err;
-       error_message;
-       rx_socket;
-       des_pcbc_init;
-       rxevent_debugFile;
-       rx_debugFile;
-       rx_connDeadTime;
-       rx_maxReceiveSize;
-       rx_UdpBufSize;
-       rx_extraQuota;
-       rx_extraPackets;
-       rx_tranquil;
-       rx_getAllAddr;
-       rx_nWaiting;
-       rx_stats;
-       rx_SetNoJumbo;
-       rx_SetConnDeadTime;
-       rx_FlushWrite;
-       rx_thread_id_key;
-       multi_Finalize;
-       multi_Select;
-       multi_Init;
-       multi_Finalize_Ignore;
-       add_to_error_table;
-       xdr_afsUUID;
-       rx_IncrementTimeAndCount;
-       rx_enable_stats;
-       rx_GetServerDebug;
-       rx_GetServerStats;
-       rx_GetServerVersion;
-       rx_GetServerConnections;
-       rx_stats_mutex;
-       rx_GetServerPeers;
-       rx_RetrieveProcessRPCStats;
-       rx_RetrievePeerRPCStats;
-       rx_FreeRPCStats;
-       rx_queryProcessRPCStats;
-       rx_queryPeerRPCStats;
-       rx_enableProcessRPCStats;
-       rx_enablePeerRPCStats;
-       rx_disableProcessRPCStats;
-       rx_disablePeerRPCStats;
-       RXSTATS_ExecuteRequest;
-       RXSTATS_RetrieveProcessRPCStats;
-       RXSTATS_RetrievePeerRPCStats;
-       RXSTATS_QueryProcessRPCStats;
-       RXSTATS_QueryPeerRPCStats;
-       RXSTATS_EnableProcessRPCStats;
-       RXSTATS_EnablePeerRPCStats;
-       RXSTATS_DisableProcessRPCStats;
-       RXSTATS_DisablePeerRPCStats;
-       RXSTATS_QueryRPCStatsVersion;
-       RXSTATS_ClearProcessRPCStats;
-       RXSTATS_ClearPeerRPCStats;
-
-    local:
-       *;
-};
index dce5786e9f503e234b8583616d2cb236c37ad9fd..e33a2d961a790ea7d63ca7b5c93a037fb365ebe5 100644 (file)
@@ -853,7 +853,7 @@ SetFields(register struct cmd_syndesc *as)
     idlist ids;
     namelist names;
     int i;
-    afs_int32 mask, flags, ngroups, nusers;
+    afs_int32 mask, flags=0, ngroups, nusers;
 
     if (GetNameOrId(as, &ids, &names))
        return PRBADARG;
index bbbc09b72bb3a377954d88f2a9549137bfdf882c..690d7c46e02f7d277a9d1e8c69b001665a8c095a 100644 (file)
@@ -86,6 +86,8 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
        /*
         * Different conf dir; force re-evaluation.
         */
+       if (tdir) 
+           afsconf_Close(tdir);
        tdir = (struct afsconf_dir *)0;
        pruclient = (struct ubik_client *)0;
     }
@@ -168,7 +170,7 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
        if (code)
            scIndex = 0;
        else {
-           if (ttoken.kvno >= 0 && ttoken.kvno <= 255)
+           if (ttoken.kvno >= 0 && ttoken.kvno <= 256)
                /* this is a kerberos ticket, set scIndex accordingly */
                scIndex = 2;
            else {
@@ -178,7 +180,7 @@ pr_Initialize(IN afs_int32 secLevel, IN char *confDir, IN char *cell)
                scIndex = 2;
            }
            sc[2] =
-               rxkad_NewClientSecurityObject(secLevel, &ttoken.sessionKey,
+               rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
                                              ttoken.kvno, ttoken.ticketLen,
                                              ttoken.ticket);
        }
index c4da3756a61417bb45af85c13f0c9b864c4b7bff..6778bbcf4a562aa21577df32b51257038b966b49 100644 (file)
@@ -211,6 +211,8 @@ returned with an error code of RX_CALL_DEAD ( transient error ) */
 #define rx_EnableHotThread()           (rx_enable_hot_thread = 1)
 #define rx_DisableHotThread()          (rx_enable_hot_thread = 0)
 
+#define rx_PutConnection(conn) rx_DestroyConnection(conn)
+
 /* A connection is an authenticated communication path, allowing 
    limited multiple asynchronous conversations. */
 #ifdef KDUMP_RX_LOCK
@@ -248,7 +250,7 @@ struct rx_connection {
     /* client-- to retransmit the challenge */
     struct rx_service *service;        /* used by servers only */
     u_short serviceId;         /* To stamp on requests (clients only) */
-    u_short refCount;          /* Reference count */
+    afs_uint32 refCount;               /* Reference count */
     u_char flags;              /* Defined below */
     u_char type;               /* Type of connection, defined below */
     u_char secondsUntilPing;   /* how often to ping for each active call */
@@ -363,7 +365,7 @@ struct rx_peer {
 
     /* For garbage collection */
     afs_uint32 idleWhen;       /* When the refcountwent to zero */
-    short refCount;            /* Reference count for this structure */
+    afs_uint32 refCount;               /* Reference count for this structure */
 
     /* Congestion control parameters */
     u_char burstSize;          /* Reinitialization size for the burst parameter */
@@ -817,7 +819,7 @@ struct rx_debugIn {
 #define RX_DEBUGI_BADTYPE     (-8)
 
 #define RX_DEBUGI_VERSION_MINIMUM ('L')        /* earliest real version */
-#define RX_DEBUGI_VERSION     ('Q')    /* Latest version */
+#define RX_DEBUGI_VERSION     ('R')    /* Latest version */
     /* first version w/ secStats */
 #define RX_DEBUGI_VERSION_W_SECSTATS ('L')
     /* version M is first supporting GETALLCONN and RXSTATS type */
@@ -829,6 +831,7 @@ struct rx_debugIn {
 #define RX_DEBUGI_VERSION_W_IDLETHREADS ('O')
 #define RX_DEBUGI_VERSION_W_NEWPACKETTYPES ('P')
 #define RX_DEBUGI_VERSION_W_GETPEER ('Q')
+#define RX_DEBUGI_VERSION_W_WAITED ('R')
 
 #define        RX_DEBUGI_GETSTATS      1       /* get basic rx stats */
 #define        RX_DEBUGI_GETCONN       2       /* get connection info */
@@ -846,7 +849,8 @@ struct rx_debugStats {
     char spare1;
     afs_int32 nWaiting;
     afs_int32 idleThreads;     /* Number of server threads that are idle */
-    afs_int32 spare2[8];
+    afs_int32 nWaited;
+    afs_int32 spare2[7];
 };
 
 struct rx_debugConn_vL {
@@ -971,6 +975,7 @@ extern int rx_callHoldType;
 #define RX_SERVER_DEBUG_OLD_CONN               0x20
 #define RX_SERVER_DEBUG_NEW_PACKETS            0x40
 #define RX_SERVER_DEBUG_ALL_PEER               0x80
+#define RX_SERVER_DEBUG_WAITED_CNT              0x100
 
 #define AFS_RX_STATS_CLEAR_ALL                 0xffffffff
 #define AFS_RX_STATS_CLEAR_INVOCATIONS         0x1
index 3d0847a1b8b5fa869a84268e69b49fc4292dffd9..87094699793c03110bbfb53afbcfa9f5e0804145 100644 (file)
@@ -118,9 +118,7 @@ rxi_getaddr(void)
 #define ADVANCE(x, n) (x += ROUNDUP((n)->sa_len))
 
 static void
-rt_xaddrs(cp, cplim, rtinfo)
-     caddr_t cp, cplim;
-     struct rt_addrinfo *rtinfo;
+rt_xaddrs(caddr_t cp, caddr_t cplim, struct rt_addrinfo *rtinfo)
 {
     struct sockaddr *sa;
     int i;
@@ -141,9 +139,7 @@ rt_xaddrs(cp, cplim, rtinfo)
 */
 #if defined(AFS_DARWIN_ENV) || defined(AFS_XBSD_ENV)
 int
-rx_getAllAddr(buffer, maxSize)
-     afs_int32 buffer[];
-     int maxSize;              /* sizeof of buffer in afs_int32 units */
+rx_getAllAddr(afs_int32 buffer[], int maxSize)
 {
     size_t needed;
     int mib[6];
@@ -221,11 +217,8 @@ rx_getAllAddr(buffer, maxSize)
 }
 
 int
-rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
-     afs_int32 addrBuffer[];   /* the network addrs in net byte order */
-     afs_int32 maskBuffer[];   /* the subnet masks */
-     afs_int32 mtuBuffer[];    /* the MTU sizes */
-     int maxSize;              /* sizeof of buffer in afs_int32 units */
+rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
+                     afs_int32 mtuBuffer[], int maxSize)
 {
     int s;
 
@@ -279,9 +272,6 @@ rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
        }
        if ((ifm->ifm_flags & IFF_UP) == 0)
            continue;           /* not up */
-       if (ifm->ifm_flags & IFF_LOOPBACK) {
-           continue;           /* skip aliased loopbacks as well. */
-       }
        while (addrcount > 0) {
            struct sockaddr_in *a;
 
@@ -322,13 +312,9 @@ rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
     free(buf);
     return count;
 }
-
-
 #else
-int
-rx_getAllAddr(buffer, maxSize)
-     afs_int32 buffer[];
-     int maxSize;              /* sizeof of buffer in afs_int32 units */
+static int
+rx_getAllAddr_internal(afs_int32 buffer[], int maxSize, int loopbacks)
 {
     int s;
     int i, len, count = 0;
@@ -381,7 +367,7 @@ rx_getAllAddr(buffer, maxSize)
            continue;           /* ignore this address */
        }
        if (a->sin_addr.s_addr != 0) {
-           if (ifr->ifr_flags & IFF_LOOPBACK) {
+           if (!loopbacks && (ifr->ifr_flags & IFF_LOOPBACK)) {
                continue;       /* skip aliased loopbacks as well. */
            }
            if (count >= maxSize)       /* no more space */
@@ -395,6 +381,12 @@ rx_getAllAddr(buffer, maxSize)
     return count;
 }
 
+int
+rx_getAllAddr(afs_int32 buffer[], int maxSize)
+{
+    return rx_getAllAddr_internal(buffer, maxSize, 0);
+}
+
 /* this function returns the total number of interface addresses
  * the buffer has to be passed in by the caller. It also returns
  * the interface mask. If AFS_USERSPACE_IP_ADDR is defined, it
@@ -402,11 +394,8 @@ rx_getAllAddr(buffer, maxSize)
  * by afsi_SetServerIPRank().
  */
 int
-rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
-     afs_int32 addrBuffer[];   /* the network addrs in net byte order */
-     afs_int32 maskBuffer[];   /* the subnet masks */
-     afs_int32 mtuBuffer[];    /* the MTU sizes */
-     int maxSize;              /* sizeof of buffer in afs_int32 units */
+rxi_getAllAddrMaskMtu(afs_int32 addrBuffer[], afs_int32 maskBuffer[],
+                     afs_int32 mtuBuffer[], int maxSize)
 {
     int s;
     int i, len, count = 0;
@@ -418,7 +407,7 @@ rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
 #endif
 
 #if !defined(AFS_USERSPACE_IP_ADDR)
-    count = rx_getAllAddr(addrBuffer, 1024);
+    count = rx_getAllAddr_internal(addrBuffer, 1024, 1);
     for (i = 0; i < count; i++) {
        maskBuffer[i] = htonl(0xffffffff);
        mtuBuffer[i] = htonl(1500);
@@ -458,9 +447,6 @@ rxi_getAllAddrMaskMtu(addrBuffer, maskBuffer, mtuBuffer, maxSize)
                perror("SIOCGIFFLAGS");
                continue;       /* ignore this address */
            }
-           if (ifr->ifr_flags & IFF_LOOPBACK) {
-               continue;       /* skip aliased loopbacks as well. */
-           }
 
            if (count >= maxSize) {     /* no more space */
                printf("Too many interfaces..ignoring 0x%x\n",
index a492d11297f8dff7704533b39adf0ae724eca07d..b47f4a8a10073d3630df9d5681caa382b2a08d5c 100644 (file)
@@ -151,6 +151,7 @@ EXT afs_kmutex_t rx_freePktQ_lock;
 EXT int rx_nFreePackets INIT(0);
 EXT int rxi_NeedMorePackets INIT(0);
 EXT int rx_nWaiting INIT(0);
+EXT int rx_nWaited INIT(0);
 EXT int rx_packetReclaims INIT(0);
 
 /* largest packet which we can safely receive, initialized to AFS 3.2 value
index f06ec425d8793eea1e333bcd37b93115fb435e4b..6d57e165ef07882ce3a54db9190d79b2892fc4ee 100644 (file)
@@ -26,6 +26,7 @@ extern void rx_SetConnDeadTime(register struct rx_connection *conn,
                               register int seconds);
 extern void rxi_CleanupConnection(struct rx_connection *conn);
 extern void rxi_DestroyConnection(register struct rx_connection *conn);
+extern void rx_GetConnection(register struct rx_connection *conn);
 extern void rx_DestroyConnection(register struct rx_connection *conn);
 extern struct rx_call *rx_NewCall(register struct rx_connection *conn);
 extern int rxi_HasActiveCalls(register struct rx_connection *aconn);
index 9402f118bf7d11fe25bc1d56fee063958422c0c9..f31548baabede23c34c67d2298767c23d0dbb8c0 100644 (file)
@@ -1301,7 +1301,7 @@ rxi_FlushWrite(register struct rx_call *call)
                return;
            }
            cp->length = 0;
-           cp->niovecs = 1;    /* just the header */
+           cp->niovecs = 2;    /* header + space for rxkad stuff */
            call->nFree = 0;
        }
 
index 40d1b6fe90039691e99808dfa08194c00b68ba60..c19ae6854ff12b1499871b6073c60403d1c9de25 100644 (file)
@@ -65,8 +65,6 @@ librxkad.a: ${OBJS} AFS_component_version_number.o
        $(AR) crv $@ ${OBJS} AFS_component_version_number.o
        $(RANLIB) $@
 
-crypt_conn.o: fcrypt.h private_data.h crypt_conn.c ${INCLS}
-
 rxkad_client.o: fcrypt.h private_data.h rxkad_client.c ${INCLS}
 
 rxkad_server.o: fcrypt.h private_data.h rxkad_server.c ${INCLS}
@@ -89,14 +87,18 @@ md4.o: md4.c ${INCLS}
  
 md5.o: md5.c ${INCLS}
 
-fcrypt.o: fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
-       ${CCOBJ} ${CFLAGS} -c fcrypt.c
+fcrypt.o: domestic/fcrypt.c fcrypt.h sboxes.h rxkad.h rxkad_prototypes.h
+       ${CCOBJ} ${CFLAGS} -c domestic/fcrypt.c
+
+crypt_conn.o: domestic/crypt_conn.c fcrypt.h private_data.h ${INCLS}
+       ${CCOBJ} ${CFLAGS} -c domestic/crypt_conn.c
+
+tcrypt.o: domestic/tcrypt.c AFS_component_version_number.o
+       ${CCOBJ} ${CFLAGS} -c domestic/fcrypt.c
 
 tcrypt: tcrypt.o librxkad.a 
        ${CC} -o tcrypt tcrypt.o librxkad.a
 
-tcrypt.o: tcrypt.c AFS_component_version_number.o
-
 fc_test: ${fc_test_OBJS} ${fc_test_LIBS}
        ${CC} ${CFLAGS} -o fc_test ${fc_test_OBJS} ${fc_test_LIBS} ${XLIBS}
 
@@ -109,7 +111,7 @@ fc_test.o: ${INCLS}
 clean: 
        $(RM) -f *.o *.a tcrypt core rxkad_errs.c rxkad.h \
                AFS_component_version_number.c \
-               crypt_conn.c fcrypt.c fcrypt.h sboxes.h \
+               fcrypt.h sboxes.h \
                fc_test
 
 test:
@@ -117,21 +119,12 @@ test:
 # These sources are kept in a separate directory so that we can use an
 # ACL to comply with source export restrictions.
 
-crypt_conn.c: domestic/crypt_conn.c
-       ${INSTALL} $? $@
-
-fcrypt.c: domestic/fcrypt.c
-       ${INSTALL} $? $@
-
 fcrypt.h: domestic/fcrypt.h
        ${INSTALL} $? $@
 
 sboxes.h: domestic/sboxes.h
        ${INSTALL} $? $@
 
-tcrypt.c: domestic/tcrypt.c
-       ${INSTALL} $? $@
-
 include ../config/Makefile.version
 ${DESTDIR}${libdir}/librxkad.a: librxkad.a
        ${INSTALL} $? $@
index db42c140eba81c2dff5b6b2bd7385a0ff8f1d50d..5007c85ee371cbbd17d95574cf06f164a65cb519 100644 (file)
@@ -24,6 +24,7 @@ INCLS=${TOP_INCDIR}/afs/gtxobjects.h \
 LIBS=${TOP_LIBDIR}/libgtx.a \
        ${TOP_LIBDIR}/libfsprobe.a \
        ${TOP_LIBDIR}/libvolser.a \
+        ${TOP_LIBDIR}/libubik.a \
        ${TOP_LIBDIR}/libkauth.a \
        ${TOP_LIBDIR}/libauth.a \
        ${TOP_LIBDIR}/librxkad.a \
@@ -31,7 +32,6 @@ LIBS=${TOP_LIBDIR}/libgtx.a \
        ${TOP_LIBDIR}/libcmd.a \
        ${TOP_LIBDIR}/vlib.a ${TOP_LIBDIR}/libacl.a \
         ${TOP_LIBDIR}/libvldb.a \
-        ${TOP_LIBDIR}/libubik.a \
        ${TOP_LIBDIR}/libafsint.a \
        ${TOP_LIBDIR}/libsys.a \
        ${TOP_LIBDIR}/librx.a \
index 4c01bf03afde3aacb935d8b7662da7fef6306d50..306423f266a250207e9aa04270782b2dabf2fc68 100644 (file)
@@ -53,6 +53,7 @@ KAUTHOBJS = \
        read_passwd.o
 
 UBIKOBJS = \
+       uinit.o \
        ubikclient.o \
        uerrors.o \
        ubik_int.cs.o \
@@ -175,6 +176,9 @@ read_passwd.o: ${KAUTH}/read_passwd.c
 ubikclient.o: ${UBIK}/ubikclient.c
        ${CCRULE}
 
+uinit.o: ${UBIK}/uinit.c
+       ${CCRULE}
+
 uerrors.o: ${UBIK}/uerrors.c
        ${CCRULE}
 
index 2c4b5504ec5e2f4286b7565fc355f76757eaa3eb..675f7a47f697ff958f1c7f740b0c027d2c1d3d2a 100644 (file)
@@ -209,10 +209,10 @@ md4.o: ${RXKAD}/md4.c
 md5.o: ${RXKAD}/md5.c
        ${CCRULE}
 
-fcrypt.o: ${RXKAD}/fcrypt.c
+fcrypt.o: ${RXKAD}/domestic/fcrypt.c
        ${CCRULE}
 
-crypt_conn.o: ${RXKAD}/crypt_conn.c
+crypt_conn.o: ${RXKAD}/domestic/crypt_conn.c
        ${CCRULE}
 
 AFS_component_version_number.o: ${RX}/AFS_component_version_number.c
diff --git a/src/shlibafsrpc/NTMakefile b/src/shlibafsrpc/NTMakefile
deleted file mode 100644 (file)
index 3fc15fa..0000000
+++ /dev/null
@@ -1,349 +0,0 @@
-# Copyright 2000, International Business Machines Corporation and others.
-# All Rights Reserved.
-# 
-# This software has been released under the terms of the IBM Public
-# License.  For details, see the LICENSE file in the top-level source
-# directory or online at http://www.openafs.org/dl/license10.html
-
-RELDIR=shlibafsrpc
-!include ..\config\NTMakefile.$(SYS_NAME)
-!include ..\config\NTMakefile.version
-
-RX = ..\rx
-RXSTAT = ..\rxstat
-RXKAD = ..\rxkad
-DES = ..\des
-UTIL = ..\util
-FSINT = ..\fsint
-COMERR = ..\comerr
-
-# Additional debugging flag for RX.
-AFSDEV_AUXCDEFINES = -DRXDEBUG -DAFS_PTHREAD_ENV
-
-LIBFILE = $(DESTDIR)\lib\afsrpc.dll
-
-# Object files by category.
-MULTIOBJS = $(OUT)\rx_multi.obj
-
-XDROBJS = $(OUT)\xdr.obj \
-    $(OUT)\xdr_array.obj \
-    $(OUT)\xdr_arrayn.obj \
-    $(OUT)\xdr_float.obj \
-    $(OUT)\xdr_mem.obj \
-       $(OUT)\xdr_rec.obj \
-    $(OUT)\xdr_refernce.obj \
-    $(OUT)\xdr_rx.obj \
-    $(OUT)\xdr_update.obj \
-       $(OUT)\xdr_afsuuid.obj \
-    $(OUT)\xdr_int64.obj
-
-RXOBJS = $(OUT)\rx_event.obj \
-    $(OUT)\rx_user.obj \
-    $(OUT)\rx_pthread.obj \
-    $(OUT)\rx.obj \
-       $(OUT)\rx_null.obj \
-    $(OUT)\rx_globals.obj \
-    $(OUT)\rx_getaddr.obj \
-    $(OUT)\rx_misc.obj 
-    $(OUT)\rx_packet.obj \
-       $(OUT)\rx_rdwr.obj \
-    $(OUT)\rx_trace.obj \
-    $(OUT)\rx_xmit_nt.obj \
-    $(OUT)\rx_conncache.obj 
-
-RXSTATOBJS = $(OUT)\rxstat.obj \
-    $(OUT)\rxstat.ss.obj \
-    $(OUT)\rxstat.xdr.obj \
-    $(OUT)\rxstat.cs.obj
-
-LIBRXKAD_OBJS = $(OUT)\rxkad_client.obj \
-    $(OUT)\rxkad_server.obj \
-    $(OUT)\rxkad_common.obj \
-    $(OUT)\ticket.obj \
-    $(OUT)\ticket5.obj \
-    $(OUT)\crc.obj \
-    $(OUT)\md4.obj \
-    $(OUT)\md5.obj \
-       $(OUT)\AFS_component_version_number.obj
-
-LIBRXKAD_REGOBJS = $(OUT)\fcrypt.obj \
-    $(OUT)\crypt_conn.obj
-
-DESOBJS = $(OUT)\des.obj \
-    $(OUT)\cbc_encrypt.obj \
-    $(OUT)\pcbc_encrypt.obj \
-    $(OUT)\cksum.obj \
-    $(OUT)\new_rnd_key.obj \
-       $(OUT)\key_sched.obj \
-    $(OUT)\debug_decl.obj \
-    $(OUT)\quad_cksum.obj \
-    $(OUT)\key_parity.obj \
-       $(OUT)\weak_key.obj \
-    $(OUT)\strng_to_key.obj \
-    $(OUT)\misc.obj \
-    $(OUT)\util.obj
-
-UTILOBJS = $(OUT)\casestrcpy.obj \
-    $(OUT)\winsock_nt.obj
-
-COMERROBJS = $(OUT)\error_msg.obj \    
-    $(OUT)\et_name.obj \
-    $(OUT)\com_err.obj
-
-FSINTOBJS = $(OUT)\afsint.cs.obj \
-    $(OUT)\afsint.xdr.obj \
-    $(OUT)\afscbint.cs.obj \
-    $(OUT)\afscbint.xdr.obj \
-       $(OUT)\afsaux.obj
-
-DLLOBJS = $(MULTIOBJS) $(RXOBJS) $(XDROBJS) $(RXSTATOBJS) $(LIBRXKAD_OBJS) \
-       $(DESOBJS) $(LIBRXKAD_REGOBJS) $(UTILOBJS) $(COMERROBJS) \
-       $(FSINTOBJS) afsrpc.res
-
-rx_multi.obj: $(RX)\rx_multi.c
-       $(C2OBJ) $(RX)\rx_multi.c
-
-xdr.obj: $(RX)\xdr.c
-       $(C2OBJ) $(RX)\xdr.c
-
-xdr_array.obj: $(RX)\xdr_array.c
-       $(C2OBJ) $(RX)\xdr_array.c
-
-xdr_arrayn.obj: $(RX)\xdr_arrayn.c
-       $(C2OBJ) $(RX)\xdr_arrayn.c
-
-xdr_float.obj: $(RX)\xdr_float.c
-       $(C2OBJ) $(RX)\xdr_float.c
-
-xdr_mem.obj: $(RX)\xdr_mem.c
-       $(C2OBJ) $(RX)\xdr_mem.c
-
-xdr_rec.obj: $(RX)\xdr_rec.c
-       $(C2OBJ) $(RX)\xdr_rec.c
-
-xdr_refernce.obj: $(RX)\xdr_refernce.c
-       $(C2OBJ) $(RX)\xdr_refernce.c
-
-xdr_rx.obj: $(RX)\xdr_rx.c
-       $(C2OBJ) $(RX)\xdr_rx.c
-
-xdr_update.obj: $(RX)\xdr_update.c
-       $(C2OBJ) $(RX)\xdr_update.c
-
-xdr_afsuuid.obj: $(RX)\xdr_afsuuid.c
-       $(C2OBJ) $(RX)\xdr_afsuuid.c
-
-xdr_int64.obj: $(RX)\xdr_int64.c
-       $(C2OBJ) $(RX)\xdr_int64.c
-
-rx_event.obj: $(RX)\rx_event.c
-       $(C2OBJ) $(RX)\rx_event.c
-
-rx_user.obj: $(RX)\rx_user.c
-       $(C2OBJ) $(RX)\rx_user.c
-
-rx_pthread.obj: $(RX)\rx_pthread.c
-       $(C2OBJ) $(RX)\rx_pthread.c
-
-rx.obj: $(RX)\rx.c
-       $(C2OBJ) $(RX)\rx.c
-
-rx_null.obj: $(RX)\rx_null.c
-       $(C2OBJ) $(RX)\rx_null.c
-
-rx_globals.obj: $(RX)\rx_globals.c
-       $(C2OBJ) $(RX)\rx_globals.c
-
-rx_getaddr.obj: $(RX)\rx_getaddr.c
-       $(C2OBJ) $(RX)\rx_getaddr.c
-
-rx_misc.obj: $(RX)\rx_misc.c
-       $(C2OBJ) $(RX)\rx_misc.c
-
-rx_packet.obj: $(RX)\rx_packet.c
-       $(C2OBJ) $(RX)\rx_packet.c
-
-rx_rdwr.obj: $(RX)\rx_rdwr.c
-       $(C2OBJ) $(RX)\rx_rdwr.c
-
-rx_trace.obj: $(RX)\rx_trace.c
-       $(C2OBJ) $(RX)\rx_trace.c
-
-rx_xmit_nt.obj: $(RX)\rx_xmit_nt.c
-       $(C2OBJ) $(RX)\rx_xmit_nt.c
-
-rx_conncache.obj: $(RX)\rx_conncache.c
-       $(C2OBJ) $(RX)\rx_conncache.c
-
-rxstat.cs.obj:$(RXSTAT)\rxstat.cs.c
-       $(C2OBJ) $(RXSTAT)\rxstat.cs.c
-
-rxstat.ss.obj:$(RXSTAT)\rxstat.ss.c
-       $(C2OBJ) $(RXSTAT)\rxstat.ss.c
-
-rxstat.xdr.obj:$(RXSTAT)\rxstat.xdr.c
-       $(C2OBJ) $(RXSTAT)\rxstat.xdr.c
-
-rxstat.obj:$(RXSTAT)\rxstat.c
-       $(C2OBJ) $(RXSTAT)\rxstat.c
-
-rxkad_client.obj:$(RXKAD)\rxkad_client.c
-       $(C2OBJ) $(RXKAD)\rxkad_client.c
-
-rxkad_server.obj:$(RXKAD)\rxkad_server.c
-       $(C2OBJ) $(RXKAD)\rxkad_server.c
-
-rxkad_common.obj:$(RXKAD)\rxkad_common.c
-       $(C2OBJ) $(RXKAD)\rxkad_common.c
-
-ticket.obj:$(RXKAD)\ticket.c
-       $(C2OBJ) $(RXKAD)\ticket.c
-
-fcrypt.obj:$(RXKAD)\fcrypt.c
-       $(C2OBJ) $(RXKAD)\fcrypt.c
-
-crypt_conn.obj:$(RXKAD)\crypt_conn.c
-       $(C2OBJ) $(RXKAD)\crypt_conn.c
-
-AFS_component_version_number.obj:$(RXKAD)\AFS_component_version_number.c
-       $(C2OBJ) $(RXKAD)\AFS_component_version_number.c
-
-fcrypt_x.obj:$(RXKAD)\fcrypt.c
-       $(C2OBJ) $(RXKAD)\fcrypt.c /Fofcrypt_x.obj
-
-crypt_conn_x.obj:$(RXKAD)\crypt_conn.c
-       $(C2OBJ) $(RXKAD)\crypt_conn.c /Focrypt_conn_x.obj
-
-des.obj:$(DES)\des.c
-       $(C2OBJ) $(DES)\des.c
-
-cbc_encrypt.obj:$(DES)\cbc_encrypt.c
-       $(C2OBJ) $(DES)\cbc_encrypt.c
-
-pcbc_encrypt.obj:$(DES)\pcbc_encrypt.c
-       $(C2OBJ) $(DES)\pcbc_encrypt.c
-
-cksum.obj:$(DES)\cksum.c
-       $(C2OBJ) $(DES)\cksum.c
-
-new_rnd_key.obj:$(DES)\new_rnd_key.c
-       $(C2OBJ) $(DES)\new_rnd_key.c
-
-key_sched.obj:$(DES)\key_sched.c
-       $(C2OBJ) $(DES)\key_sched.c
-
-debug_decl.obj:$(DES)\debug_decl.c
-       $(C2OBJ) $(DES)\debug_decl.c
-
-quad_cksum.obj:$(DES)\quad_cksum.c
-       $(C2OBJ) $(DES)\quad_cksum.c
-
-key_parity.obj:$(DES)\key_parity.c
-       $(C2OBJ) $(DES)\key_parity.c
-
-weak_key.obj:$(DES)\weak_key.c
-       $(C2OBJ) $(DES)\weak_key.c
-
-strng_to_key.obj:$(DES)\strng_to_key.c
-       $(C2OBJ) $(DES)\strng_to_key.c
-
-misc.obj:$(DES)\misc.c
-       $(C2OBJ) -DDONT_INCL_MAIN $(DES)\misc.c
-
-util.obj:$(DES)\util.c
-       $(C2OBJ) $(DES)\util.c
-
-des_x.obj:$(DES)\des.c
-       $(C2OBJ) $(DES)\des.c /Fodes_x.obj
-
-cbc_crypt_x.obj:$(DES)\cbc_encrypt.c
-       $(C2OBJ) $(DES)\cbc_encrypt.c /Focbc_crypt_x.obj
-
-pcbc_crypt_x.obj:$(DES)\pcbc_encrypt.c
-       $(C2OBJ) $(DES)\pcbc_encrypt.c /Fopcbc_crypt_x.obj
-
-cksum_x.obj:$(DES)\cksum.c
-       $(C2OBJ) $(DES)\cksum.c /Focksum_x.obj
-
-nrnd_key_x.obj:$(DES)\new_rnd_key.c
-       $(C2OBJ) $(DES)\new_rnd_key.c /Fonrnd_key_x.obj
-
-error_msg.obj:$(COMERR)\error_msg.c
-       $(C2OBJ) $(COMERR)\error_msg.c
-
-et_name.obj:$(COMERR)\et_name.c
-       $(C2OBJ) $(COMERR)\et_name.c
-
-com_err.obj:$(COMERR)\com_err.c
-       $(C2OBJ) $(COMERR)\com_err.c
-
-casestrcpy.obj:$(UTIL)\casestrcpy.c
-       $(C2OBJ) $(UTIL)\casestrcpy.c
-
-winsock_nt.obj:$(UTIL)\winsock_nt.c
-       $(C2OBJ) $(UTIL)\winsock_nt.c
-
-afsint.cs.obj:$(FSINT)\afsint.cs.c
-       $(C2OBJ) $(FSINT)\afsint.cs.c
-
-afsint.xdr.obj:$(FSINT)\afsint.xdr.c
-       $(C2OBJ) $(FSINT)\afsint.xdr.c
-
-afscbint.cs.obj:$(FSINT)\afscbint.cs.c
-       $(C2OBJ) $(FSINT)\afscbint.cs.c
-
-afscbint.xdr.obj:$(FSINT)\afscbint.xdr.c
-       $(C2OBJ) $(FSINT)\afscbint.xdr.c
-
-afsaux.obj:$(FSINT)\afsaux.c
-       $(C2OBJ) $(FSINT)\afsaux.c
-
-NTMAKE = nmake /nologo /f ntmakefile
-
-
-DLLLIBS =\
-!IF (("$(SYS_NAME)"=="i386_win95" ) || ("$(SYS_NAME)"=="I386_WIN95" ))
-       $(DESTDIR)\lib\win95\afspthread.lib \
-!ELSE
-       $(DESTDIR)\lib\afspthread.lib \
-!ENDIF
-       $(DESTDIR)\lib\afs\afsutil.lib \
-       $(DESTDIR)\lib\afs\afsreg.lib
-
-$(DESTDIR)\lib\afsrpc.dll: $(DLLOBJS) $(DLLLIBS)
-       $(DLLCONLINK) /DEF:afsrpc.def
-       $(DLLPREP)
-
-# Definitions for generating versioninfo resources
-afsrpc.res: afsrpc.rc AFS_component_version_number.h
-       $(RC) $*.rc
-
-
-install:
-!       IF (EXIST(..\..\src\des\NTMakefile))
-               $(NTMAKE) $(LIBFILE)
-!      else
-               $(NTMAKE) libstub
-!      endif
-
-install9x: install
-
-!IF (EXIST(..\..\src\des\NTMakefile))
-!ELSE IF (EXIST(..\..\DESLIB))
-DESPAR = ..\..\DESLIB\dest
-!ELSE IF (EXIST(..\..\..\DESLIB))
-DESPAR = ..\..\..\DESLIB\dest
-!ELSE
-!ERROR Must create DESLIB link in the same directory as PARENT link.
-!ENDIF
-
-libstub:
-       $(COPY) $(DESPAR)\lib\afsrpc.dll \
-               $(DESTDIR)\lib\afsrpc.dll
-       $(COPY) $(DESPAR)\lib\afsrpc.lib \
-               $(DESTDIR)\lib\afsrpc.lib
-       $(COPY) $(DESPAR)\lib\afsrpc.exp \
-               $(DESTDIR)\lib\afsrpc.exp
-
-clean::
-       $(DEL) $(DESTDIR)\lib\afsrpc.dll $(DESTDIR)\lib\afsrpc.lib $(DESTDIR)\lib\afsrpc.exp
\ No newline at end of file
diff --git a/src/shlibafsrpc/afsrpc.def b/src/shlibafsrpc/afsrpc.def
deleted file mode 100644 (file)
index 95ec3c9..0000000
+++ /dev/null
@@ -1,200 +0,0 @@
-EXPORTS
-       des_check_key_parity                    @2
-       des_fixup_key_parity                    @5
-       des_init_random_number_generator        @6
-       des_is_weak_key                         @7
-       des_key_sched                           @8
-       des_random_key                          @9
-       des_string_to_key                       @10
-       ktohl                                   @11
-       life_to_time                            @12
-       rx_DestroyConnection                    @13
-       rx_EndCall                              @14
-       rx_Finalize                             @15
-       rx_GetCachedConnection                  @16
-       rx_GetCall                              @17
-       rx_GetIFInfo                            @18
-       rx_Init                                 @19
-       rx_NewCall                              @20
-       rx_NewConnection                        @21
-       rx_NewService                           @22
-       rx_PrintPeerStats                       @23
-       rx_PrintStats                           @24
-       rx_PrintTheseStats                      @25
-       rx_ReadProc                             @26
-       rx_ReleaseCachedConnection              @27
-       rx_ServerProc                           @28
-       rx_StartServer                          @29
-       rx_WriteProc                            @30
-       rxevent_Init                            @31
-       rxevent_Post                            @32
-       rxkad_GetServerInfo                     @33
-       rxkad_NewClientSecurityObject           @34
-       rxkad_NewServerSecurityObject           @35
-       rxnull_NewClientSecurityObject          @38
-       rxnull_NewServerSecurityObject          @39
-       rxs_Release                             @40
-       time_to_life                            @41
-       tkt_CheckTimes                          @42
-       tkt_DecodeTicket                        @43
-       tkt_MakeTicket                          @44
-       xdr_array                               @45
-       xdr_bool                                @46
-       xdr_bytes                               @47
-       xdr_char                                @48
-       xdr_double                              @49
-       xdr_enum                                @50
-       xdr_float                               @51
-       xdr_int                                 @52
-       xdr_long                                @53
-       xdr_opaque                              @54
-       xdr_pointer                             @55
-       xdr_reference                           @56
-       xdr_short                               @57
-       xdr_string                              @58
-       xdr_u_char                              @59
-       xdr_u_int                               @60
-       xdr_u_long                              @61
-       xdr_u_short                             @62
-       xdr_union                               @63
-       xdr_vector                              @64
-       xdr_void                                @65
-       xdr_wrapstring                          @66
-       xdrmem_create                           @67
-       xdrrec_create                           @68
-       xdrrec_endofrecord                      @69
-       xdrrec_eof                              @70
-       xdrrec_skiprecord                       @71
-       xdrrx_create                            @72
-       hton_syserr_conv                        @73
-       rxkad_stats                             @74 DATA
-       com_err                                 @75
-       error_message                           @76
-       rx_socket                               @77 DATA
-       AssertionFailed                         @79
-       afs_winsockInit                         @80
-       rxevent_debugFile                       @81 DATA
-       rx_debugFile                            @82 DATA
-       rx_connDeadTime                         @83 DATA
-       rx_maxReceiveSize                       @84 DATA
-       rx_UdpBufSize                           @85 DATA
-       rx_extraQuota                           @86 DATA
-       rx_extraPackets                         @87 DATA
-       rx_tranquil                             @88 DATA
-       rx_getAllAddr                           @89
-       rx_nWaiting                             @90 DATA
-       rx_stats                                @91 DATA
-       rx_SetNoJumbo                           @92
-       rx_SetConnDeadTime                      @93
-       rx_FlushWrite                           @94
-       rx_thread_id_key                        @95 DATA
-       multi_Finalize                          @96
-       multi_Select                            @97
-       multi_Init                              @98
-       multi_Finalize_Ignore                   @99
-       add_to_error_table                      @100
-       xdr_afsUUID                             @101
-       rx_GetSpecific                          @102
-       rx_SetSpecific                          @103
-       rx_KeyCreate                            @104
-       rx_BusyError                            @105 DATA
-       rx_BusyThreshold                        @106 DATA
-       rx_IncrementTimeAndCount                @107
-       rx_enable_stats                         @108 DATA
-       rx_GetServerDebug                       @109
-       rx_GetServerStats                       @110
-       rx_GetServerVersion                     @111
-       rx_GetServerConnections                 @112
-       rx_stats_mutex                          @113 DATA
-       rx_GetServerPeers                       @114
-       rx_RetrieveProcessRPCStats              @115
-       rx_RetrievePeerRPCStats                 @116
-       rx_FreeRPCStats                         @117
-       rx_queryProcessRPCStats                 @118
-       rx_queryPeerRPCStats                    @119
-       rx_enableProcessRPCStats                @120
-       rx_enablePeerRPCStats                   @121
-       rx_disableProcessRPCStats               @122
-       rx_disablePeerRPCStats                  @123
-       RXSTATS_ExecuteRequest                  @124
-       RXSTATS_RetrieveProcessRPCStats         @125
-       RXSTATS_RetrievePeerRPCStats            @126
-       RXSTATS_QueryProcessRPCStats            @127
-       RXSTATS_QueryPeerRPCStats               @128
-       RXSTATS_EnableProcessRPCStats           @129
-       RXSTATS_EnablePeerRPCStats              @130
-       RXSTATS_DisableProcessRPCStats          @131
-       RXSTATS_DisablePeerRPCStats             @132
-       RXSTATS_QueryRPCStatsVersion            @133
-       RXSTATS_ClearProcessRPCStats            @134
-       RXSTATS_ClearPeerRPCStats               @135
-
-
-       rxi_connAbortThreshhold                 @138 DATA
-       rxi_connAbortDelay                      @139 DATA
-       rxi_callAbortThreshhold                 @140 DATA
-       rxi_callAbortDelay                      @141 DATA
-       RXSTATS_function_names                  @142 DATA
-       RXAFSCB_function_names                  @143 DATA
-       RXAFSCB_CallBack                        @144
-       StartRXAFSCB_CallBack                   @145
-       EndRXAFSCB_CallBack                     @146
-       RXAFSCB_InitCallBackState               @147
-       RXAFSCB_Probe                           @148
-       StartRXAFSCB_Probe                      @149
-       EndRXAFSCB_Probe                        @150
-       RXAFSCB_GetLock                         @151
-       RXAFSCB_GetCE                           @152
-       RXAFSCB_XStatsVersion                   @153
-       RXAFSCB_GetXStats                       @154
-       RXAFSCB_InitCallBackState2              @155
-       RXAFSCB_WhoAreYou                       @156
-       RXAFSCB_InitCallBackState3              @157
-       RXAFSCB_ProbeUuid                       @158
-       StartRXAFSCB_ProbeUuid                  @159
-       EndRXAFSCB_ProbeUuid                    @160
-       RXAFSCB_GetServerPrefs                  @161
-       RXAFSCB_GetCellServDB                   @162
-       RXAFSCB_GetLocalCell                    @163
-       RXAFSCB_GetCacheConfig                  @164
-       StartRXAFS_FetchData                    @165
-       EndRXAFS_FetchData                      @166
-       RXAFS_FetchACL                          @167
-       RXAFS_FetchStatus                       @168
-       StartRXAFS_StoreData                    @169
-       EndRXAFS_StoreData                      @170
-       RXAFS_StoreACL                          @171
-       RXAFS_StoreStatus                       @172
-       RXAFS_RemoveFile                        @173
-       RXAFS_CreateFile                        @174
-       RXAFS_Rename                            @175
-       RXAFS_Symlink                           @176
-       RXAFS_Link                              @177
-       RXAFS_MakeDir                           @178
-       RXAFS_RemoveDir                         @179
-       RXAFS_OldSetLock                        @180
-       RXAFS_OldExtendLock                     @181
-       RXAFS_OldReleaseLock                    @182
-       RXAFS_GetStatistics                     @183
-       RXAFS_GiveUpCallBacks                   @184
-       RXAFS_GetVolumeInfo                     @185
-       RXAFS_GetVolumeStatus                   @186
-       RXAFS_SetVolumeStatus                   @187
-       RXAFS_GetRootVolume                     @188
-       RXAFS_CheckToken                        @189
-       RXAFS_GetTime                           @190
-       RXAFS_NGetVolumeInfo                    @191
-       RXAFS_BulkStatus                        @192
-       RXAFS_SetLock                           @193
-       RXAFS_ExtendLock                        @194
-       RXAFS_ReleaseLock                       @195
-       RXAFS_XStatsVersion                     @196
-       RXAFS_GetXStats                         @197
-       RXAFS_Lookup                            @198
-       RXAFS_FlushCPS                          @199
-       RXAFS_DFSSymlink                        @200
-       rx_SetRxStatUserOk                      @201
-       rx_RxStatUserOk                         @202
-       rx_enable_hot_thread                    @203 DATA
-       xdr_int64                               @204
-       xdr_uint64                              @205
diff --git a/src/shlibafsrpc/afsrpc.rc b/src/shlibafsrpc/afsrpc.rc
deleted file mode 100644 (file)
index 218fd55..0000000
+++ /dev/null
@@ -1,18 +0,0 @@
-/*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- * 
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
- */
-
-/* Define VERSIONINFO resource */
-
-#define  AFS_VERINFO_FILE_DESCRIPTION "AFS Rx RPC DLL"
-#define AFS_VERINFO_DLL
-#define  AFS_VERINFO_NAME "afsrpc"
-#define  AFS_VERINFO_FILENAME "afsrpc.dll"
-
-#include "AFS_component_version_number.h"
-#include "..\config\NTVersioninfo.rc"
index 8f2ee4113134715e29d33010207656d9ea3d15a3..018173863f2f78990a41366a3cbe06c7ddde58fc 100644 (file)
@@ -10,7 +10,7 @@ include @TOP_OBJDIR@/src/config/Makefile.config
 
 LIBOBJS=disk.o  remote.o beacon.o recovery.o ubik.o  vote.o lock.o phys.o \
        ubik_int.cs.o ubik_int.ss.o ubik_int.xdr.o ubikcmd.o \
-       ubikclient.o uerrors.o
+       ubikclient.o uerrors.o uinit.o
 
 INCLS=${TOP_INCDIR}/lwp.h ${TOP_INCDIR}/lock.h \
        ${TOP_INCDIR}/rx/rx.h ${TOP_INCDIR}/rx/xdr.h \
@@ -99,6 +99,7 @@ libubik.a: ${LIBOBJS} AFS_component_version_number.o
        $(RANLIB) $@
 
 disk.o: disk.c ${INCLS}
+uinit.o: uinit.c ${INCLS}
 remote.o: remote.c ${INCLS}
 beacon.o: beacon.c ${INCLS}
 lock.o: lock.c ${INCLS}
index f3cfd550a40e221d388266674d5b81363cb0ee8f..b819484505c6974777c3f5d7957f331fed2f35cb 100644 (file)
@@ -31,6 +31,7 @@ LIBOBJS =\
        $(OUT)\beacon.obj \
        $(OUT)\recovery.obj \
        $(OUT)\ubik.obj \
+       $(OUT)\uinit.obj \
        $(OUT)\vote.obj \
        $(OUT)\lock.obj \
        $(OUT)\phys.obj \
index 2499ff7b6e308fecbb17340848c41aca6efb583e..b72ad85cfa238c03a2a9f5d0346b56d05e57b4d6 100644 (file)
@@ -97,7 +97,7 @@ CommandProc(struct cmd_syndesc *as, char *arock)
     register afs_int32 i, j, code;
     short port;
     int int32p;
-    afs_int32 now, diff, newtime;
+    time_t now, diff, newtime;
     struct hostent *th;
     struct rx_connection *tconn;
     struct rx_securityClass *sc;
diff --git a/src/ubik/uinit.c b/src/ubik/uinit.c
new file mode 100644 (file)
index 0000000..32c6bf1
--- /dev/null
@@ -0,0 +1,206 @@
+/*
+ * Copyright 2000, International Business Machines Corporation and others.
+ * All Rights Reserved.
+ * 
+ * This software has been released under the terms of the IBM Public
+ * License.  For details, see the LICENSE file in the top-level source
+ * directory or online at http://www.openafs.org/dl/license10.html
+ */
+
+#include <afsconfig.h>
+#include <afs/param.h>
+
+RCSID
+    ("$Header$");
+
+#include <afs/stds.h>
+#ifdef AFS_NT40_ENV
+#include <fcntl.h>
+#include <winsock2.h>
+#else
+#include <sys/types.h>
+#include <sys/file.h>
+#include <netdb.h>
+#include <netinet/in.h>
+#endif /* AFS_NT40_ENV */
+#include <sys/stat.h>
+#ifdef AFS_AIX_ENV
+#include <sys/statfs.h>
+#endif
+
+#ifdef HAVE_STRING_H
+#include <string.h>
+#else
+#ifdef HAVE_STRINGS_H
+#include <strings.h>
+#endif
+#endif
+
+#include <afs/dirpath.h>
+#include <errno.h>
+#include <lock.h>
+#include <rx/xdr.h>
+#include <rx/rx.h>
+#include <rx/rx_globals.h>
+#include <afs/auth.h>
+#include <afs/cellconfig.h>
+#include <afs/keys.h>
+#include <ubik.h>
+#include <afs/afsint.h>
+#include <afs/cmd.h>
+#include <rx/rxkad.h>
+
+/*
+  Get the appropriate type of ubik client structure out from the system.
+*/
+afs_int32
+ugen_ClientInit(int noAuthFlag, char *confDir, char *cellName, afs_int32 sauth,
+              struct ubik_client **uclientp, int (*secproc) (),
+              char *funcName, afs_int32 gen_rxkad_level, 
+              afs_int32 maxservers, afs_int32 serviceid, afs_int32 deadtime,
+              afs_uint32 server, afs_uint32 port, afs_int32 usrvid)
+{
+    afs_int32 code, scIndex, i;
+    struct afsconf_cell info;
+    struct afsconf_dir *tdir;
+    struct ktc_principal sname;
+    struct ktc_token ttoken;
+    struct rx_securityClass *sc;
+    /* This must change if VLDB_MAXSERVERS becomes larger than MAXSERVERS */
+    static struct rx_connection *serverconns[MAXSERVERS];
+    char cellstr[64];
+
+    code = rx_Init(0);
+    if (code) {
+       fprintf(stderr, "%s: could not initialize rx.\n", funcName);
+       return code;
+    }
+    rx_SetRxDeadTime(deadtime);
+
+    if (sauth) {               /* -localauth */
+       tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
+       if (!tdir) {
+           fprintf(stderr,
+                   "%s: Could not process files in configuration directory (%s).\n",
+                   funcName, AFSDIR_SERVER_ETC_DIRPATH);
+           return -1;
+       }
+       code = afsconf_ClientAuth(tdir, &sc, &scIndex); /* sets sc,scIndex */
+       if (code) {
+           fprintf(stderr,
+                   "%s: Could not get security object for -localAuth\n",
+                   funcName);
+           return -1;
+       }
+       code =
+           afsconf_GetCellInfo(tdir, tdir->cellName, serviceid,
+                               &info);
+       if (code) {
+           fprintf(stderr,
+                   "%s: can't find cell %s's hosts in %s/%s\n",
+                   funcName, cellName, AFSDIR_SERVER_ETC_DIRPATH,
+                   AFSDIR_CELLSERVDB_FILE);
+           exit(1);
+       }
+    } else {                   /* not -localauth */
+       tdir = afsconf_Open(confDir);
+       if (!tdir) {
+           fprintf(stderr,
+                   "%s: Could not process files in configuration directory (%s).\n",
+                   funcName, confDir);
+           return -1;
+       }
+
+       if (!cellName) {
+           code = afsconf_GetLocalCell(tdir, cellstr, sizeof(cellstr));
+           if (code) {
+               fprintf(stderr,
+                       "%s: can't get local cellname, check %s/%s\n",
+                       funcName, confDir, AFSDIR_THISCELL_FILE);
+               exit(1);
+           }
+           cellName = cellstr;
+       }
+
+       code =
+           afsconf_GetCellInfo(tdir, cellName, serviceid, &info);
+       if (code) {
+           fprintf(stderr,
+                   "%s: can't find cell %s's hosts in %s/%s\n",
+                   funcName, cellName, confDir, AFSDIR_CELLSERVDB_FILE);
+           exit(1);
+       }
+       if (noAuthFlag)         /* -noauth */
+           scIndex = 0;
+       else {                  /* not -noauth */
+           strcpy(sname.cell, info.name);
+           sname.instance[0] = 0;
+           strcpy(sname.name, "afs");
+           code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
+           if (code) {         /* did not get ticket */
+               fprintf(stderr,
+                       "%s: Could not get afs tokens, running unauthenticated.\n",
+                       funcName);
+               scIndex = 0;
+           } else {            /* got a ticket */
+               scIndex = 2;
+               if ((ttoken.kvno < 0) || (ttoken.kvno > 256)) {
+                   fprintf(stderr,
+                           "%s: funny kvno (%d) in ticket, proceeding\n",
+                           funcName, ttoken.kvno);
+               }
+           }
+       }
+
+       switch (scIndex) {
+       case 0:
+           sc = rxnull_NewClientSecurityObject();
+           break;
+       case 2:
+           sc = rxkad_NewClientSecurityObject(gen_rxkad_level,
+                                              &ttoken.sessionKey,
+                                              ttoken.kvno, ttoken.ticketLen,
+                                              ttoken.ticket);
+           break;
+       default:
+           fprintf(stderr, "%s: unsupported security index %d\n",
+                   funcName, scIndex);
+           exit(1);
+           break;
+       }
+    }
+
+    afsconf_Close(tdir);
+
+    if (secproc)       /* tell UV module about default authentication */
+       (*secproc) (sc, scIndex);
+    if (server) {
+       serverconns[0] = rx_NewConnection(server, port,
+                                         usrvid, sc, scIndex);
+    } else {
+       if (info.numServers > maxservers) {
+           fprintf(stderr,
+                   "%s: info.numServers=%d (> maxservers=%d)\n",
+                   funcName, info.numServers, maxservers);
+           exit(1);
+       }
+       for (i = 0; i < info.numServers; i++) {
+           serverconns[i] =
+               rx_NewConnection(info.hostAddr[i].sin_addr.s_addr,
+                                info.hostAddr[i].sin_port, usrvid,
+                                sc, scIndex);
+       }
+    }
+    /* Are we just setting up connections, or is this really ubik stuff? */
+    if (uclientp) {
+       *uclientp = 0;
+       code = ubik_ClientInit(serverconns, uclientp);
+       if (code) {
+           fprintf(stderr, "%s: ubik client init failed.\n", funcName);
+           return code;
+       }
+    }
+    return 0;
+}
+
+
index 924bae2c1ccfa50ad183c4f4e4f74915ab32ecf9..4ce6b9004bae1f3d5e2a9d7a37989f9477e61f26 100644 (file)
@@ -62,10 +62,10 @@ util.a: ${objects} AFS_component_version_number.o
        $(RANLIB) util.a
 
 assert.o: ${srcdir}/assert.c ${includes}
-       ${CC} ${CFLAGS} -c ${srcdir}/assert.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/assert.c
 
 casestrcpy.o: ${srcdir}/casestrcpy.c ${includes}
-       ${CC} ${CFLAGS} -c ${srcdir}/casestrcpy.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/casestrcpy.c
 
 hputil.o: ${srcdir}/hputil.c ${includes}
        ${CC} ${CFLAGS} -c ${srcdir}/hputil.c
@@ -110,10 +110,10 @@ serverLog.o: ${srcdir}/serverLog.c ${includes}
        ${CC} ${CFLAGS} -c ${srcdir}/serverLog.c
 
 dirpath.o: ${srcdir}/dirpath.c ${includes}
-       ${CC} ${CFLAGS} -c ${srcdir}/dirpath.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/dirpath.c
 
 fileutil.o: ${srcdir}/fileutil.c ${includes}
-       ${CC} ${CFLAGS} -c ${srcdir}/fileutil.c
+       ${CCOBJ} ${CFLAGS} -c ${srcdir}/fileutil.c
 
 netutils.o: ${srcdir}/netutils.c ${includes}
        ${CC} ${CFLAGS} -c ${srcdir}/netutils.c
index eba0260b943857f41485ebb7b3709ac9c3a0335d..f113b4f0181fcef21439f77917c50c43e3690443 100644 (file)
@@ -165,7 +165,8 @@ ktime_DateOf(afs_int32 atime)
 {
     static char tbuffer[30];
     register char *tp;
-    tp = ctime((time_t *) & atime);
+    time_t t = atime;
+    tp = ctime(&t);
     if (tp) {
        strcpy(tbuffer, tp);
        tbuffer[24] = 0;        /* get rid of new line */
index 316f84e71132f742751bd0de4c2bc1863da86755..50c692614209026037805ad2e545b2df80c5e55e 100644 (file)
@@ -53,6 +53,10 @@ RCSID
 #define MAX_NETFILE_LINE       2048    /* length of a line in the netrestrict file */
 #define MAXIPADDRS             1024    /* from afsd.c */
 
+#ifndef INADDR_LOOPBACK
+#define INADDR_LOOPBACK (afs_uint32)0x7f000001
+#endif
+
 /* 
  * The line parameter is a pointer to a buffer containing a string of 
  * bytes of the form 
@@ -382,6 +386,11 @@ filterAddrs(afs_uint32 addr1[], afs_uint32 addr2[], afs_uint32 mask1[],
                break;
            }
        }
+
+       /* Always mask loopback address */
+       if (found && addr1[i] == INADDR_LOOPBACK) 
+           found = 0;
+
        if (found) {
            taddr[count] = addr1[i];
            tmask[count] = mask1[i];
index fabf5209078b6b2a5b1ab7425b6a776168e88251..7b63bff5855d7e1c413e2c75ccd3f73ea047c881 100644 (file)
@@ -235,8 +235,9 @@ OpenLog(const char *fileName)
 #endif
 
     if (mrafsStyleLogs) {
+        time_t t = Start.tv_sec;
        TM_GetTimeOfDay(&Start, 0);
-       TimeFields = localtime(&Start.tv_sec);
+       TimeFields = localtime(&t);
        if (fileName) {
            if (strncmp(fileName, (char *)&ourName, strlen(fileName)))
                strcpy((char *)&ourName, (char *)fileName);
index 831e40194debc97a35036a5fa996cb731f6c87f2..d7ba1823a48fba8c65be54197e66b05f2dcd98f9 100644 (file)
@@ -724,7 +724,7 @@ AclToString(struct Acl *acl)
 }
 
 static int
-SetACLCmd(struct cmd_syndesc *as)
+SetACLCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -858,7 +858,7 @@ SetACLCmd(struct cmd_syndesc *as)
 
 
 static int
-CopyACLCmd(struct cmd_syndesc *as)
+CopyACLCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1038,7 +1038,7 @@ CleanAcl(struct Acl *aa, char *fname)
 
 /* clean up an acl to not have bogus entries */
 static int
-CleanACLCmd(struct cmd_syndesc *as)
+CleanACLCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct Acl *ta = 0;
@@ -1125,7 +1125,7 @@ CleanACLCmd(struct cmd_syndesc *as)
 }
 
 static int
-ListACLCmd(struct cmd_syndesc *as)
+ListACLCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct Acl *ta;
@@ -1189,7 +1189,7 @@ ListACLCmd(struct cmd_syndesc *as)
 }
 
 static int
-FlushVolumeCmd(struct cmd_syndesc *as)
+FlushVolumeCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1211,7 +1211,7 @@ FlushVolumeCmd(struct cmd_syndesc *as)
 }
 
 static int
-FlushCmd(struct cmd_syndesc *as)
+FlushCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1238,7 +1238,7 @@ FlushCmd(struct cmd_syndesc *as)
 
 /* all this command does is repackage its args and call SetVolCmd */
 static int
-SetQuotaCmd(struct cmd_syndesc *as)
+SetQuotaCmd(struct cmd_syndesc *as, char *arock)
 {
     struct cmd_syndesc ts;
 
@@ -1248,7 +1248,7 @@ SetQuotaCmd(struct cmd_syndesc *as)
 }
 
 static int
-SetVolCmd(struct cmd_syndesc *as)
+SetVolCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1312,7 +1312,7 @@ struct VenusFid {
 };
 
 static int
-ExamineCmd(struct cmd_syndesc *as)
+ExamineCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1353,7 +1353,7 @@ ExamineCmd(struct cmd_syndesc *as)
 }
 
 static int
-ListQuotaCmd(struct cmd_syndesc *as)
+ListQuotaCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1384,7 +1384,7 @@ ListQuotaCmd(struct cmd_syndesc *as)
 }
 
 static int
-WhereIsCmd(struct cmd_syndesc *as)
+WhereIsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1423,7 +1423,7 @@ WhereIsCmd(struct cmd_syndesc *as)
 
 
 static int
-DiskFreeCmd(struct cmd_syndesc *as)
+DiskFreeCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1454,7 +1454,7 @@ DiskFreeCmd(struct cmd_syndesc *as)
 }
 
 static int
-QuotaCmd(struct cmd_syndesc *as)
+QuotaCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1487,7 +1487,7 @@ QuotaCmd(struct cmd_syndesc *as)
 }
 
 static int
-ListMountCmd(struct cmd_syndesc *as)
+ListMountCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1608,7 +1608,7 @@ ListMountCmd(struct cmd_syndesc *as)
 }
 
 static
-MakeMountCmd(struct cmd_syndesc *as)
+MakeMountCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     char *cellName, *volName, *tmpName;
@@ -1716,7 +1716,7 @@ defect #3069
  *      tp: Set to point to the actual name of the mount point to nuke.
  */
 static int
-RemoveMountCmd(struct cmd_syndesc *as)
+RemoveMountCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code = 0;
     struct ViceIoctl blob;
@@ -1768,7 +1768,7 @@ RemoveMountCmd(struct cmd_syndesc *as)
 */
 
 static int
-CheckServersCmd(struct cmd_syndesc *as)
+CheckServersCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1867,7 +1867,7 @@ CheckServersCmd(struct cmd_syndesc *as)
 }
 
 static int
-MessagesCmd(struct cmd_syndesc *as)
+MessagesCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code = 0;
     struct ViceIoctl blob;
@@ -1913,7 +1913,7 @@ MessagesCmd(struct cmd_syndesc *as)
 }
 
 static int
-CheckVolumesCmd(struct cmd_syndesc *as)
+CheckVolumesCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1931,7 +1931,7 @@ CheckVolumesCmd(struct cmd_syndesc *as)
 }
 
 static int
-SetCacheSizeCmd(struct cmd_syndesc *as)
+SetCacheSizeCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1970,7 +1970,7 @@ SetCacheSizeCmd(struct cmd_syndesc *as)
 
 #define MAXGCSIZE      16
 static int
-GetCacheParmsCmd(struct cmd_syndesc *as)
+GetCacheParmsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -1995,7 +1995,7 @@ GetCacheParmsCmd(struct cmd_syndesc *as)
 }
 
 static int
-ListCellsCmd(struct cmd_syndesc *as)
+ListCellsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     afs_int32 i, j;
@@ -2046,7 +2046,7 @@ ListCellsCmd(struct cmd_syndesc *as)
 }
 
 static int
-ListAliasesCmd(struct cmd_syndesc *as)
+ListAliasesCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code, i;
     char *tp, *aliasName, *realName;
@@ -2076,7 +2076,7 @@ ListAliasesCmd(struct cmd_syndesc *as)
 }
 
 static int
-CallBackRxConnCmd(struct cmd_syndesc *as)
+CallBackRxConnCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2115,7 +2115,7 @@ CallBackRxConnCmd(struct cmd_syndesc *as)
 }
 
 static int
-NewCellCmd(struct cmd_syndesc *as)
+NewCellCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code, linkedstate = 0, size = 0, *lp;
     struct ViceIoctl blob;
@@ -2227,7 +2227,7 @@ NewCellCmd(struct cmd_syndesc *as)
 }
 
 static int
-NewAliasCmd(struct cmd_syndesc *as)
+NewAliasCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2262,7 +2262,7 @@ NewAliasCmd(struct cmd_syndesc *as)
 }
 
 static int
-WhichCellCmd(struct cmd_syndesc *as)
+WhichCellCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct cmd_item *ti;
@@ -2287,7 +2287,7 @@ WhichCellCmd(struct cmd_syndesc *as)
 }
 
 static int
-WSCellCmd(struct cmd_syndesc *as)
+WSCellCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2317,7 +2317,7 @@ static PrimaryCellCmd(as)
 */
 
 static int
-MonitorCmd(struct cmd_syndesc *as)
+MonitorCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2378,7 +2378,7 @@ MonitorCmd(struct cmd_syndesc *as)
 }
 
 static int
-SysNameCmd(struct cmd_syndesc *as)
+SysNameCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2432,7 +2432,7 @@ SysNameCmd(struct cmd_syndesc *as)
 
 static char *exported_types[] = { "null", "nfs", "" };
 static int
-ExportAfsCmd(struct cmd_syndesc *as)
+ExportAfsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2531,7 +2531,7 @@ ExportAfsCmd(struct cmd_syndesc *as)
 
 
 static int
-GetCellCmd(struct cmd_syndesc *as)
+GetCellCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2582,7 +2582,7 @@ GetCellCmd(struct cmd_syndesc *as)
 }
 
 static int
-SetCellCmd(struct cmd_syndesc *as)
+SetCellCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -2659,75 +2659,14 @@ static int
 VLDBInit(int noAuthFlag, struct afsconf_cell *info)
 {
     afs_int32 code;
-    struct ktc_principal sname;
-    struct ktc_token ttoken;
-    afs_int32 scIndex;
-    struct rx_securityClass *sc;
-    struct rx_connection *serverconns[VLDB_MAXSERVERS];
-    afs_int32 i;
-
-    code = rx_Init(0);
-    if (code) {
-       fprintf(stderr, "%s: could not initialize rx.\n", pn);
-       return code;
-    }
-    rxInitDone = 1;
-    rx_SetRxDeadTime(50);
-    if (!noAuthFlag) {         /* we don't need tickets for null */
-       strcpy(sname.cell, info->name);
-       sname.instance[0] = 0;
-       strcpy(sname.name, "afs");
-       code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
-       if (code) {
-           fprintf(stderr,
-                   "%s: Could not get afs tokens, running unauthenticated.\n",
-                   pn);
-           scIndex = 0;
-       } else {
-           /* got a ticket */
-           if (ttoken.kvno >= 0 && ttoken.kvno <= 255)
-               scIndex = 2;    /* kerberos */
-           else {
-               fprintf(stderr, "%s: funny kvno (%d) in ticket, proceeding\n",
-                       pn, ttoken.kvno);
-               scIndex = 2;
-           }
-       }
-    } else
-       scIndex = 0;            /* don't authenticate */
-    switch (scIndex) {
-    case 0:
-       sc = rxnull_NewClientSecurityObject();
-       break;
 
-    case 1:
-       break;
-    case 2:
-       sc = (struct rx_securityClass *)
-           rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
-                                         ttoken.kvno, ttoken.ticketLen,
-                                         ttoken.ticket);
-       break;
-    }
-    if (info->numServers > VLDB_MAXSERVERS) {
-       fprintf(stderr, "%s: info.numServers=%d (> VLDB_MAXSERVERS=%d)\n", pn,
-               info->numServers, VLDB_MAXSERVERS);
-       exit(1);
-    }
-    memset(serverconns, 0, sizeof(serverconns));
-    for (i = 0; i < info->numServers; i++)
-       serverconns[i] =
-           rx_NewConnection(info->hostAddr[i].sin_addr.s_addr,
-                            info->hostAddr[i].sin_port, USER_SERVICE_ID, sc,
-                            scIndex);
-
-    code = ubik_ClientInit(serverconns, &uclient);
-
-    if (code) {
-       fprintf(stderr, "%s: ubik client init failed.\n", pn);
-       return code;
-    }
-    return 0;
+    code = ugen_ClientInit(noAuthFlag, AFSDIR_CLIENT_ETC_DIRPATH, 
+                          info->name, 0, &uclient, 
+                           NULL, pn, rxkad_clear,
+                           VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 50,
+                           0, 0, USER_SERVICE_ID);
+    rxInitDone = 1;
+    return code;
 }
 
 static struct ViceIoctl gblob;
@@ -2827,7 +2766,7 @@ addServer(char *name, afs_int32 rank)
 
 
 static int
-SetPrefCmd(struct cmd_syndesc *as)
+SetPrefCmd(struct cmd_syndesc *as, char *arock)
 {
     FILE *infd;
     afs_int32 code;
@@ -2933,7 +2872,7 @@ SetPrefCmd(struct cmd_syndesc *as)
 
 
 static int
-GetPrefCmd(struct cmd_syndesc *as)
+GetPrefCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct cmd_item *ti;
@@ -3003,7 +2942,7 @@ GetPrefCmd(struct cmd_syndesc *as)
 }
 
 static int
-StoreBehindCmd(struct cmd_syndesc *as)
+StoreBehindCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code = 0;
     struct ViceIoctl blob;
@@ -3104,7 +3043,7 @@ StoreBehindCmd(struct cmd_syndesc *as)
 
 
 static afs_int32
-SetCryptCmd(struct cmd_syndesc *as)
+SetCryptCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code = 0, flag;
     struct ViceIoctl blob;
@@ -3131,7 +3070,7 @@ SetCryptCmd(struct cmd_syndesc *as)
 
 
 static afs_int32
-GetCryptCmd(struct cmd_syndesc *as)
+GetCryptCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code = 0, flag;
     struct ViceIoctl blob;
@@ -3511,7 +3450,7 @@ Die(int errnum, char *filename)
 
 /* get clients interface addresses */
 static int
-GetClientAddrsCmd(struct cmd_syndesc *as)
+GetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct cmd_item *ti;
@@ -3557,7 +3496,7 @@ GetClientAddrsCmd(struct cmd_syndesc *as)
 }
 
 static int
-SetClientAddrsCmd(struct cmd_syndesc *as)
+SetClientAddrsCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code, addr;
     struct cmd_item *ti;
@@ -3631,7 +3570,7 @@ SetClientAddrsCmd(struct cmd_syndesc *as)
 }
 
 static int
-FlushMountCmd(struct cmd_syndesc *as)
+FlushMountCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     struct ViceIoctl blob;
@@ -3747,7 +3686,7 @@ FlushMountCmd(struct cmd_syndesc *as)
 }
 
 static int
-RxStatProcCmd(struct cmd_syndesc *as)
+RxStatProcCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     afs_int32 flags = 0;
@@ -3782,7 +3721,7 @@ RxStatProcCmd(struct cmd_syndesc *as)
 }
 
 static int
-RxStatPeerCmd(struct cmd_syndesc *as)
+RxStatPeerCmd(struct cmd_syndesc *as, char *arock)
 {
     afs_int32 code;
     afs_int32 flags = 0;
index 65e3be2899e5a4084d7eb47d9204f54e3b7e8a40..90d684d723480aa883980a30cf1599cb2dcc94ee 100644 (file)
@@ -776,6 +776,7 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
        if (!thishost || (thishost->hostFlags & HOSTDELETED)) {
            continue;
        }
+       rx_GetConnection(thishost->callback_rxcon);
        conns[j++] = thishost->callback_rxcon;
 
 #ifdef ADAPT_MTU
@@ -832,14 +833,14 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
                        }
 
                        H_LOCK;
-                       h_Lock_r(hp);
+                       h_Lock_r(hp); 
                        hp->hostFlags |= VENUSDOWN;
                /**
                  * We always go into AddCallBack1_r with the host locked
                  */
                        AddCallBack1_r(hp, afidp->AFSCBFids_val, itot(idx),
                                       CB_DELAYED, 1);
-                       h_Unlock_r(hp);
+                       h_Unlock_r(hp); 
                        H_UNLOCK;
                    }
                }
@@ -853,8 +854,10 @@ MultiBreakCallBack_r(struct cbstruct cba[], int ncbas,
     for (i = 0; i < ncbas; i++) {
        struct host *hp;
        hp = cba[i].hp;
-       if (hp && xhost != hp)
+       if (hp && xhost != hp) {
+           rx_PutConnection(hp->callback_rxcon);
            h_Release_r(hp);
+       }
     }
 
     return;
index 2e99984a7fc37b286d1163d19f8f37e3aa979331..3d1eb6d66b7faf3c7a87dddec5ce902b4e88c55b 100644 (file)
@@ -781,6 +781,7 @@ h_TossStuff_r(register struct host *host)
                    *hp = th->next;
                    h_DeleteList_r(host);
                    FreeHT(host);
+                   free(th);
                    break;
                }
            }
index ba109723924755a17f09421f1e1582c537841cf6..e2251bc177b7d3e2dc43222bb0a24a192b96be0c 100644 (file)
@@ -1564,6 +1564,7 @@ main(int argc, char *argv[])
     struct rlimit rlim;                /* max number of open file descriptors */
 #endif
     int curLimit;
+    time_t t;
 
 #ifdef AFS_AIX32_ENV
     struct sigaction nsa;
@@ -1868,9 +1869,10 @@ main(int argc, char *argv[])
     TM_GetTimeOfDay(&tp, 0);
 
 #ifndef AFS_QUIETFS_ENV
-    if (console != NULL) {
+    if (console != NULL) { 
+        time_t t = tp.tv_sec;
        fprintf(console, "File server has started at %s\r",
-               afs_ctime(&tp.tv_sec, tbuffer, sizeof(tbuffer)));
+               afs_ctime(&t, tbuffer, sizeof(tbuffer)));
     }
 #endif
 
@@ -1907,9 +1909,10 @@ main(int argc, char *argv[])
     (void)signal(SIGQUIT, ShutDown_Signal);
 #endif
 
+    t = tp.tv_sec;
     ViceLog(0,
            ("File Server started %s",
-            afs_ctime(&tp.tv_sec, tbuffer, sizeof(tbuffer))));
+            afs_ctime(&t, tbuffer, sizeof(tbuffer))));
 #if FS_STATS_DETAILED
     afs_FullPerfStats.det.epoch.tv_sec = StartTime = tp.tv_sec;
 #endif
index 985fbc99dd4e2a8b95b7b5372e81bb60d3b5328c..42d70c0c9a8340b157394fc35489849a9b26c3e5 100644 (file)
@@ -162,102 +162,17 @@ GetVolume(vol, entry)
 
 /* Almost identical's to pr_Initialize in vlserver/pruser.c */
 afs_int32
-vl_Initialize(auth, confDir, server, cellp)
-     int auth, server;
-     char *confDir, *cellp;
+vl_Initialize(int auth, char *confDir, int server, char *cellp)
 {
-    afs_int32 code;
-    struct afsconf_dir *tdir;
-    struct ktc_principal sname;
-    struct ktc_token ttoken;
-    afs_int32 scIndex = 0;
-    struct rx_securityClass *sc;
-    struct afsconf_cell info;
-    afs_int32 i;
-
-    code = rx_Init(0);
-    if (code) {
-       fprintf(stderr, "vl_Initialize:  Could not initialize rx.\n");
-       return code;
-    }
-
-    rx_SetRxDeadTime(50);
-    if (!server) {
-       tdir = afsconf_Open(confDir);
-       if (!tdir) {
-           fprintf(stderr, "Could not open configuration directory (%s).\n",
-                   confDir);
-           return -1;
-       }
-    }
-    if (auth) {                        /* we don't need tickets for null */
-       if (!server) {
-           code = afsconf_GetLocalCell(tdir, sname.cell, sizeof(sname.cell));
-           if (code) {
-               fprintf(stderr,
-                       "vl_Initialize: Could not get local cell name.\n");
-               return code;
-           }
-       } else
-           strncpy(sname.cell, cellp, sizeof(sname.cell));
-       sname.instance[0] = 0;
-       strcpy(sname.name, "afs");
-       code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
-       if (code) {
-           fprintf(stderr,
-                   "vl_Initialize: Could not get afs tokens, running unauthenticated.\n");
-           scIndex = 0;
-       } else if (ttoken.kvno <= 255)
-           scIndex = 2;
-       else {                  /* bcrypt */
-           fprintf(stderr,
-                   "vl_Initialize: funny kvno (%d) in ticket, proceeding\n",
-                   ttoken.kvno);
-           scIndex = 2;
-       }
-    }
-    switch (scIndex) {
-    case 0:
-       sc = rxnull_NewClientSecurityObject();
-       break;
-    case 1:
-       return -1;
-    case 2:
-       sc = rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey,
-                                          ttoken.kvno, ttoken.ticketLen,
-                                          ttoken.ticket);
-    }
-    if (!server) {
-       code = afsconf_GetCellInfo(tdir, NULL, AFSCONF_VLDBSERVICE, &info);
-       if (info.numServers > MAXSERVERS) {
-           fprintf(stderr,
-                   "vl_Initialize: info.numServers=%d (> MAXSERVERS=%d)\n",
-                   info.numServers, MAXSERVERS);
-           exit(1);
-       }
-       for (i = 0; i < info.numServers; i++)
-           serverconns[i] =
-               rx_NewConnection(info.hostAddr[i].sin_addr.s_addr,
-                                info.hostAddr[i].sin_port, USER_SERVICE_ID,
-                                sc, scIndex);
-    } else {
-       serverconns[0] =
-           rx_NewConnection(server, htons(AFSCONF_VLDBPORT), USER_SERVICE_ID,
-                            sc, scIndex);
-    }
-    code = ubik_ClientInit(serverconns, &cstruct);
-
-    if (code) {
-       fprintf(stderr, "vl_Initialize: ubik client init failed.\n");
-       return code;
-    }
-    return 0;
+    return ugen_ClientInit(auth?0:1, confDir, cellp, 0,
+                         &cstruct, NULL, "vl_Initialize", rxkad_clear, 
+                         MAXSERVERS, AFSCONF_VLDBSERVICE, 50, server,
+                         htons(AFSCONF_VLDBPORT), USER_SERVICE_ID);
 }
 
 /* return host address in network byte order */
 afs_int32
-GetServer(aname)
-     char *aname;
+GetServer(char *aname)
 {
     register struct hostent *th;
     afs_int32 addr;
index 86fed237a0cbcc64fbf05914a230015cbcc6139a..992e44158b11fd44c284e27f6666a7988f3e4d14 100644 (file)
@@ -35,7 +35,7 @@ RCSID
 int
 ListViceInodes(char *devname, char *mountedOn, char *resultFile,
               int (*judgeInode) (), int judgeParam, int *forcep, int forceR,
-              char *wpath)
+              char *wpath, void *rock)
 {
     Log("ListViceInodes not implemented for this platform!\n");
     return -1;
@@ -167,7 +167,7 @@ struct dinode *ginode();
 int
 ListViceInodes(char *devname, char *mountedOn, char *resultFile,
               int (*judgeInode) (), int judgeParam, int *forcep, int forceR,
-              char *wpath)
+              char *wpath, void *rock)
 {
     FILE *inodeFile = NULL;
     char dev[50], rdev[51];
@@ -301,7 +301,7 @@ ListViceInodes(char *devname, char *mountedOn, char *resultFile,
        info.u.param[2] = p->di_vicep3;
        info.u.param[3] = p->di_vicep4;
 
-       if (judgeInode && (*judgeInode) (&info, judgeParam) == 0)
+       if (judgeInode && (*judgeInode) (&info, judgeParam, rock) == 0)
            continue;
 
        if (fwrite(&info, sizeof info, 1, inodeFile) != 1) {
@@ -469,7 +469,7 @@ afs_efs_figet(EFS_MOUNT * mp, struct efs_dinode *dinodeBuf, int *last_cgno,
 int
 efs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
                   int (*judgeInode) (), int judgeParam, int *forcep,
-                  int forceR, char *wpath)
+                  int forceR, char *wpath, void *rock)
 {
     FILE *inodeFile = NULL;
     char dev[50], rdev[51];
@@ -570,7 +570,7 @@ efs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
            p->di_nlink, info.u.param[0], info.u.param[1], info.u.param[2],
            info.u.param[3]);
 #endif
-       if (judgeInode && (*judgeInode) (&info, judgeParam) == 0)
+       if (judgeInode && (*judgeInode) (&info, judgeParam, rock) == 0)
            continue;
 
        if (fwrite(&info, sizeof info, 1, inodeFile) != 1) {
@@ -823,7 +823,7 @@ xfs_RenameFiles(char *dir, xfs_Rename_t * renames, int n_renames)
 int
 xfs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
                   int (*judgeInode) (), int judgeParam, int *forcep,
-                  int forceR, char *wpath)
+                  int forceR, char *wpath, void *rock)
 {
     FILE *inodeFile = NULL;
     i_list_inode_t info;
@@ -931,7 +931,7 @@ xfs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
                goto err1_exit;
            }
 
-           if (judgeInode && (*judgeInode) (&info.ili_info, judgeParam) == 0)
+           if (judgeInode && (*judgeInode) (&info.ili_info, judgeParam, rock) == 0)
                continue;
 
            rename = 0;
@@ -1039,7 +1039,7 @@ xfs_ListViceInodes(char *devname, char *mountedOn, char *resultFile,
 int
 ListViceInodes(char *devname, char *mountedOn, char *resultFile,
               int (*judgeInode) (), int judgeParam, int *forcep, int forceR,
-              char *wpath)
+              char *wpath, void *rock)
 {
     FILE *inodeFile = NULL;
     char dev[50], rdev[51];
@@ -1070,13 +1070,13 @@ ListViceInodes(char *devname, char *mountedOn, char *resultFile,
 #ifdef AFS_SGI_XFS_IOPS_ENV
     if (!strcmp("xfs", root_inode.st_fstype)) {
        return xfs_ListViceInodes(devname, mountedOn, resultFile, judgeInode,
-                                 judgeParam, forcep, forceR, wpath);
+                                 judgeParam, forcep, forceR, wpath, rock);
     } else
 #endif
 #ifdef AFS_SGI_EFS_IOPS_ENV
     if (root_inode.st_ino == EFS_ROOTINO) {
        return efs_ListViceInodes(devname, mountedOn, resultFile, judgeInode,
-                                 judgeParam, forcep, forceR, wpath);
+                                 judgeParam, forcep, forceR, wpath, rock);
     } else
 #endif
     {
@@ -1114,7 +1114,7 @@ extern char *afs_rawname();
 int
 ListViceInodes(char *devname, char *mountedOn, char *resultFile,
               int (*judgeInode) (), int judgeParam, int *forcep, int forceR,
-              char *wpath)
+              char *wpath, void *rock)
 {
     union {
 #ifdef AFS_AIX_ENV
@@ -1212,7 +1212,7 @@ ListViceInodes(char *devname, char *mountedOn, char *resultFile,
        info.u.param[1] = auxp->aux_param2;
        info.u.param[2] = auxp->aux_param3;
        info.u.param[3] = auxp->aux_param4;
-       if (judgeInode && (*judgeInode) (&info, judgeParam) == 0)
+       if (judgeInode && (*judgeInode) (&info, judgeParam, rock) == 0)
            continue;
        if (fwrite(&info, sizeof info, 1, inodeFile) != 1) {
            Log("Error writing inode file for partition %s\n", partition);
@@ -1421,7 +1421,7 @@ ListViceInodes(char *devname, char *mountedOn, char *resultFile,
                    info.inodeNumber = i;
                    info.byteCount = p->di_size;
                    info.linkCount = p->di_nlink;
-                   if (judgeInode && (*judgeInode) (&info, judgeParam) == 0)
+                   if (judgeInode && (*judgeInode) (&info, judgeParam, rock) == 0)
                        continue;
                    if (fwrite(&info, sizeof info, 1, inodeFile) != 1) {
                        Log("Error writing inode file for partition %s\n",
index 64a476655e4e3d485412a264a88bf594662313ca..9f0df4a923ace5bf64711a54cd7cf8d730a9c56e 100644 (file)
@@ -50,11 +50,13 @@ int namei_ListAFSFiles(char *dev,
                                         struct ViceInodeInfo * info,
                                         char *dir, char *file), FILE * fp,
                       int (*judge_fun) (struct ViceInodeInfo * info,
-                                        int vid), int singleVolumeNumber);
+                                        int vid, void *rock), 
+                      int singleVolumeNumber, void *rock);
 int ListViceInodes(char *devname, char *mountedOn, char *resultFile,
-                  int (*judgeInode) (struct ViceInodeInfo * info, int vid),
+                  int (*judgeInode) (struct ViceInodeInfo * info, int vid, 
+                                     void *rock),
                   int singleVolumeNumber, int *forcep, int forceR,
-                  char *wpath);
+                  char *wpath, void *rock);
 
 
 #define NAMEI_LCOMP_LEN 32
index 57455467ef355d2c15a2189600bd7532d3c49ebb..4285885341dee694d0f296ee9b247d6e96a8c1a5 100644 (file)
@@ -935,8 +935,8 @@ static int nt_ListAFSSubDirs(IHandle_t * dirIH,
                             int (*write_fun) (FILE *, struct ViceInodeInfo *,
                                               char *, char *), FILE * fp,
                             int (*judgeFun) (struct ViceInodeInfo *,
-                                             int vid),
-                            int singleVolumeNumber);
+                                             int vid, void *rock),
+                            int singleVolumeNumber, void *rock);
 
 
 /* WriteInodeInfo
@@ -972,8 +972,9 @@ WriteInodeInfo(FILE * fp, struct ViceInodeInfo *info, char *dir, char *name)
  */
 int
 ListViceInodes(char *devname, char *mountedOn, char *resultFile,
-              int (*judgeInode) (struct ViceInodeInfo * info, int vid),
-              int singleVolumeNumber, int *forcep, int forceR, char *wpath)
+              int (*judgeInode) (struct ViceInodeInfo * info, int vid, void *rock),
+              int singleVolumeNumber, int *forcep, int forceR, char *wpath, 
+              void *rock)
 {
     FILE *fp = (FILE *) - 1;
     int ninodes;
@@ -988,7 +989,7 @@ ListViceInodes(char *devname, char *mountedOn, char *resultFile,
     }
     ninodes =
        nt_ListAFSFiles(wpath, WriteInodeInfo, fp, judgeInode,
-                       singleVolumeNumber);
+                       singleVolumeNumber, rock);
 
     if (!resultFile)
        return ninodes;
@@ -1041,8 +1042,8 @@ int
 nt_ListAFSFiles(char *dev,
                int (*writeFun) (FILE *, struct ViceInodeInfo *, char *,
                                 char *), FILE * fp,
-               int (*judgeFun) (struct ViceInodeInfo *, int),
-               int singleVolumeNumber)
+               int (*judgeFun) (struct ViceInodeInfo *, int, void *),
+               int singleVolumeNumber, void *rock)
 {
     IHandle_t h;
     char name[MAX_PATH];
@@ -1059,7 +1060,7 @@ nt_ListAFSFiles(char *dev,
        if (!nt_HandleToVolDir(name, &h))
            return -1;
        ninodes =
-           nt_ListAFSSubDirs(&h, writeFun, fp, judgeFun, singleVolumeNumber);
+           nt_ListAFSSubDirs(&h, writeFun, fp, judgeFun, singleVolumeNumber, rock);
        if (ninodes < 0)
            return ninodes;
     } else {
@@ -1072,7 +1073,7 @@ nt_ListAFSFiles(char *dev,
            return -1;
        while (dp = readdir(dirp)) {
            if (!DecodeVolumeName(dp->d_name, &h.ih_vid)) {
-               ninodes += nt_ListAFSSubDirs(&h, writeFun, fp, judgeFun, 0);
+               ninodes += nt_ListAFSSubDirs(&h, writeFun, fp, judgeFun, 0, rock);
            }
        }
     }
@@ -1094,8 +1095,8 @@ static int
 nt_ListAFSSubDirs(IHandle_t * dirIH,
                  int (*writeFun) (FILE *, struct ViceInodeInfo *, char *,
                                   char *), FILE * fp,
-                 int (*judgeFun) (struct ViceInodeInfo *, int),
-                 int singleVolumeNumber)
+                 int (*judgeFun) (struct ViceInodeInfo *, int, void *),
+                 int singleVolumeNumber, void *rock)
 {
     int i;
     IHandle_t myIH = *dirIH;
@@ -1179,7 +1180,7 @@ nt_ListAFSSubDirs(IHandle_t * dirIH,
                    info.u.param[2] = data.ftCreationTime.dwHighDateTime;
                    info.u.param[3] = data.ftCreationTime.dwLowDateTime;
                }
-               if (judgeFun && !(*judgeFun) (&info, singleVolumeNumber))
+               if (judgeFun && !(*judgeFun) (&info, singleVolumeNumber, rock))
                    goto next_file;
                if ((*writeFun) (fp, &info, path, data.cFileName) < 0) {
                    nt_close(linkHandle.fd_fd);
index e5098e1f06e3005d20244fed5fdca7b4269dc474..f1f1f36a47153308afd12fb72c4cd41cba7a10fd 100644 (file)
@@ -49,12 +49,12 @@ extern int nt_GetLinkCount(FdHandle_t * h, Inode ino, int lockit);
 int nt_ListAFSFiles(char *dev,
                    int (*write_fun) (FILE * fp, struct ViceInodeInfo *,
                                      char *dir, char *file), FILE * fp,
-                   int (*judge_fun) (struct ViceInodeInfo *, int vid),
-                   int singleVolumeNumber);
+                   int (*judge_fun) (struct ViceInodeInfo *, int vid, void *rock),
+                   int singleVolumeNumber, void *rock);
 int ListViceInodes(char *devname, char *mountedOn, char *resultFile,
-                  int (*judgeInode) (struct ViceInodeInfo * info, int vid),
+                  int (*judgeInode) (struct ViceInodeInfo * info, int vid, void *rock),
                   int singleVolumeNumber, int *forcep, int forceR,
-                  char *wpath);
+                  char *wpath, void *rock);
 
 
 int nt_HandleToName(char *name, IHandle_t * h);
index ea53c5a02b2c6f91df01ec2a99631bb155d34b54..28d701eb74f0744e19fe49f2413a7b33a7b0e4a6 100644 (file)
@@ -100,7 +100,7 @@ int Testing = 0;            /* for ListViceInodes */
                       }
 
 
-static
+static afs_int32
 MyBeforeProc(struct rx_call *acall)
 {
     VTRANS_LOCK;
@@ -109,7 +109,7 @@ MyBeforeProc(struct rx_call *acall)
     return 0;
 }
 
-static
+static afs_int32
 MyAfterProc(struct rx_call *acall, afs_int32 code)
 {
     VTRANS_LOCK;
@@ -121,7 +121,7 @@ MyAfterProc(struct rx_call *acall, afs_int32 code)
 /* Called every GCWAKEUP seconds to try to unlock all our partitions,
  * if we're idle and there are no active transactions 
  */
-static
+static void
 TryUnlock()
 {
     /* if there are no running calls, and there are no active transactions, then
@@ -135,7 +135,7 @@ TryUnlock()
 }
 
 /* background daemon for timing out transactions */
-static
+static void
 BKGLoop()
 {
     struct timeval tv;
@@ -161,7 +161,7 @@ BKGLoop()
 
 /* Background daemon for sleeping so the volserver does not become I/O bound */
 afs_int32 TTsleep, TTrun;
-static
+static void
 BKGSleep()
 {
     struct volser_trans *tt;
@@ -194,9 +194,7 @@ BKGSleep()
 
 #ifndef AFS_NT40_ENV
 int
-volser_syscall(a3, a4, a5)
-     afs_uint32 a3, a4;
-     void *a5;
+volser_syscall(afs_uint32 a3, afs_uint32 a4, void *a5)
 {
     afs_uint32 rcode;
     void (*old) ();
@@ -218,16 +216,14 @@ volser_syscall(a3, a4, a5)
 
 /* check whether caller is authorized to manage RX statistics */
 int
-vol_rxstat_userok(call)
-     struct rx_call *call;
+vol_rxstat_userok(struct rx_call *call)
 {
     return afsconf_SuperUser(tdir, call, NULL);
 }
 
 #include "AFS_component_version_number.c"
-main(argc, argv)
-     int argc;
-     char **argv;
+int 
+main(int argc, char **argv)
 {
     register afs_int32 code;
     struct rx_securityClass *(securityObjects[3]);
index a4276ae44c381046930784ca488cf9b013db9535..6f049b8937b97aec6813e35ce57919b33d3dddfc 100644 (file)
@@ -425,7 +425,7 @@ VolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
     if (error) {
        Log("1 Volser: CreateVolume: Unable to create the volume; aborted, error code %u\n", error);
        LogError(error);
-       DeleteTrans(tt);
+       DeleteTrans(tt, 1);
        return EIO;
     }
     V_uniquifier(vp) = 1;
@@ -442,7 +442,7 @@ VolCreateVolume(struct rx_call *acid, afs_int32 apart, char *aname,
     if (error) {
        Log("1 Volser: create UpdateVolume failed, code %d\n", error);
        LogError(error);
-       DeleteTrans(tt);
+       DeleteTrans(tt, 1);
        VDetachVolume(&junk, vp);       /* rather return the real error code */
        return error;
     }
@@ -677,7 +677,7 @@ VolClone(struct rx_call *acid, afs_int32 atrans, afs_int32 purgeId,
        error = VOLSERTRELE_ERROR;
        goto fail;
     }
-    DeleteTrans(ttc);
+    DeleteTrans(ttc, 1);
     return 0;
 
   fail:
@@ -690,7 +690,7 @@ VolClone(struct rx_call *acid, afs_int32 atrans, afs_int32 purgeId,
        TRELE(tt);
     }
     if (ttc)
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
     return error;
 }
 
@@ -840,7 +840,7 @@ VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId)
        goto fail;
     }
 
-    DeleteTrans(ttc);
+    DeleteTrans(ttc, 1);
 
     {
        struct DiskPartition *tpartp = originalvp->partition;
@@ -856,7 +856,7 @@ VolReClone(struct rx_call *acid, afs_int32 atrans, afs_int32 cloneId)
        TRELE(tt);
     }
     if (ttc)
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
     return error;
 }
 
@@ -913,7 +913,7 @@ VolTransCreate(struct rx_call *acid, afs_int32 volume, afs_int32 partition,
        /* give up */
        if (tv)
            VDetachVolume(&code, tv);
-       DeleteTrans(tt);
+       DeleteTrans(tt, 1);
        return error;
     }
     tt->volume = tv;
@@ -1387,7 +1387,7 @@ VolEndTrans(struct rx_call *acid, afs_int32 destTrans, afs_int32 *rcode)
        return ENOENT;
     }
     *rcode = tt->returnCode;
-    DeleteTrans(tt);           /* this does an implicit TRELE */
+    DeleteTrans(tt, 1);                /* this does an implicit TRELE */
 
     return 0;
 }
@@ -1540,10 +1540,6 @@ VolSetInfo(struct rx_call *acid, afs_int32 atrans,
        td->maxquota = astatus->maxquota;
     if (astatus->dayUse != -1)
        td->dayUse = astatus->dayUse;
-    if (astatus->creationDate != -1)
-       td->creationDate = astatus->creationDate;
-    if (astatus->updateDate != -1)
-       td->updateDate = astatus->updateDate;
     VUpdateVolume(&error, tv);
     tt->rxCallPtr = (struct rx_call *)0;
     if (TRELE(tt))
@@ -1868,7 +1864,7 @@ VolListOneVolume(struct rx_call *acid, afs_int32 partid, afs_int32
        tv = (Volume *) 0;
     }
     if (ttc) {
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
        ttc = (struct volser_trans *)0;
     }
 
@@ -2099,7 +2095,7 @@ VolXListOneVolume(struct rx_call *a_rxCidP, afs_int32 a_partID,
        tv = (Volume *) 0;
     }
     if (ttc) {
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
        ttc = (struct volser_trans *)0;
     }
 
@@ -2241,7 +2237,7 @@ VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
 
       drop:
        if (ttc) {
-           DeleteTrans(ttc);
+           DeleteTrans(ttc, 1);
            ttc = (struct volser_trans *)0;
        }
        pntr++;
@@ -2258,7 +2254,7 @@ VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
                    tv = (Volume *) 0;
                }
                if (ttc) {
-                   DeleteTrans(ttc);
+                   DeleteTrans(ttc, 1);
                    ttc = (struct volser_trans *)0;
                }
                closedir(dirp);
@@ -2276,7 +2272,7 @@ VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
            tv = (Volume *) 0;
        }
        if (ttc) {
-           DeleteTrans(ttc);
+           DeleteTrans(ttc, 1);
            ttc = (struct volser_trans *)0;
        }
        GetNextVol(dirp, volname, &volid);
@@ -2284,7 +2280,7 @@ VolListVolumes(struct rx_call *acid, afs_int32 partid, afs_int32 flags,
     }
     closedir(dirp);
     if (ttc)
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
 
     return 0;
 }
@@ -2495,7 +2491,7 @@ VolXListVolumes(struct rx_call *a_rxCidP, afs_int32 a_partID,
         * Drop the transaction we have for this volume.
         */
        if (ttc) {
-           DeleteTrans(ttc);
+           DeleteTrans(ttc, 1);
            ttc = (struct volser_trans *)0;
        }
 
@@ -2522,7 +2518,7 @@ VolXListVolumes(struct rx_call *a_rxCidP, afs_int32 a_partID,
                    tv = (Volume *) 0;
                }
                if (ttc) {
-                   DeleteTrans(ttc);
+                   DeleteTrans(ttc, 1);
                    ttc = (struct volser_trans *)0;
                }
                closedir(dirp);
@@ -2550,7 +2546,7 @@ VolXListVolumes(struct rx_call *a_rxCidP, afs_int32 a_partID,
            tv = (Volume *) 0;
        }
        if (ttc) {
-           DeleteTrans(ttc);
+           DeleteTrans(ttc, 1);
            ttc = (struct volser_trans *)0;
        }
        GetNextVol(dirp, volname, &volid);
@@ -2562,7 +2558,7 @@ VolXListVolumes(struct rx_call *a_rxCidP, afs_int32 a_partID,
      */
     closedir(dirp);
     if (ttc)
-       DeleteTrans(ttc);
+       DeleteTrans(ttc, 1);
     return (0);
 
 }                              /*SAFSVolXListVolumes */
index 6dd744c8a598766a285d31c7c1bf055fa7a5806e..8a137bca3cafae2a4c977a9bb091ac9484102285 100644 (file)
@@ -79,9 +79,7 @@ static afs_int32 transCounter = 1;
 
 /* create a new transaction, returning ptr to same with high ref count */
 struct volser_trans *
-NewTrans(avol, apart)
-     afs_int32 avol;
-     afs_int32 apart;
+NewTrans(afs_int32 avol, afs_int32 apart)
 {
     /* set volid, next, partition */
     register struct volser_trans *tt;
@@ -117,8 +115,7 @@ NewTrans(avol, apart)
 
 /* find a trans, again returning with high ref count */
 struct volser_trans *
-FindTrans(atrans)
-     register afs_int32 atrans;
+FindTrans(register afs_int32 atrans)
 {
     register struct volser_trans *tt;
     VTRANS_LOCK;
@@ -135,8 +132,8 @@ FindTrans(atrans)
 }
 
 /* delete transaction if refcount == 1, otherwise queue delete for later.  Does implicit TRELE */
-DeleteTrans(atrans)
-     register struct volser_trans *atrans;
+afs_int32 
+DeleteTrans(register struct volser_trans *atrans, afs_int32 lock)
 {
     register struct volser_trans *tt, **lt;
     afs_int32 error;
@@ -149,7 +146,7 @@ DeleteTrans(atrans)
     }
 
     /* otherwise we zap it ourselves */
-    VTRANS_LOCK;
+    if (lock) VTRANS_LOCK;
     lt = &allTrans;
     for (tt = *lt; tt; lt = &tt->next, tt = *lt) {
        if (tt == atrans) {
@@ -158,19 +155,19 @@ DeleteTrans(atrans)
            tt->volume = NULL;
            *lt = tt->next;
            free(tt);
-           VTRANS_UNLOCK;
+           if (lock) VTRANS_UNLOCK;
            return 0;
        }
     }
-    VTRANS_UNLOCK;
+    if (lock) VTRANS_UNLOCK;
     return -1;                 /* failed to find the transaction in the generic list */
 }
 
 /* THOLD is a macro defined in volser.h */
 
 /* put a transaction back */
-TRELE(at)
-     register struct volser_trans *at;
+afs_int32 
+TRELE(register struct volser_trans *at)
 {
     if (at->refCount == 0) {
        Log("TRELE: bad refcount\n");
@@ -179,7 +176,7 @@ TRELE(at)
 
     at->time = FT_ApproxTime();        /* we're still using it */
     if (at->refCount == 1 && (at->tflags & TTDeleted)) {
-       DeleteTrans(at);
+       DeleteTrans(at, 1);
        return 0;
     }
     /* otherwise simply drop refcount */
@@ -191,6 +188,7 @@ TRELE(at)
 #define        OLDTRANSTIME        600 /* seconds */
 #define        OLDTRANSWARN        300 /* seconds */
 static int GCDeletes = 0;
+afs_int32
 GCTrans()
 {
     register struct volser_trans *tt, *nt;
@@ -212,7 +210,7 @@ GCTrans()
        if (tt->time + OLDTRANSTIME < now) {
            Log("trans %u on volume %u has timed out\n", tt->tid, tt->volid);
            tt->refCount++;     /* we're using it now */
-           DeleteTrans(tt);    /* drops refCount or deletes it */
+           DeleteTrans(tt, 0); /* drops refCount or deletes it */
            GCDeletes++;
        }
     }
index 1be7993539bf56dfc03a9647dba8adf1661ebd60..f103a27ed9a82d4d791aad1fecb01e00e9982b97 100644 (file)
@@ -445,128 +445,10 @@ vsu_ClientInit(noAuthFlag, confDir, cellName, sauth, uclientp, secproc)
     static struct rx_connection *serverconns[VLDB_MAXSERVERS];
     char cellstr[64];
 
-
-    code = rx_Init(0);
-    if (code) {
-       fprintf(STDERR, "vsu_ClientInit: could not initialize rx.\n");
-       return code;
-    }
-    rx_SetRxDeadTime(90);
-
-    if (sauth) {               /* -localauth */
-       tdir = afsconf_Open(AFSDIR_SERVER_ETC_DIRPATH);
-       if (!tdir) {
-           fprintf(STDERR,
-                   "vsu_ClientInit: Could not process files in configuration directory (%s).\n",
-                   AFSDIR_SERVER_ETC_DIRPATH);
-           return -1;
-       }
-       code = afsconf_ClientAuth(tdir, &sc, &scIndex); /* sets sc,scIndex */
-       if (code) {
-           fprintf(STDERR,
-                   "vsu_ClientInit: Could not get security object for -localAuth\n");
-           return -1;
-       }
-       code =
-           afsconf_GetCellInfo(tdir, tdir->cellName, AFSCONF_VLDBSERVICE,
-                               &info);
-       if (code) {
-           fprintf(STDERR,
-                   "vsu_ClientInit: can't find cell %s's hosts in %s/%s\n",
-                   cellName, AFSDIR_SERVER_ETC_DIRPATH,
-                   AFSDIR_CELLSERVDB_FILE);
-           exit(1);
-       }
-    } else {                   /* not -localauth */
-       tdir = afsconf_Open(confDir);
-       if (!tdir) {
-           fprintf(STDERR,
-                   "vsu_ClientInit: Could not process files in configuration directory (%s).\n",
-                   confDir);
-           return -1;
-       }
-
-       if (!cellName) {
-           code = afsconf_GetLocalCell(tdir, cellstr, sizeof(cellstr));
-           if (code) {
-               fprintf(STDERR,
-                       "vsu_ClientInit: can't get local cellname, check %s/%s\n",
-                       confDir, AFSDIR_THISCELL_FILE);
-               exit(1);
-           }
-           cellName = cellstr;
-       }
-
-       code =
-           afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
-       if (code) {
-           fprintf(STDERR,
-                   "vsu_ClientInit: can't find cell %s's hosts in %s/%s\n",
-                   cellName, confDir, AFSDIR_CELLSERVDB_FILE);
-           exit(1);
-       }
-       if (noAuthFlag)         /* -noauth */
-           scIndex = 0;
-       else {                  /* not -noauth */
-           strcpy(sname.cell, info.name);
-           sname.instance[0] = 0;
-           strcpy(sname.name, "afs");
-           code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), NULL);
-           if (code) {         /* did not get ticket */
-               fprintf(STDERR,
-                       "vsu_ClientInit: Could not get afs tokens, running unauthenticated.\n");
-               scIndex = 0;
-           } else {            /* got a ticket */
-               scIndex = 2;
-               if ((ttoken.kvno < 0) || (ttoken.kvno > 255)) {
-                   fprintf(STDERR,
-                           "vsu_ClientInit: funny kvno (%d) in ticket, proceeding\n",
-                           ttoken.kvno);
-               }
-           }
-       }
-
-       switch (scIndex) {
-       case 0:
-           sc = rxnull_NewClientSecurityObject();
-           break;
-       case 2:
-           sc = rxkad_NewClientSecurityObject(vsu_rxkad_level,
-                                              &ttoken.sessionKey,
-                                              ttoken.kvno, ttoken.ticketLen,
-                                              ttoken.ticket);
-           break;
-       default:
-           fprintf(STDERR, "vsu_ClientInit: unsupported security index %d\n",
-                   scIndex);
-           exit(1);
-           break;
-       }
-    }
-
-    afsconf_Close(tdir);
-
-    if (secproc)               /* tell UV module about default authentication */
-       (*secproc) (sc, scIndex);
-    if (info.numServers > VLDB_MAXSERVERS) {
-       fprintf(STDERR,
-               "vsu_ClientInit: info.numServers=%d (> VLDB_MAXSERVERS=%d)\n",
-               info.numServers, VLDB_MAXSERVERS);
-       exit(1);
-    }
-    for (i = 0; i < info.numServers; i++) {
-       serverconns[i] =
-           rx_NewConnection(info.hostAddr[i].sin_addr.s_addr,
-                            info.hostAddr[i].sin_port, USER_SERVICE_ID, sc,
-                            scIndex);
-    }
-    *uclientp = 0;
-    code = ubik_ClientInit(serverconns, uclientp);
-    if (code) {
-       fprintf(STDERR, "vsu_ClientInit: ubik client init failed.\n");
-       return code;
-    }
-    return 0;
+    return ugen_ClientInit(noAuthFlag, confDir, cellName, sauth, uclientp, 
+                          secproc, "vsu_ClientInit", vsu_rxkad_level,
+                          VLDB_MAXSERVERS, AFSCONF_VLDBSERVICE, 90,
+                          0, 0, USER_SERVICE_ID);
 }