[8794] in Athena Bugs

home help back first fref pref prev next nref lref last post

AFS 3.1B patches

daemon@ATHENA.MIT.EDU (Richard Basch)
Wed Jan 1 13:31:00 1992

Date: Wed, 1 Jan 92 13:28:41 -0500
To: afs-bugs@transarc.com
Cc: bugs@MIT.EDU
From: "Richard Basch" <basch@MIT.EDU>


These are a lot of patches...  the ChangeLog is enclosed which briefly
summarizes the various patches.

There are:
o Some basic A/UX support (what's there works...)
o A couple syntax error fixes
o A few Makefile dependency fixes
o Support for subnet biasing, though you already have it in 3.2
o Support for specifying an alternate database directory for the backup
  system (-dbdir) and alternate cell (-cell).  This allows
  /usr/afs/backup to be the repository for the local tape status and
  an alternate (AFS/shared) directory to be used for the database, as
  well as being able to backup foreign cells.
  (This is the bulk of the patches).
o Fixes so that restarting services on fast machines doesn't cause
  most of the services to die (it fails because the socket is still in
  time_wait at the time of the bind() call)
o Allow AFS to be recompiled outside of AFS (less @sys dependency)
o Added options to compile w/o memcache or rmtsys code (saves a lot of space)
o Use the user's umask more in the utilities... (install, rcsmkdir, ...)
o Fixed an instance where user's could create suid/sgid files (the
  fileserver prohibits it in all cases except one common one).


91/12/30   ./afs/RCS/afs_cache.c,v;  1.2
Allow compilation without memcache code
Make sure we do not overflow the cache partition
Added another standard error message (access denied)

91/12/30   ./afs/RCS/afs_nfssrv.c,v;  1.2
Allow compilation on VFS 3.0 systems

91/12/30   ./afs/RCS/afs_osi.c,v;  1.2
binval() takes a gnode under ultrix 4.0

91/12/30   ./afs/RCS/afs_memcache.c,v;  1.2
Allow compilation without memcache code

91/12/30   ./afs/RCS/afs_osinet.c,v;  1.2
stack checking applies to all DECstation Ultrix systems

91/12/30   ./afs/RCS/afs_physio.c,v;  1.2
Allow compilation without memcache code

91/12/30   ./afs/RCS/afs_stats.h,v;  1.2
Allow compilation without stats

91/12/30   ./afs/RCS/afs_resource.c,v;  1.2
Added subnet biasing
Changed a few print statements
Reset the time server if the server goes down
Allow compilation without memcache code

91/12/30   ./afs/RCS/afs_vnodeops.c,v;  1.2
Allow compilation without memcache code
Changed NFS mode mapping semantics for Athena
Use FIXUPSTUPIDINODE() routine rather than hardcoding...

91/12/30   ./afsd/RCS/afsd.c,v;  1.2
mtab handling also applies to vax_bsd43

91/12/30   ./auth/RCS/auth.p.h,v;  1.2
Changed the AFS superuser, because we have a user "afs"

91/12/30   ./auth/RCS/cellconfig.c,v;  1.2
Make cell comparisons case-insensitive, like the rest of AFS...

91/12/30   ./auth/RCS/userok.c,v;  1.2
Fix syntax error and improve local realm determination by caching it...

91/12/30   ./bozo/RCS/bosoprocs.c,v;  1.2
Relaxed the permissions a bit for the directory check
Be a bit more intelligent about indicating what is amiss
Open files with a bit more stringent permission

91/12/30   ./bubasics/RCS/butc.xg,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bubasics/RCS/tcdata.p.h,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/Makefile,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/bc.h,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/commands.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/config.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/dsstub.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/dsvs.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/dump.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/main.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/restore.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./bucoord/RCS/volstub.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./butc/RCS/lwps.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./butc/RCS/tcmain.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./butc/RCS/tcprocs.c,v;  1.2
Athena enhancements (-dbdir, -cell)

91/12/30   ./cmd/RCS/cmd.c,v;  1.2
Missing quote

91/12/30   ./comerr/RCS/compile_et.c,v;  1.2
Some systems require sys/types.h

91/12/30   ./config/RCS/Makefile,v;  1.2
Install param.h files also as param.${SYS_NAME}
Fixed xprt.both dependency list

91/12/30   ./config/RCS/param.rt_aos4,v;  1.2
Athena configuration

91/12/30   ./config/RCS/param.pmax_ul4,v;  1.2
Athena configuration

91/12/30   ./config/RCS/param.rs_aix31,v;  1.2
Athena configuration

91/12/30   ./config/RCS/param.vax_bsd43,v;  1.2
Athena configuration

92/01/01   ./libafs/RCS/MakefileProto,v;  1.2
Don't require afs.ext to have been built perfectly
The translator afs.ext requires DES library
Removed -g and -DAFSDEBUG

92/01/01   ./lwp/RCS/iomgr.c,v;  1.2
Include sys/types.h (so more systems can compile code - A/UX)

92/01/01   ./lwp/RCS/fasttime.c,v;  1.2
A/UX patches

92/01/01   ./lwp/RCS/process.s,v;  1.2
Added A/UX 2.0 support

91/12/30   ./pinstall/RCS/install.c,v;  1.2
Added code to support A/UX
Create directories according to user's umask

92/01/01   ./ptserver/RCS/ptutils.c,v;  1.2
Don't deny system administrators group creation

91/12/30   ./ptserver/RCS/testpt.c,v;  1.2
Include afs/param.h
Wrong name "testpr" vs. "testpt"

91/12/30   ./rx/RCS/rx_user.c,v;  1.2
Retry the bind() a few times, in case we are in time_wait on the port.

92/01/01   ./rxgen/RCS/rpc_main.c,v;  1.2
Include sys/types.h (A/UX needs it)

92/01/01   ./sys/RCS/ilib.s,v;  1.2
Added A/UX support

92/01/01   ./sys/RCS/rmtsysc.c,v;  1.2
Allow compilation without rmtsys code

92/01/01   ./sys/RCS/pioctl.s,v;  1.2
Added A/UX support

92/01/01   ./sys/RCS/setpag.s,v;  1.2
Added A/UX support

91/12/30   ./tools/RCS/washtool.c,v;  1.2
Allow the RCS directory to actually be a directory
Relax the permissions of the mkdir to use the user's umask
Don't try to print out the bad SYS_NAME (probably unprintable).
Allow compilation outside of AFS (don't rely on @sys indirection)

92/01/01   ./util/RCS/malloc.c,v;  1.2
A/UX support added

92/01/01   ./util/RCS/vice.h,v;  1.2
A/UX support added

92/01/01   ./util/RCS/strtol.c,v;  1.2
Added strtol() [strtol.c] for systems that lack it.

92/01/01   ./util/RCS/Makefile,v;  1.2
Added strtol() [strtol.c] for systems that lack it.

91/12/30   ./venus/RCS/fs.c,v;  1.2
Better -cell handling
Better use of exit values (don't return status 0, if there were errors)
Changed various print statements to use pn[], not explicitly "fs"

91/12/30   ./viced/RCS/Makefile,v;  1.2
Build/install fileserver.group

91/12/30   ./viced/RCS/afsfileprocs.c,v;  1.2
Don't allow regular user's to create suid/sgid files
(their afs id might not be their unix id)

92/01/01   ./volser/RCS/Makefile,v;  1.2
Also install vos in bin (a lot of users seem to use it)

91/12/30   ./wash/RCS/rcsmkdir.c,v;  1.2
Create directories according to user's umask

91/12/30   ./RCS/Makefile,v;  1.2
Added "athena" rule
Improved vfsckaix31 rule to look for bos directory
Fixed various dependencies


RCS file: ./afs/RCS/afs_cache.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_cache.c
*** /tmp/,RCSt1kY4D4w	Wed Jan  1 13:15:10 1992
--- ./afs/afs_cache.c	Mon Dec 30 09:30:42 1991
***************
*** 132,137 ****
--- 132,138 ----
      static char netproblems[] = "network problems";
      static char partfull[]    = "partition full";
      static char overquota[]   = "over quota";
+     static char accessdenied[]= "access denied";
      static char unknownerr[]  = "unknown error";
  
      AFS_STATCNT(afs_StoreWarn);
***************
*** 164,169 ****
--- 165,180 ----
          if (aflags & 2)
              uprintf(problem_fmt, avolume, overquota);
      }
+     else
+     if (acode == EACCES) {
+         /*
+          * Access denied
+          */
+         if (aflags & 1)
+             printf(problem_fmt, avolume, accessdenied);
+         if (aflags & 2)
+             uprintf(problem_fmt, avolume, accessdenied);
+     }
      else {
          /*
           * Unknown error
***************
*** 351,356 ****
--- 362,370 ----
          aDentries = DDSIZE;
      
      if(aflags & AFSCALL_INIT_MEMCACHE) {
+ #ifdef AFS_NOMEMCACHE
+         return 1;
+ #else
          /*
           * Use a memory cache instead of a disk cache
           */
***************
*** 361,366 ****
--- 375,381 ----
          /* ablocks is reported in 1K blocks */
          afs_InitMemCache(afiles * AFS_FIRSTCSIZE, AFS_FIRSTCSIZE);
          printf("allocating %d dcache entries...", aDentries);
+ #endif
      }
  
      /* initialize hash tables */
***************
*** 1915,1921 ****
--- 1930,1940 ----
        case AFS_FCACHE_TYPE_UFS:
          return UFS_CacheStoreProc(acall, afile, adc->f.chunkBytes, avc);
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CacheStoreProc: Memory cache file type not supported");
+ #else
          return afs_MemCacheStoreProc(acall, afile, adc, avc);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CacheStoreProc: NFS cache file type not supported");
***************
*** 2024,2030 ****
--- 2043,2053 ----
        case AFS_FCACHE_TYPE_UFS:
          return UFS_CacheFetchProc(acall, afile, abase, adc);
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CacheFetchProc: Memory cache file type not supported");
+ #else
          return afs_MemCacheFetchProc(acall, afile, abase, adc);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CacheFetchProc: NFS cache file type not supported");
***************
*** 2329,2334 ****
--- 2352,2358 ----
              size = avc->m.Length;
              if (size > tdc->f.chunkBytes) {
                  /* pre-reserve space for file */
+                 afs_CheckSize((size - tdc->f.chunkBytes)>>10);
                  afs_AdjustSize(tdc, size);
              }
              size = 999999999;       /* max size for transfer */
***************
*** 2341,2346 ****
--- 2365,2371 ----
              if (size < 0) size = 0; /* Handle random races */
              if (size > tdc->f.chunkBytes) {
                  /* pre-reserve space for file */
+                 afs_CheckSize((size - tdc->f.chunkBytes)>>10);
                  afs_AdjustSize(tdc, size);      /* changes chunkBytes */
                  /* max size for transfer still in size */
              }
***************
*** 2433,2438 ****
--- 2458,2465 ----
  
          /* otherwise we copy in the just-fetched info */
          osi_Close(file);
+         if (size > tdc->f.chunkBytes)
+             afs_CheckSize((size - tdc->f.chunkBytes)>>10);
          afs_AdjustSize(tdc, size);  /* new size */
          /*
           * Copy appropriate fields into vcache
***************
*** 2925,2931 ****
--- 2952,2962 ----
          break;
  
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_GetDSlot: Memory cache file type not supported");
+ #else
          return afs_MemGetDSlot(aslot, tmpdc);
+ #endif
          break;
  
        case AFS_FCACHE_TYPE_NFS:
***************
*** 3805,3810 ****
--- 3836,3844 ----
          tfile = osi_UFSOpen(&cacheDev, fce->inode);
          break;
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CFileOpen: Memory cache file type not supported");
+ #else
          tfile = (struct osi_file *)osi_Alloc(sizeof(struct osi_file));
          /* XXX initialize this vnode! */
          tfile->vnode = (struct vnode *)0;
***************
*** 3811,3816 ****
--- 3845,3851 ----
          tfile->offset = 0;
          tfile->proc = (int (*)()) 0;
          break;
+ #endif
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CFileOpen: NFS cache file type not supported");
          break;
***************
*** 3861,3867 ****
--- 3896,3906 ----
          osi_Close(tfile);
          break;
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CFileTruncate: Memory cache file type not supported");
+ #else
          afs_MemCacheTruncate(fce->inode, size);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CFileTruncate: NFS cache file type not supported");
***************
*** 3922,3928 ****
--- 3961,3971 ----
          break;
  
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CFileOpen: Memory cache file type not supported");
+ #else
          /* no-op for memory cache */
+ #endif
          break;
  
        case AFS_FCACHE_TYPE_NFS:
===================================================================
RCS file: ./afs/RCS/afs_nfssrv.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_nfssrv.c
*** /tmp/,RCSt1kY4HFm	Wed Jan  1 13:15:15 1992
--- ./afs/afs_nfssrv.c	Mon Dec 30 11:01:46 1991
***************
*** 37,43 ****
--- 37,45 ----
  #include "../afs/afsincludes.h" /* Afs-based standard headers */
  
  
+ #ifdef NFSDEBUG
  extern int nfs_debug;
+ #endif
  
  /* Temporary only! */
  #if     defined(AFS_VFS40) || defined(AFS_AIX31_ENV)
***************
*** 241,250 ****
--- 243,257 ----
          /* afs_rfs_rddirfree examines this, so make sure it's always set */
          rd->rd_offlist = 0;
  #ifdef  NFSDEBUG
+ #ifdef AFS_VFS30
+         dprint(nfsdebug, 4, "afs_rfs_readdir fh %x %d count %d\n",
+             rda->rda_fh.fh_fsid, rda->rda_fh.fh_len, rda->rda_count);
+ #else
          dprint(nfsdebug, 4, "afs_rfs_readdir fh %x %x %d count %d\n",
              rda->rda_fh.fh_fsid.val[0], rda->rda_fh.fh_fsid.val[1],
              rda->rda_fh.fh_len, rda->rda_count);
  #endif
+ #endif
          vp = fhtovp(&rda->rda_fh);
          if (vp == NULL) {
                  rd->rd_entries = NULL;
***************
*** 279,285 ****
--- 286,305 ----
          iov.iov_len = rda->rda_count;
          uio.uio_iov = &iov;
          uio.uio_iovcnt = 1;
+ #if defined(sys_vax_bsd43) || defined(sys_rt_aos4)
+         /*
+          * BSD 4.3 and derivatives
+          *
+          * Excerpt from sys/h/uio.h from the RT AOS 4 release,
+          * with the comment characters removed:
+          * 
+          * #define uio_seg uio_segflg              4.2 - obsolete
+          */
+         uio.uio_segflg = AFS_UIOSYS;
+ #else
+         /* BSD 4.2 and derivatives */
          uio.uio_seg = AFS_UIOSYS;
+ #endif
          uio.uio_offset = rda->rda_offset;
          uio.uio_resid = rda->rda_count;
          /*
***************
*** 322,328 ****
--- 342,350 ----
                      printf("rfs_readdir: null inode\n");
                      break;
                  }
+ #ifdef NFSDEBUG
                  if (nfs_debug) printf("rfs_readdir(ROOT=%x -> %d\n", dp->d_ino, ip->i_number);
+ #endif
                  dp->d_ino = ip->i_number;
                  break;
              }
***************
*** 388,393 ****
--- 410,417 ----
  #define IFCHR           0020000         /* character special */
  #define IFBLK           0060000         /* block special */
  #define IFSOCK          0140000         /* socket */
+ 
+ #ifndef AFS_VFS30
          if ((va.va_mode & IFMT) == IFCHR) {
                  va.va_type = VCHR;
                  if (va.va_size == (u_long)NFS_FIFO_DEV)
***************
*** 406,411 ****
--- 430,442 ----
          } else {
                  va.va_type = VREG;
          }
+ #else
+         /*
+          * Sun's VFS 3.0 does not support anything other file types, and
+          * they make everything appear as a file
+          */
+         va.va_type = VREG;
+ #endif
  
          /*
           * XXX - Should get exclusive flag and use it.
***************
*** 581,587 ****
--- 612,620 ----
          /* Currently only supporting the latest release (rel 2) */
          return NULL;
      }
+ #ifdef NFSDEBUG
      if (nfs_debug & 2) printf("Nfs2AfsC: which=%d\n", which);
+ #endif
      switch (which) {
          case RFS_GETATTR:
              fhp1 = (fhandle_t *) args;
***************
*** 684,689 ****
--- 717,726 ----
      /* 
       * Ok it's mounted; let's see if it is destined for "/afs"
       */
+ #ifdef AFS_VFS30
+     return(fhp1->fh_fsid == 1 ||
+            fhp2 && fhp2->fh_fsid == 1);
+ #else /* !AFS_VFS30 */    
  #if defined(AFS_HPUX_ENV)
      if ((fhp1->fh_fsid[0] == AFS_VFSMAGIC) && (fhp1->fh_fsid[1] == AFS_VFSFSID)) 
  #else /* defined(AFS_HPUX_ENV) */
***************
*** 690,696 ****
--- 727,735 ----
      if ((fhp1->fh_fsid.val[0] == AFS_VFSMAGIC) && (fhp1->fh_fsid.val[1] == AFS_VFSFSID)) 
  #endif /* defined(AFS_HPUX_ENV) */
          return 1;           /* Ok, seems to be destined for afs */      
+ #ifdef NFSDEBUG
      if (nfs_debug & 2) printf("Nfs2AfsC-4: No first; second?(%x)\n", fhp2);
+ #endif
      if (!fhp2) return NULL;
       /* Else see if the second vnode (in the cases of rename and link) is an afs one */
  #if defined(AFS_HPUX_ENV)
***************
*** 700,705 ****
--- 739,745 ----
  #endif /* defined(AFS_HPUX_ENV) */
          return 1;           /* Ok, seems to be destined for afs */      
      return NULL;
+ #endif /* !AFS_VFS30 */
  }
  #endif  AFS
  
***************
*** 948,954 ****
--- 988,996 ----
                      struct afs_exporter *outexporter;
                      long dummypag;
  
+ #ifdef NFSDEBUG
                      if (nfs_debug & 2) printf("dispatcher: AFSC(host=%x)\n", xprt->xp_raddr.sin_addr.s_addr);
+ #endif
                      if (afs_nfsclient_reqhandler((struct afs_exporter *)0, &newcr, xprt->xp_raddr.sin_addr.s_addr, &dummypag, &outexporter)) {
                          error++;
                          goto done;
***************
*** 956,962 ****
--- 998,1006 ----
                      EXP_RELE(outexporter);
                  } else
                      afs_nfscalls++;
+ #ifdef NFSDEBUG
                  if (nfs_debug & 2) printf("dispatcher: After!\n");
+ #endif
          }
  #endif  AFS
          /*
***************
*** 1343,1349 ****
           * Save the current directory and restore it again when
           * the call terminates.  rfs_lookup uses u.u_cdir for lookupname.
           */
! #if     defined(AFS_IBM_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_NEXT_ENV)
          rdir = u.u_rdir;
          cdir = u.u_cdir;
          if (u.u_rdir == (struct vnode *)0) {
--- 1387,1393 ----
           * Save the current directory and restore it again when
           * the call terminates.  rfs_lookup uses u.u_cdir for lookupname.
           */
! #if     defined(AFS_IBM_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_NEXT_ENV) || defined(AFS_VFS30)
          rdir = u.u_rdir;
          cdir = u.u_cdir;
          if (u.u_rdir == (struct vnode *)0) {
***************
*** 1415,1421 ****
  #endif
          }
  #ifndef AFS_VFS40
! #if     defined(AFS_IBM_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV)
          u.u_rdir = rdir;
          u.u_cdir = cdir;
  #else
--- 1459,1465 ----
  #endif
          }
  #ifndef AFS_VFS40
! #if     defined(AFS_IBM_ENV) || defined(AFS_AIX_ENV) || defined(AFS_SUN_ENV) || defined(AFS_HPUX_ENV) || defined(AFS_VFS30)
          u.u_rdir = rdir;
          u.u_cdir = cdir;
  #else
===================================================================
RCS file: ./afs/RCS/afs_osi.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_osi.c
*** /tmp/,RCSt1kY4J44	Wed Jan  1 13:15:17 1992
--- ./afs/afs_osi.c	Mon Dec 30 11:00:22 1991
***************
*** 20,25 ****
--- 20,31 ----
  static struct osimem *memlist;
  #endif
  
+ #ifdef AFS_ULTRIX_40
+ struct gnode *afs_vntogn();
+ #else
+ #define afs_vntogn(x) x
+ #endif
+ 
  struct osimem {
      struct osimem *next;
  #ifdef AFSDEBMEM
***************
*** 213,219 ****
      /* next do the stuff that need not check for deadlock problems */
  #ifdef  AFS_GFS_ENV
  /*    xinval((struct gnode *) vp); */
!     binval(NODEV, (struct gnode *)vp);
  #else
      mpurge(vp);
  #endif
--- 219,225 ----
      /* next do the stuff that need not check for deadlock problems */
  #ifdef  AFS_GFS_ENV
  /*    xinval((struct gnode *) vp); */
!     binval(NODEV, (struct gnode *)afs_vntogn(vp));
  #else
      mpurge(vp);
  #endif
===================================================================
RCS file: ./afs/RCS/afs_memcache.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_memcache.c
*** /tmp/,RCSt1kY4P5A	Wed Jan  1 13:15:18 1992
--- ./afs/afs_memcache.c	Mon Dec 30 09:27:04 1991
***************
*** 5,10 ****
--- 5,12 ----
   */
  
  #include "../afs/param.h"       /* Should be always first */
+ 
+ #ifndef AFS_NOMEMCACHE
  #include "../afs/sysincludes.h" /* Standard vendor system headers */
  #include "../rpc/types.h"
  #include "../afs/afsincludes.h" /* Afs-based standard headers */
***************
*** 299,301 ****
--- 301,305 ----
        osi_FreeSendSpace(tbuffer);
        return 0;
    }
+ 
+ #endif /* !AFS_NOMEMCACHE */
===================================================================
RCS file: ./afs/RCS/afs_osinet.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_osinet.c
*** /tmp/,RCSt1kY4RqJ	Wed Jan  1 13:15:18 1992
--- ./afs/afs_osinet.c	Mon Dec 30 11:00:41 1991
***************
*** 70,76 ****
      char tx;
  
      AFS_STATCNT(osi_CloseToTheEdge);
! #if defined(sys_pmax_ul3) || defined(sys_pmax_ul31d)
      if (((unsigned long) &tx) < osi_cttev) {
          osi_cttes++;
          return 1;
--- 70,76 ----
      char tx;
  
      AFS_STATCNT(osi_CloseToTheEdge);
! #if defined(mips) && defined(ultrix)
      if (((unsigned long) &tx) < osi_cttev) {
          osi_cttes++;
          return 1;
===================================================================
RCS file: ./afs/RCS/afs_physio.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_physio.c
*** /tmp/,RCSt1kY4Uda	Wed Jan  1 13:15:20 1992
--- ./afs/afs_physio.c	Mon Dec 30 09:27:06 1991
***************
*** 1,8 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/afs/RCS/afs_physio.c,v 1.1 91/12/23 17:00:15 probe Exp $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/afs/RCS/afs_physio.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/afs/RCS/afs_physio.c,v 1.1 91/12/23 17:00:15 probe Exp $";
  #endif
  
  /* Copyright (C) 1989 Transarc Corporation - All rights reserved */
--- 1,8 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/afs/RCS/afs_physio.c,v 1.2 91/12/30 09:27:04 probe Exp $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/afs/RCS/afs_physio.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/afs/RCS/afs_physio.c,v 1.2 91/12/30 09:27:04 probe Exp $";
  #endif
  
  /* Copyright (C) 1989 Transarc Corporation - All rights reserved */
***************
*** 49,56 ****
--- 49,60 ----
          osi_Close(tf);
          break;
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CFileOpen: Memory cache file type not supported");
+ #else
          code = afs_MemReadBlk(fid[0], block * AFS_PHYSIO_PAGESIZE,
                                data, AFS_PHYSIO_PAGESIZE);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CFileOpen: NFS cache file type not supported");
***************
*** 84,91 ****
--- 88,99 ----
          osi_Close(tf);
          break;
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_CFileOpen: Memory cache file type not supported");
+ #else
          code = afs_MemWriteBlk(fid[0], block * AFS_PHYSIO_PAGESIZE,
                                 data, AFS_PHYSIO_PAGESIZE);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_CFileOpen: NFS cache file type not supported");
===================================================================
RCS file: ./afs/RCS/afs_stats.h,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_stats.h
*** /tmp/,RCSt1kY4a3H	Wed Jan  1 13:15:20 1992
--- ./afs/afs_stats.h	Mon Dec 30 11:01:16 1991
***************
*** 12,21 ****
  
  #include "../afs/param.h"
  
- #undef AFS_NOSTATS
- 
  /* the following is to work around a VAX compiler limitation */
! #if defined(AFS_DEC_ENV) && !defined(AFS_DECMIPS_30)
  #define AFS_NOSTATS
  #endif /* VAX environment */
  
--- 12,19 ----
  
  #include "../afs/param.h"
  
  /* the following is to work around a VAX compiler limitation */
! #if defined(AFS_DEC_ENV) && !defined(AFS_DECMIPS_30) && !defined(AFS_NOSTATS)
  #define AFS_NOSTATS
  #endif /* VAX environment */
  
===================================================================
RCS file: ./afs/RCS/afs_daemons.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_daemons.c
No differences encountered
===================================================================
RCS file: ./afs/RCS/afs_resource.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_resource.c
*** /tmp/,RCSt1kY4j8m	Wed Jan  1 13:15:22 1992
--- ./afs/afs_resource.c	Mon Dec 30 10:31:55 1991
***************
*** 11,22 ****
  #include "../afs/afsincludes.h" /* Afs-based standard headers */
  #include "../afs/afs_stats.h"   /* afs statistics */
  
  /* shouldn't do it this way, but for now will do */
  #ifndef ERROR_TABLE_BASE_u
  #define ERROR_TABLE_BASE_u      (5376L)
  #endif /* ubik error base define */
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/afs/RCS/afs_resource.c,v 1.1 91/12/23 17:00:17 probe Exp $")
  
  /* This file contains routines used for dealing with users, volumes, cells
   * and connections.  They are related, unfortunately, as follows:
--- 11,27 ----
  #include "../afs/afsincludes.h" /* Afs-based standard headers */
  #include "../afs/afs_stats.h"   /* afs statistics */
  
+ #ifdef AFS_PREFER_LOCAL
+ #include "../net/if.h"
+ #include "../netinet/in_var.h"
+ #endif
+ 
  /* shouldn't do it this way, but for now will do */
  #ifndef ERROR_TABLE_BASE_u
  #define ERROR_TABLE_BASE_u      (5376L)
  #endif /* ubik error base define */
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/afs/RCS/afs_resource.c,v 1.2 91/12/30 09:28:10 probe Exp $")
  
  /* This file contains routines used for dealing with users, volumes, cells
   * and connections.  They are related, unfortunately, as follows:
***************
*** 212,219 ****
                  if (tu->ct.EndTimestamp < now) {
                      /* this token has expired, warn users and reset access cache */
                      tcell = afs_GetCell(tu->cell);
!                     printf("afs: Tokens for user of AFS id %d for cell %s expired now\n",
!                            tu->vid, tcell->cellName);
                      tu->states |= (UTokensBad | UNeedsReset);
                  }
              }
--- 217,230 ----
                  if (tu->ct.EndTimestamp < now) {
                      /* this token has expired, warn users and reset access cache */
                      tcell = afs_GetCell(tu->cell);
! #ifndef AFS_ATHENA_ENV
!                     /* This shouldn't be broadcast to the console or to
!                      * other people, and it won't necessarily get to the
!                      * person for whom the tokens have expired.
!                      */
!                     printf("afs: Tokens for user %d (AFS id %d) for cell %s expired now\n",
!                            tu->uid, tu->vid, tcell->cellName);
! #endif
                      tu->states |= (UTokensBad | UNeedsReset);
                  }
              }
***************
*** 348,354 ****
  struct volume *afs_GetVolSlot()
    {
        extern int cacheDiskType;
!       struct volume *afs_UFSGetVolSlot(), *afs_MemGetVolSlot();
  
        AFS_STATCNT(afs_GetVolSlot);
        switch(cacheDiskType) {
--- 359,368 ----
  struct volume *afs_GetVolSlot()
    {
        extern int cacheDiskType;
!       struct volume *afs_UFSGetVolSlot();
! #ifndef AFS_NOMEMCACHE
!       struct volume *afs_MemGetVolSlot();
! #endif
  
        AFS_STATCNT(afs_GetVolSlot);
        switch(cacheDiskType) {
***************
*** 356,362 ****
--- 370,380 ----
            return afs_UFSGetVolSlot();
            break;
          case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+           panic("afs_CFileOpen: Memory cache file type not supported");
+ #else
            return afs_MemGetVolSlot();
+ #endif
            break;
          case AFS_FCACHE_TYPE_NFS:
            panic("afs_CFileOpen: NFS cache file type not supported");
***************
*** 427,432 ****
--- 445,451 ----
      return tv;
  }
  
+ #ifndef AFS_NOMEMCACHE
  struct volume *afs_MemGetVolSlot() {
      register struct volume *tv, **lv;
      register long i;
***************
*** 446,451 ****
--- 465,471 ----
      afs_freeVolList = tv->next;
      return tv;
  }
+ #endif /* !AFS_NOMEMCACHE */
  
  /* reset volume name to volume id mapping cache */
  afs_CheckVolumeNames() {
***************
*** 506,511 ****
--- 526,535 ----
      else
          print_internet_address("afs: Lost contact with file server ", aserver, "\n");
      aserver->isDown = 1;
+ 
+     /* If this was our time-server, search for another time-server */
+     if (aserver->host == afs_setTimeHost)
+         afs_setTimeHost = 0;
  }
  
  /* return true if we have any callback promises from this server */
***************
*** 587,592 ****
--- 611,632 ----
               */
              if (acellp && acellp != ts->cell) continue;
  
+ #ifdef AFS_ATHENA_ENV
+             /* If we are checking "all" servers, our remote-cell checks
+              * skip those servers which we believe are still up and from
+              * which there are no active callbacks.
+              *
+              * In afs_daemons.c, we cannot simply check the local cell
+              * every 10 minutes because of the synchronization problems
+              * that may occur with servers in a remote cell.
+              * [Synchronization and Caching Issues in the Andrew File System,
+              * Mike Kazar, Winter 1988/Dallas Usenix Proceedings, p.31-43]
+              */
+             if (!acellp &&
+                 ts->cell->cell != 1 && !ts->isDown && !HaveCallBacksFrom(ts))
+                 continue;
+ #endif
+             
              /* see if this server is the type we're checking this time */
              if (adown != ts->isDown) continue;
              /* check vlserver with special code */
***************
*** 614,622 ****
                      and the time is really different, then really set the time */
                  if (code == 0 && start == end && afs_setTime != 0 &&
                      (tc->server->host == afs_setTimeHost ||
!                      /* sync only to a server in the local cell: cell(id)==1 or CPrimary. */
!                      (afs_setTimeHost == 0 &&
!                       (ts->cell->cell == 1 || (ts->cell->states&CPrimary))))) {
                      char msgbuf[90];    /* strlen("afs: setting clock...") + slop */
                      /* set the time */
                      delta = end - tv.tv_sec;   /* how many secs fast we are */
--- 654,661 ----
                      and the time is really different, then really set the time */
                  if (code == 0 && start == end && afs_setTime != 0 &&
                      (tc->server->host == afs_setTimeHost ||
!                      /* sync only to a server in the local cell: cell(id)==1 */
!                      (afs_setTimeHost == 0 && ts->cell->cell == 1))) {
                      char msgbuf[90];    /* strlen("afs: setting clock...") + slop */
                      /* set the time */
                      delta = end - tv.tv_sec;   /* how many secs fast we are */
***************
*** 1336,1341 ****
--- 1375,1385 ----
      register long aserver; {
      register struct server *ts;
      register int i;
+ #ifdef AFS_PREFER_LOCAL
+     register u_long as = ntohl(aserver);
+     register struct ifnet *in;
+ #endif
+     
      AFS_STATCNT(afs_GetServer);
      i = SHash(aserver);
      ObtainSharedLock(&afs_xserver);
***************
*** 1355,1360 ****
--- 1399,1431 ----
      /* compute random value for funny sorting */
      afs_servers[i] = ts;
      ts->random = afs_random();
+ #ifdef AFS_PREFER_LOCAL
+     /*
+      * Bias the order so that servers on the local subnets are preferred.
+      *
+      * Written by Richard Basch/MIT
+      * Copyright (c) 1991 by the Massachusetts Institute of Technology.
+      *
+      * Permission to use, copy, modify, and distribute this software and its
+      * documentation for any purpose and without fee is hereby granted,
+      * provided that the above copyright notice appear in all copies and that
+      * both that copyright notice and this permission notice appear in
+      * supporting documentation, and that the name of M.I.T. not be used in
+      * advertising or publicity pertaining to distribution of the software
+      * without specific, written prior permission.  M.I.T. makes no
+      * representations about the suitability of this software for any
+      * purpose.  It is provided "as is" without express or implied warranty.
+      */
+     ts->random |= 0x4000;                       /* Set the high bit */
+     for (in = ifnet; in; in=in->if_next) {
+         register struct in_ifaddr *ia = (struct in_ifaddr *)in->if_addrlist;
+         if ((in->if_flags & IFF_UP) &&
+             (as & ia->ia_subnetmask) == ia->ia_subnet) {
+                 ts->random &= 0x3fff;           /* Local: clear high bits */
+                 break;                          /* No need to check more */
+         }
+     }
+ #endif
      ReleaseWriteLock(&afs_xserver);
      return ts;
  }
***************
*** 1553,1559 ****
          tu = afs_FindUser(areq->uid, tsp->cell->cell);
  #ifndef AFS_NEXT_ENV
          if (tu) {
!             uprintf("afs: Tokens for user of AFS id %d for cell %s have expired\n", tu->vid, aconn->server->cell->cellName);
          }
          else /* The else case shouldn't be possible and should probably be replaced by a panic? */
              uprintf("afs: Tokens for user %d for cell %s have expired\n", areq->uid, aconn->server->cell->cellName);
--- 1624,1631 ----
          tu = afs_FindUser(areq->uid, tsp->cell->cell);
  #ifndef AFS_NEXT_ENV
          if (tu) {
!             uprintf("afs: Tokens for user %d (AFS id %d) for cell %s have expired\n",
!                     areq->uid, tu->vid, aconn->server->cell->cellName);
          }
          else /* The else case shouldn't be possible and should probably be replaced by a panic? */
              uprintf("afs: Tokens for user %d for cell %s have expired\n", areq->uid, aconn->server->cell->cellName);
===================================================================
RCS file: ./afs/RCS/afs_vnodeops.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afs/afs_vnodeops.c
*** /tmp/,RCSt1kY4mHT	Wed Jan  1 13:15:26 1992
--- ./afs/afs_vnodeops.c	Mon Dec 30 10:33:42 1991
***************
*** 83,89 ****
  #endif
  int afs_bread();
  int afs_brelse();
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_ENV)
  int afs_fid();
  #endif
  #ifdef  AFS_MACH_ENV
--- 83,89 ----
  #endif
  int afs_bread();
  int afs_brelse();
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_BSD)
  int afs_fid();
  #endif
  #ifdef  AFS_MACH_ENV
***************
*** 199,205 ****
  #ifdef  AFS_HPUX_ENV
          afs_lockf,      /* lockf */
  #endif  AFS_HPUX_ENV
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_ENV)
          afs_fid,
  #else
          afs_badop,      /* fid */
--- 199,205 ----
  #ifdef  AFS_HPUX_ENV
          afs_lockf,      /* lockf */
  #endif  AFS_HPUX_ENV
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_BSD)
          afs_fid,
  #else
          afs_badop,      /* fid */
***************
*** 1039,1044 ****
--- 1039,1047 ----
          else if (code == EDQUOT) {
              uprintf("afs: failed to store file (over quota)\n");
          }
+         else if (code == EACCES) {
+             uprintf("afs: failed to store file (access denied)\n");
+         }
          else if (code != 0) uprintf("afs: failed to store file (%d)\n", code);
  #endif
  
***************
*** 1068,1088 ****
              code = afs_UFSWrite(avc, auio, aio, acred);
              break;
            case AFS_FCACHE_TYPE_MEM:
              code = afs_MemWrite(avc, auio, aio, acred);
              break;
            case AFS_FCACHE_TYPE_NFS:
!             panic("afs_afs_write: NFS cache file type not supported");
              break;
            case AFS_FCACHE_TYPE_EPI:
!             panic("afs_afs_write: Episode cache file type not supported");
              break;
            default:
!             panic("afs_afs_write: unknown cache file type");
              break;
          }
          return code;
      }
  
  afs_MemWrite(avc, auio, aio, acred)
      register struct vcache *avc;
      struct uio *auio;
--- 1071,1096 ----
              code = afs_UFSWrite(avc, auio, aio, acred);
              break;
            case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+             panic("afs_write: Memory cache file type not supported");
+ #else
              code = afs_MemWrite(avc, auio, aio, acred);
+ #endif
              break;
            case AFS_FCACHE_TYPE_NFS:
!             panic("afs_write: NFS cache file type not supported");
              break;
            case AFS_FCACHE_TYPE_EPI:
!             panic("afs_write: Episode cache file type not supported");
              break;
            default:
!             panic("afs_write: unknown cache file type");
              break;
          }
          return code;
      }
  
+ #ifndef AFS_NOMEMCACHE
  afs_MemWrite(avc, auio, aio, acred)
      register struct vcache *avc;
      struct uio *auio;
***************
*** 1193,1198 ****
--- 1201,1207 ----
  #endif
      return afs_CheckCode(error, &treq);
  }
+ #endif /* !AFS_NOMEMCACHE */
      
  /* called on writes */
  afs_UFSWrite(avc, auio, aio, acred)
***************
*** 1379,1385 ****
--- 1388,1398 ----
          code = afs_UFSRead(avc, auio, acred, albn, abpp);
          break;
        case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+         panic("afs_read: Memory cache file type not supported");
+ #else
          code = afs_MemRead(avc, auio, acred, albn, abpp);
+ #endif
          break;
        case AFS_FCACHE_TYPE_NFS:
          panic("afs_read: NFS cache file type not supported");
***************
*** 1394,1399 ****
--- 1407,1413 ----
      return code;
  }
  
+ #ifndef AFS_NOMEMCACHE
  afs_MemRead(avc, auio, acred, albn, abpp)
      register struct vcache *avc;
      struct uio *auio;
***************
*** 1583,1588 ****
--- 1597,1603 ----
      osi_FreeSendSpace(tvec);
      return afs_CheckCode(error, &treq);
  }
+ #endif /* !AFS_NOMEMCACHE */
      
  /* called with the dcache entry triggering the fetch, the vcache entry involved,
   * and a vrequest for the read call.  Marks the dcache entry as having already
***************
*** 1860,1866 ****
          else attrs->va_nodeid = 2;
      }
      else attrs->va_nodeid = avc->fid.Fid.Vnode + (avc->fid.Fid.Volume << 16);
!     attrs->va_nodeid &= 0x7fffffff;     /* Saber C hates negative inode #s! */
      attrs->va_nlink = avc->m.LinkCount;
      attrs->va_size = avc->m.Length;
      attrs->va_blocksize = 8192;
--- 1875,1881 ----
          else attrs->va_nodeid = 2;
      }
      else attrs->va_nodeid = avc->fid.Fid.Vnode + (avc->fid.Fid.Volume << 16);
!     FIXUPSTUPIDINODE(attrs->va_nodeid);
      attrs->va_nlink = avc->m.LinkCount;
      attrs->va_size = avc->m.Length;
      attrs->va_blocksize = 8192;
***************
*** 1945,1952 ****
--- 1960,1982 ----
                   *  mode bits in the traditional way, which of course
                   *  loses with afs.
                   */
+ #if defined(AFS_ATHENA_ENV)
+                 /*
+                  * Athena change:
+                  *
+                  * The attribute test has been changed so that the read-bits
+                  * are enabled if the user has read access and the write bits
+                  * are enabled only when the user has write access.
+                  */
+                 if (afs_AccessOK(avc, PRSFS_WRITE, &treq))
                      ubits = (attrs->va_mode & 0700) >> 6;
+                 else
+                     ubits = (attrs->va_mode & 0500) >> 6;
+                 attrs->va_mode |= (ubits<<6)|(ubits<<3)|ubits;
+ #else
+                 ubits = (attrs->va_mode & 0700) >> 6;
                  attrs->va_mode = attrs->va_mode | ubits | (ubits << 3);
+ #endif /* AFS_ATHENA_ENV */
                  /* If it's the root of AFS, replace the inode number with the inode number of the mounted on directory; otherwise this confuses getwd()... */
                  if (avc->v.v_flag & VROOT) {
                      struct vnode *vp = (struct vnode *)avc;
***************
*** 3998,4004 ****
--- 4028,4038 ----
              code = afs_UFSHandleLink(avc, areq);
              break;
            case AFS_FCACHE_TYPE_MEM:
+ #ifdef AFS_NOMEMCACHE
+             panic("afs_HandleLink: Memory cache file type not supported");
+ #else
              code = afs_MemHandleLink(avc, areq);
+ #endif
              break;
            case AFS_FCACHE_TYPE_NFS:
              panic("afs_HandleLink: NFS cache file type not supported");
***************
*** 4013,4018 ****
--- 4047,4053 ----
          return code;
      }
  
+ #ifndef AFS_NOMEMCACHE
  afs_MemHandleLink(avc, areq)
       register struct vcache *avc;
       struct vrequest *areq;
***************
*** 4051,4056 ****
--- 4086,4092 ----
        }
        return 0;
    }
+ #endif /* !AFS_NOMEMCACHE */
  
  afs_UFSHandleLink(avc, areq)
      register struct vcache *avc;
***************
*** 4397,4403 ****
  #endif  AFS_VFS40
  
  int afs_fid_vnodeoverflow=0, afs_fid_uniqueoverflow=0;
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_ENV)
  afs_fid(avc, fidpp)
  struct vcache *avc;
  #ifdef  AFS_AIX_ENV
--- 4433,4439 ----
  #endif  AFS_VFS40
  
  int afs_fid_vnodeoverflow=0, afs_fid_uniqueoverflow=0;
! #if !defined(AFS_GFS_ENV) && !defined(AFS_ATHENA_BSD)
  afs_fid(avc, fidpp)
  struct vcache *avc;
  #ifdef  AFS_AIX_ENV
===================================================================
RCS file: ./afsd/RCS/afsd.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./afsd/afsd.c
*** /tmp/,RCSt1kY4rt3	Wed Jan  1 13:15:33 1992
--- ./afsd/afsd.c	Mon Dec 30 10:26:18 1991
***************
*** 78,84 ****
  #else
  #include <ufs/fsdir.h>
  #endif  /* AFS_HPUX_ENV */
! #ifdef AFS_IBM_ENV
  #include <mntent.h>
  #endif  /* AFS_IBM_ENV */
  #endif  /* AFS_VFS40 */
--- 78,84 ----
  #else
  #include <ufs/fsdir.h>
  #endif  /* AFS_HPUX_ENV */
! #if defined(AFS_IBM_ENV) || defined(sys_vax_bsd43)
  #include <mntent.h>
  #endif  /* AFS_IBM_ENV */
  #endif  /* AFS_VFS40 */
***************
*** 1047,1053 ****
  }
  
  static HandleMTab() {
! #if defined (AFS_VFS40) || defined (AFS_IBM_ENV)
      FILE *tfilep;
      struct mntent tmntent;
  
--- 1047,1053 ----
  }
  
  static HandleMTab() {
! #if defined (AFS_VFS40) || defined (AFS_IBM_ENV) || defined(sys_vax_bsd43)
      FILE *tfilep;
      struct mntent tmntent;
  
===================================================================
RCS file: ./auth/RCS/auth.p.h,v
retrieving revision 1.1
diff -btw -c -r1.1 ./auth/auth.p.h
*** /tmp/,RCSt1kY4uHk	Wed Jan  1 13:15:35 1992
--- ./auth/auth.p.h	Mon Dec 30 09:33:18 1991
***************
*** 5,11 ****
   * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
   */
  
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/auth/RCS/auth.p.h,v 1.1 91/12/23 17:00:26 probe Exp $ */
  
  #ifndef __AUTH_AFS_INCL_
  #define __AUTH_AFS_INCL_    1
--- 5,11 ----
   * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
   */
  
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/auth/RCS/auth.p.h,v 1.2 91/12/30 09:33:07 probe Exp $ */
  
  #ifndef __AUTH_AFS_INCL_
  #define __AUTH_AFS_INCL_    1
***************
*** 13,19 ****
  #include <rx/rxkad.h>                   /* to get ticket parameters/contents */
  
  /* super-user pincipal used by servers when talking to other servers */
! #define AUTH_SUPERUSER        "afs"
  
  struct ktc_token {
      long startTime;
--- 13,19 ----
  #include <rx/rxkad.h>                   /* to get ticket parameters/contents */
  
  /* super-user pincipal used by servers when talking to other servers */
! #define AUTH_SUPERUSER        "#afs.\001\003\010\n\004"
  
  struct ktc_token {
      long startTime;
===================================================================
RCS file: ./auth/RCS/cellconfig.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./auth/cellconfig.c
*** /tmp/,RCSt1kY4xFa	Wed Jan  1 13:15:35 1992
--- ./auth/cellconfig.c	Mon Dec 30 09:32:53 1991
***************
*** 333,339 ****
      bestce = (struct afsconf_entry *) 0;
      ambig = 0;
      for(tce=adir->entries;tce;tce=tce->next) {
!         if (strcmp(tce->cellInfo.name, tcell) == 0) {
              /* found our cell */
              bestce = tce;
              ambig = 0;
--- 333,339 ----
      bestce = (struct afsconf_entry *) 0;
      ambig = 0;
      for(tce=adir->entries;tce;tce=tce->next) {
!         if (strcasecmp(tce->cellInfo.name, tcell) == 0) {
              /* found our cell */
              bestce = tce;
              ambig = 0;
***************
*** 340,346 ****
              break;
          }
          if (strlen(tce->cellInfo.name) < cnLen) continue;   /* clearly wrong */
!         if (strncmp(tce->cellInfo.name, tcell, cnLen) == 0) {
              if (bestce) ambig = 1;  /* ambiguous unless we get exact match */
              bestce = tce;
          }
--- 340,346 ----
              break;
          }
          if (strlen(tce->cellInfo.name) < cnLen) continue;   /* clearly wrong */
!         if (strncasecmp(tce->cellInfo.name, tcell, cnLen) == 0) {
              if (bestce) ambig = 1;  /* ambiguous unless we get exact match */
              bestce = tce;
          }
===================================================================
RCS file: ./auth/RCS/userok.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./auth/userok.c
*** /tmp/,RCSt1kY42_C	Wed Jan  1 13:15:36 1992
--- ./auth/userok.c	Mon Dec 30 10:27:54 1991
***************
*** 6,11 ****
--- 6,14 ----
   */
  
  /* $Log:        userok.c,v $
+  * Revision 1.2  91/12/30  10:26:57  probe
+  * Fix syntax error and improve local realm determination by caching it...
+  * 
   * Revision 1.1  91/12/23  17:00:27  probe
   * Initial revision
   * 
***************
*** 41,47 ****
  #include "cellconfig.h"
  #include "keys.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/auth/RCS/userok.c,v 1.1 91/12/23 17:00:27 probe Exp $")
  
  afsconf_GetNoAuthFlag(adir)
  struct afsconf_dir *adir; {
--- 44,50 ----
  #include "cellconfig.h"
  #include "keys.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/auth/RCS/userok.c,v 1.2 91/12/30 10:26:57 probe Exp $")
  
  afsconf_GetNoAuthFlag(adir)
  struct afsconf_dir *adir; {
***************
*** 246,252 ****
          unsigned long exp;
          static char localcellname[MAXCELLCHARS] = "";
  #ifdef AFS_ATHENA_STDENV
!         char local_realm[REALM_SZ];
  #endif
          
          /* des tokens */
--- 249,255 ----
          unsigned long exp;
          static char localcellname[MAXCELLCHARS] = "";
  #ifdef AFS_ATHENA_STDENV
!         static char local_realm[REALM_SZ] = "";
  #endif
          
          /* des tokens */
***************
*** 259,268 ****
                  afsconf_GetLocalCell
                      (adir, localcellname, sizeof(localcellname));
  #ifdef AFS_ATHENA_STDENV
!             if (krb_get_lrealm(local_realm, 0) != KSUCCESS)
                  strncpy(local_realm, localcellname, REALM_SZ);
              if (strcasecmp(local_realm, tcell) &&
!                (strcasecmp(localcellname, tcell))
  #else
              if (strcasecmp(localcellname, tcell))
  #endif
--- 262,271 ----
                  afsconf_GetLocalCell
                      (adir, localcellname, sizeof(localcellname));
  #ifdef AFS_ATHENA_STDENV
!             if (!local_realm[0] && krb_get_lrealm(local_realm, 0) != KSUCCESS)
                  strncpy(local_realm, localcellname, REALM_SZ);
              if (strcasecmp(local_realm, tcell) &&
!                 strcasecmp(localcellname, tcell))
  #else
              if (strcasecmp(localcellname, tcell))
  #endif
===================================================================
RCS file: ./bozo/RCS/bosoprocs.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bozo/bosoprocs.c
*** /tmp/,RCSt1kY45Xv	Wed Jan  1 13:15:38 1992
--- ./bozo/bosoprocs.c	Mon Dec 30 09:35:32 1991
***************
*** 36,42 ****
  #include "bnode.h"
  #include "bosint.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bozo/RCS/bosoprocs.c,v 1.1 91/12/23 17:00:28 probe Exp $")
  
  extern struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  
--- 36,42 ----
  #include "bnode.h"
  #include "bosint.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/bozo/RCS/bosoprocs.c,v 1.2 91/12/30 09:33:43 probe Exp $")
  
  extern struct ktime bozo_nextRestartKT, bozo_nextDayKT;
  
***************
*** 217,223 ****
      /* open file */
      strcpy(tbuffer, aname);
      strcat(tbuffer, ".NEW");
!     fd = open(tbuffer, O_CREAT | O_RDWR | O_TRUNC, 0777);
      if (fd < 0) return errno;
      total = 0;
      while(1) {
--- 217,223 ----
      /* open file */
      strcpy(tbuffer, aname);
      strcat(tbuffer, ".NEW");
!     fd = open(tbuffer, O_CREAT | O_RDWR | O_TRUNC, 0755);
      if (fd < 0) return errno;
      total = 0;
      while(1) {
***************
*** 788,796 ****
      {"/usr/afs/etc", 1,1, 0755, 02},
      {"/usr/afs/bin", 1,1, 0755, 02},
      {"/usr/afs/logs", 1,1, 0755, 02},
!     {"/usr/afs/backup", 1,0, 0700, 07},
!     {"/usr/afs/db", 1,1, 0700, 07},
!     {"/usr/afs/local", 1,1, 0700, 07},
      {"/usr/afs/etc/KeyFile", 0,1, 0600, 07},
      {"/usr/afs/etc/UserList", 0,1, 0600, 03}};
  EXPORT int bozo_nbosEntryStats =
--- 788,796 ----
      {"/usr/afs/etc", 1,1, 0755, 02},
      {"/usr/afs/bin", 1,1, 0755, 02},
      {"/usr/afs/logs", 1,1, 0755, 02},
!     {"/usr/afs/backup", 1,0, 0700, 0},
!     {"/usr/afs/db", 1,1, 0700, 02},
!     {"/usr/afs/local", 1,1, 0700, 02},
      {"/usr/afs/etc/KeyFile", 0,1, 0600, 07},
      {"/usr/afs/etc/UserList", 0,1, 0600, 03}};
  EXPORT int bozo_nbosEntryStats =
***************
*** 830,836 ****
  {
      static unsigned long lastTime = 0;
      unsigned long now = FT_ApproxTime();
!     static int lastResult = -1;
      int result;
      int i;
  
--- 830,836 ----
  {
      static unsigned long lastTime = 0;
      unsigned long now = FT_ApproxTime();
!     static int lastResult = 1;                  /* Assume everything is ok */
      int result;
      int i;
  
***************
*** 842,855 ****
          struct bozo_bosEntryStats *e = &bozo_bosEntryStats[i];
          if (!StatEachEntry (e)) {
              result = 0;
!             break;
          }
      }
- 
-     if (result != lastResult) {         /* log changes */
-         bozo_Log ("Server directory access is %sokay\n",
-                   (result ? "" : "not "));
      }
      lastResult = result;
      return lastResult;
  }
--- 842,856 ----
          struct bozo_bosEntryStats *e = &bozo_bosEntryStats[i];
          if (!StatEachEntry (e)) {
              result = 0;
!             if (result != lastResult) {         /* log changes */
!                 bozo_Log ("Server directory access of %s is not okay\n",
!                           e->path);
              }
          }
      }
+     if (result != lastResult && result)
+         bozo_Log ("Server directory access is okay\n");
+     
      lastResult = result;
      return lastResult;
  }
===================================================================
RCS file: ./bubasics/RCS/butc.xg,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bubasics/butc.xg
*** /tmp/,RCSt1kY4__T	Wed Jan  1 13:15:39 1992
--- ./bubasics/butc.xg	Mon Dec 30 10:18:29 1991
***************
*** 81,86 ****
--- 81,88 ----
      long  id;                           /* unique id of tapeSet, assigned by budb */
      char  tapeServer[TC_MAXHOSTLEN];    /* name of server where this tape is */
      char  format[TC_MAXFORMATLEN];      /* for using printf to make tape name */
+     char  cell[64];                     /* cell in which volume is located */
+     char  dbdir[256];                   /* backup database directory */
      int   maxTapes;                     /* maximum number of tapes in seq. */
      long  a; long b;                    /* linear transforms for tape */
  
***************
*** 111,116 ****
--- 113,119 ----
      struct tc_tapeSet *aTapeSet,
      string dumpName<>,
      tc_dumpArray *dumps,
+     string cell<>, string dbdir<>,
      long parentDumpID,
      long dumpLevel,
      OUT long *dumpID) = TCPERFORMDUMP;
***************
*** 119,124 ****
--- 122,128 ----
  dump. */
  proc PerformRestore(IN string dumpSetName<TC_MAXNAMELEN>,
      tc_restoreArray *restores,
+     string cell<>, string dbdir<>,
      OUT long *dumpID) = TCPERFORMRESTORE;
  
  /* check the status of a dump; the tape coordinator is assumed to sit on
***************
*** 145,151 ****
  
  proc ReadLabel(OUT struct tc_tapeLabel *label) = TCREADLABEL;
  
! proc ScanDumps(IN long addDbFlag) = TCSCANDUMPS;
  
  /* For returning information about the butc interface.
   * Currently this is just the version number
--- 149,155 ----
  
  proc ReadLabel(OUT struct tc_tapeLabel *label) = TCREADLABEL;
  
! proc ScanDumps(IN long addDbFlag, string dbdir<>) = TCSCANDUMPS;
  
  /* For returning information about the butc interface.
   * Currently this is just the version number
===================================================================
RCS file: ./bubasics/RCS/tcdata.p.h,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bubasics/tcdata.p.h
*** /tmp/,RCSt1kY5Avb	Wed Jan  1 13:15:40 1992
--- ./bubasics/tcdata.p.h	Mon Dec 30 10:18:31 1991
***************
*** 43,48 ****
--- 43,50 ----
      int opcode;                 /* Dump, Restore or whatever */
      long arraySize; /* records the actual size of dump/restore array used*/
      char dumpSetName[TC_MAXNAMELEN];    /* name of the dump set to be used */
+     char cell[64];                      /* cell to perform dump/restore */
+     char dbdir[256];                    /* database directory */
  
      /* specific to dumps */
      char *dumpName;                     /* pathname of dump schedule node */
===================================================================
RCS file: ./bucoord/RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/Makefile
*** /tmp/,RCSt1kY5GoD	Wed Jan  1 13:15:40 1992
--- ./bucoord/Makefile	Mon Dec 30 10:18:32 1991
***************
*** 3,9 ****
  SRCDIR=DEST/
  INSTALL=${SRCDIR}bin/install
  
! CFLAGS= -g -w -I${SRCDIR}include -I${SRCDIR}include/afs ${XCFLAGS}
  
  #LIBS=${SRCDIR}lib/afs/libcmd.a ${SRCDIR}lib/afs/libbubasics.a \
  #${SRCDIR}lib/afs/libcom_err.a ${SRCDIR}lib/afs/util.a \
--- 3,9 ----
  SRCDIR=DEST/
  INSTALL=${SRCDIR}bin/install
  
! CFLAGS=  -w -I${SRCDIR}include -I${SRCDIR}include/afs ${XCFLAGS}
  
  #LIBS=${SRCDIR}lib/afs/libcmd.a ${SRCDIR}lib/afs/libbubasics.a \
  #${SRCDIR}lib/afs/libcom_err.a ${SRCDIR}lib/afs/util.a \
***************
*** 64,69 ****
--- 64,70 ----
          ${INSTALL} libbxdb.a ${DESTDIR}lib/afs
          ${INSTALL} backup ${DESTDIR}etc
          ${INSTALL} budb_convert ${DESTDIR}etc
+         ${INSTALL} bc.h ${DESTDIR}include/afs
  
  clean:
          rm -f *.o backup budb_convert *.ss.c *.cs.c *.xdr.c *.a core btest ttest
===================================================================
RCS file: ./bucoord/RCS/bc.h,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/bc.h
*** /tmp/,RCSt1kY5IHH	Wed Jan  1 13:15:41 1992
--- ./bucoord/bc.h	Mon Dec 30 10:18:34 1991
***************
*** 18,23 ****
--- 18,24 ----
   * Global backup program configuration information.
   */
  struct bc_config {
+     char *cell;                         /*Cell in which we are working*/
      char *path;                         /*Root directory for config info*/
      struct bc_hostEntry *dbaseHosts;    /*Hosts providing the backup database service*/
      struct bc_hostEntry *tapeHosts;     /*Hosts providing the tape drives*/
===================================================================
RCS file: ./bucoord/RCS/commands.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/commands.c
*** /tmp/,RCSt1kY5Oy4	Wed Jan  1 13:15:42 1992
--- ./bucoord/commands.c	Mon Dec 30 10:18:38 1991
***************
*** 52,58 ****
  
  #include "bc.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/commands.c,v 1.1 91/12/23 17:00:34 probe Exp $")
  
  extern struct bc_config *bc_globalConfig;
  extern char *ktime_GetDateUsage();
--- 52,58 ----
  
  #include "bc.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/commands.c,v 1.2 91/12/30 10:18:34 probe Exp $")
  
  extern struct bc_config *bc_globalConfig;
  extern char *ktime_GetDateUsage();
***************
*** 1580,1586 ****
          com_err(whoami,0,"Could not read data in file %s",tapefile);
          return -1;
      }
!     sprintf(resultfile,"/usr/afs/backup/D%d.db",num1);
      code = fclose(tf);
      if(code) return code;
      return 0;
--- 1580,1586 ----
          com_err(whoami,0,"Could not read data in file %s",tapefile);
          return -1;
      }
!     sprintf(resultfile, "%s/D%d.db", bc_globalConfig->path, num1);
      code = fclose(tf);
      if(code) return code;
      return 0;
***************
*** 1604,1610 ****
  
  /* generate the name of the entry for the tape */
      strcpy(tapename,as->parms[0].items->data);
!     sprintf(tapefile,"/usr/afs/backup/T%s.db",tapename);
      
  /* read the name of the the file which has the list of volumes on the tape */
      code = GetVolumeFileName(tapefile,volumefile);
--- 1604,1610 ----
  
  /* generate the name of the entry for the tape */
      strcpy(tapename,as->parms[0].items->data);
!     sprintf(tapefile, "%s/T%s.db", bc_globalConfig->path, tapename);
      
  /* read the name of the the file which has the list of volumes on the tape */
      code = GetVolumeFileName(tapefile,volumefile);
***************
*** 2089,2095 ****
      next = 0;
  
      /* open the backup database directory */
!     tdir = opendir(BACKUPDIR);
      if ( tdir == 0 )
          return(-1);
  
--- 2089,2095 ----
      next = 0;
  
      /* open the backup database directory */
!     tdir = opendir(bc_globalConfig->path);
      if ( tdir == 0 )
          return(-1);
  
===================================================================
RCS file: ./bucoord/RCS/config.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/config.c
*** /tmp/,RCSt1kY5Qrh	Wed Jan  1 13:15:45 1992
--- ./bucoord/config.c	Mon Dec 30 10:18:40 1991
***************
*** 58,67 ****
      register FILE *tf;
      register long code;
  
!     strcpy(tpath, aconfig->path);
!     strcat(tpath, "/");
      strcat(tpath, aname);
!     strcpy(npath, tpath);
      strcat(npath, ".NEW");
      tf = fopen(npath, "w");
      if (!tf) return -1;
--- 58,66 ----
      register FILE *tf;
      register long code;
  
!     strcpy(tpath, "/usr/afs/backup/");
      strcat(tpath, aname);
!     strcpy(npath, aname);
      strcat(npath, ".NEW");
      tf = fopen(npath, "w");
      if (!tf) return -1;
***************
*** 90,97 ****
      struct hostent *th;
      long port = 0;
      
!     strcpy(tpath, aconfig->path);
!     strcat(tpath, "/");
      strcat(tpath, aname);
      tf = fopen(tpath, "r");
      if (!tf) return (struct bc_hostEntry *) 0;
--- 89,95 ----
      struct hostent *th;
      long port = 0;
      
!     strcpy(tpath, "/usr/afs/backup/");
      strcat(tpath, aname);
      tf = fopen(tpath, "r");
      if (!tf) return (struct bc_hostEntry *) 0;
===================================================================
RCS file: ./bucoord/RCS/dsstub.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/dsstub.c
*** /tmp/,RCSt1kY5Wcp	Wed Jan  1 13:15:47 1992
--- ./bucoord/dsstub.c	Mon Dec 30 10:18:43 1991
***************
*** 27,35 ****
--- 27,38 ----
  #endif PA
  #include <afs/bubasics.h>
  #include <afs/volser.h>
+ #include "bc.h"
  
  #define dprintf                 /* debug */
  
+ extern struct bc_config *bc_globalConfig;
+ 
  /* basic format of a tape file is a file, whose name is "T<tapename>.db", and
   * which contains the fields
   * (long) dumpID, (long) tape-sequence-within-dump, (long) damage_flag
***************
*** 58,65 ****
  static char *TapeName(atapeName)
  register char *atapeName; {
      static char tbuffer[256];
!     strcpy(tbuffer, "/usr/afs/backup/T");
!     strcat(tbuffer+1, atapeName);
      strcat(tbuffer, ".db");
      return tbuffer;
  }
--- 61,69 ----
  static char *TapeName(atapeName)
  register char *atapeName; {
      static char tbuffer[256];
!     strcpy(tbuffer, bc_globalConfig->path);
!     strcat(tbuffer, "/T");
!     strcat(tbuffer, atapeName);
      strcat(tbuffer, ".db");
      return tbuffer;
  }
***************
*** 68,74 ****
  static char *DumpName(adumpID)
  register long adumpID; {
      static char tbuffer[256];
!     sprintf(tbuffer, "/usr/afs/backup/D%d.db", adumpID);
      return tbuffer;
  }
  
--- 72,78 ----
  static char *DumpName(adumpID)
  register long adumpID; {
      static char tbuffer[256];
!     sprintf(tbuffer, "%s/D%d.db", bc_globalConfig->path, adumpID);
      return tbuffer;
  }
  
***************
*** 110,116 ****
      char dname[256];
      char dumpName[1024];
  
!     tdir = opendir("/usr/afs/backup");
      if (!tdir) return -1;
  
      for(tde=readdir(tdir); tde; tde=readdir(tdir)) {
--- 114,120 ----
      char dname[256];
      char dumpName[1024];
  
!     tdir = opendir(bc_globalConfig->path);
      if (!tdir) return -1;
  
      for(tde=readdir(tdir); tde; tde=readdir(tdir)) {
***************
*** 676,682 ****
  
  #else not PA
  
!     tdir = opendir("/usr/afs/backup");
      if (!tdir) {
          return -1;
      }
--- 680,686 ----
  
  #else not PA
  
!     tdir = opendir(bc_globalConfig->path);
      if (!tdir) {
          return -1;
      }
***************
*** 958,964 ****
      strcat(compName, ".");
      strcat(compName, tailCompPtr(dumpPath));
  
!     tdir=opendir("/usr/afs/backup");
      if (!tdir) return -1;
      
      bestDumpTime = 0;   /* none found yet */
--- 962,968 ----
      strcat(compName, ".");
      strcat(compName, tailCompPtr(dumpPath));
  
!     tdir=opendir(bc_globalConfig->path);
      if (!tdir) return -1;
      
      bestDumpTime = 0;   /* none found yet */
***************
*** 1148,1154 ****
      strcat(compName, ".");
      strcat(compName, tailCompPtr(dumpName));
      
!     tdir = opendir("/usr/afs/backup");
      if ( tdir == 0 )
      {
          dprintf("bcdb_FindLastVolClone: failed to open backup directory\n");
--- 1152,1158 ----
      strcat(compName, ".");
      strcat(compName, tailCompPtr(dumpName));
      
!     tdir = opendir(bc_globalConfig->path);
      if ( tdir == 0 )
      {
          dprintf("bcdb_FindLastVolClone: failed to open backup directory\n");
***************
*** 1354,1360 ****
      long dumpID;
      long code;
  
!     tdir=opendir("/usr/afs/backup");
      if (tdir==0)
          return -1;
      
--- 1358,1364 ----
      long dumpID;
      long code;
  
!     tdir=opendir(bc_globalConfig->path);
      if (tdir==0)
          return -1;
      
===================================================================
RCS file: ./bucoord/RCS/dsvs.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/dsvs.c
*** /tmp/,RCSt1kY5ZP7	Wed Jan  1 13:15:49 1992
--- ./bucoord/dsvs.c	Mon Dec 30 10:18:46 1991
***************
*** 191,197 ****
      static char rn[] = "bc_InitDSVS";   /*Routine name*/
      register long code;                 /*Result of various calls*/
  
!     mkdir("/usr/afs/backup");           /* lots of stuff won't work if this ain't done */
      db_dsvs = adebug;
      if (db_dsvs)
          fprintf(stderr, "[%s:%s] Debugging output turned on.\n", mn, rn);
--- 191,197 ----
      static char rn[] = "bc_InitDSVS";   /*Routine name*/
      register long code;                 /*Result of various calls*/
  
!     mkdir("/usr/afs/backup", 0777);     /* lots of stuff won't work if this ain't done */
      db_dsvs = adebug;
      if (db_dsvs)
          fprintf(stderr, "[%s:%s] Debugging output turned on.\n", mn, rn);
***************
*** 650,656 ****
      register struct bc_volumeSet *tset;
      register struct bc_volumeEntry *tentry;
  
!     tfile = fopen("/usr/afs/backup/volumeset.NEW", "w");
      if (!tfile) return -1;
  
      for(tset = aconfig->vset; tset; tset=tset->next) {
--- 650,665 ----
      register struct bc_volumeSet *tset;
      register struct bc_volumeEntry *tentry;
  
!     char vfile1[MAXPATHLEN];
!     char vfile2[MAXPATHLEN];
! 
!     strcpy(vfile2, bc_globalConfig->path);
!     strcat(vfile2, "/volumeset");
! 
!     strcpy(vfile1, vfile2);
!     strcat(vfile1, ".NEW");
! 
!     tfile = fopen(vfile1, "w");
      if (!tfile) return -1;
  
      for(tset = aconfig->vset; tset; tset=tset->next) {
***************
*** 666,677 ****
          goto fail;
      }
      if(fclose(tfile) == EOF) goto fail;
!     code = rename("/usr/afs/backup/volumeset.NEW", "/usr/afs/backup/volumeset");
      if (code) goto fail;
      return 0;
  
    fail:
!     unlink("/usr/afs/backup/volumeset.NEW");
      return -2;
  }
  
--- 675,686 ----
          goto fail;
      }
      if(fclose(tfile) == EOF) goto fail;
!     code = rename(vfile1, vfile2);
      if (code) goto fail;
      return 0;
  
    fail:
!     unlink(vfile1);
      return -2;
  }
  
***************
*** 686,692 ****
      register long code;
      register struct bc_dumpSchedule *tdump;
  
!     tfile = fopen("/usr/afs/backup/dumpschedule.NEW", "w");
      if (!tfile) return -1;      /* can't open file */
  
      /* write out header - magic # and version */
--- 695,710 ----
      register long code;
      register struct bc_dumpSchedule *tdump;
  
!     char vfile1[MAXPATHLEN];
!     char vfile2[MAXPATHLEN];
! 
!     strcpy(vfile2, bc_globalConfig->path);
!     strcat(vfile2, "/dumpschedule");
! 
!     strcpy(vfile1, vfile2);
!     strcat(vfile1, ".NEW");
! 
!     tfile = fopen(vfile1, "w");
      if (!tfile) return -1;      /* can't open file */
  
      /* write out header - magic # and version */
***************
*** 701,712 ****
          goto fail;
      }
      if (fclose(tfile) == EOF) goto fail;
!     code = rename("/usr/afs/backup/dumpschedule.NEW", "/usr/afs/backup/dumpschedule");
      if (code) goto fail;
      return 0;
  
    fail:
!     unlink("/usr/afs/backup/dumpschedule.NEW");
      return -1;
  }
  
--- 719,730 ----
          goto fail;
      }
      if (fclose(tfile) == EOF) goto fail;
!     code = rename(vfile1, vfile2);
      if (code) goto fail;
      return 0;
  
    fail:
!     unlink(vfile1);
      return -1;
  }
  
===================================================================
RCS file: ./bucoord/RCS/dump.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/dump.c
*** /tmp/,RCSt1kY5fiI	Wed Jan  1 13:15:50 1992
--- ./bucoord/dump.c	Mon Dec 30 10:18:48 1991
***************
*** 152,157 ****
--- 152,158 ----
  #endif notdef
      code = TC_PerformDump(tconn, tempName, &tapeSet, tdump->dumpName, 
                            &volArray,
+                           tdump->config->cell, tdump->config->path,
                            tdump->parentDumpID, tdump->dumpLevel,
                            &tdump->dumpID);
      if ( code )
***************
*** 359,364 ****
--- 360,366 ----
      strcat(tempName, tdump->dumpName);
  #endif notdef
      code = TC_PerformDump(tconn, tempName, &tapeSet, &volArray,
+                           tdump->config->cell, tdump->config->path,
                            tdump->parentDumpID, tdump->dumpLevel,
                            &tdump->dumpID);
      if(tdump->dumpID){
***************
*** 798,804 ****
          return(-1);
      }
      
!     code = TC_ScanDumps(tconn, dbAddFlag);
      return(code);
  }
  
--- 800,806 ----
          return(-1);
      }
      
!     code = TC_ScanDumps(tconn, dbAddFlag, config->path);
      return(code);
  }
  
RCS file: ./bucoord/RCS/main.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/main.c
*** /tmp/,RCSt1kfADFm	Wed Jan  1 13:15:52 1992
--- ./bucoord/main.c	Mon Dec 30 10:18:51 1991
***************
*** 35,41 ****
  #include <sys/param.h>          /* for MAXHOSTNAMELEN */
  #endif PA
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/main.c,v 1.1 91/12/23 17:00:41 probe Exp $")
  
  extern int bc_DumpCmd(), bc_QuitCmd(), bc_AddHostCmd();
  extern int bc_DeleteHostCmd(), bc_ListHostsCmd(), bc_JobsCmd();
--- 35,41 ----
  #include <sys/param.h>          /* for MAXHOSTNAMELEN */
  #endif PA
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/main.c,v 1.2 91/12/30 10:18:49 probe Exp $")
  
  extern int bc_DumpCmd(), bc_QuitCmd(), bc_AddHostCmd();
  extern int bc_DeleteHostCmd(), bc_ListHostsCmd(), bc_JobsCmd();
***************
*** 72,82 ****
--- 72,90 ----
  static char mn[] = "main";              /*Module name*/
  static int main_debug = 0;              /*Is debugging output to be generated?*/
  static int bcInit = 0;                  /* backupInit called yet ? */
+ static int cmd_argc = 0;                /* number of non-configuration args */
  char *whoami = "backup";
  
  #ifdef PA
  struct ubik_client *dbconn;
  #endif PA
+ 
+ #define COMMONPARMS     cmd_Seek(ts, 12);\
+ cmd_AddParm(ts, "-cell",   CMD_SINGLE, CMD_OPTIONAL, "cell name");\
+ cmd_AddParm(ts, "-noauth", CMD_FLAG,   CMD_OPTIONAL, "don't authenticate");\
+ cmd_AddParm(ts, "-debug",  CMD_FLAG,   CMD_OPTIONAL, "print debugging info");\
+ cmd_AddParm(ts, "-dbdir",  CMD_SINGLE, CMD_OPTIONAL, "backup database directory")
+ 
  /*
   * Define the indices of certain common command line parameter indicies.
   */
***************
*** 83,90 ****
  #define p_cell      12
  #define p_noauth    13
  #define p_debug     14
! #define p_server    15
! #define p_config    16
  
  /*
   * Initialize all the error tables that may be used by com_err
--- 91,98 ----
  #define p_cell      12
  #define p_noauth    13
  #define p_debug     14
! #define p_dbdir     15
! #define p_server    16
  
  /*
   * Initialize all the error tables that may be used by com_err
***************
*** 220,225 ****
--- 228,234 ----
      struct afsconf_cell info;               /*Cell info structure*/
      long i;                                 /*Loop variable*/
      PROCESS pid;                            /*LWP process ID*/
+     static char confCell[64];
  
      if (main_debug)
          fprintf(stderr, "[%s:%s] Calling InitDSVS()\n", mn, rn);
***************
*** 285,290 ****
--- 294,302 ----
          exit(1);
      }
  
+     strcpy(confCell, info.name);
+     bc_globalConfig->cell = confCell;
+     
      /*
       * Grab tickets if we care about authentication.
       */
***************
*** 482,499 ****
      }
      else initd = 1;
  
!     if (as->parms[p_debug].items != 0)
          main_debug = 1;
      tcell = (char *)0;
      if (as->parms[p_cell].items) {
          /*
           * We were given a specific cell name on the command line.
           */
          tcell = as->parms[p_cell].items->data;
          if (main_debug)
              fprintf(stderr, "[%s:%s] Cell specified on command line: '%s'\n", mn, rn, tcell);
      }
      if (as->parms[p_noauth].items != 0) {
          noauth = 1;
          if (main_debug)
              fprintf(stderr, "[%s:%s] Authentication info ignored\n", mn, rn);
--- 494,515 ----
      }
      else initd = 1;
  
!     if (as->parms[p_debug].items != 0) {
!         cmd_argc--;
          main_debug = 1;
+     }
      tcell = (char *)0;
      if (as->parms[p_cell].items) {
          /*
           * We were given a specific cell name on the command line.
           */
+         cmd_argc -= 2;
          tcell = as->parms[p_cell].items->data;
          if (main_debug)
              fprintf(stderr, "[%s:%s] Cell specified on command line: '%s'\n", mn, rn, tcell);
      }
      if (as->parms[p_noauth].items != 0) {
+         cmd_argc--;
          noauth = 1;
          if (main_debug)
              fprintf(stderr, "[%s:%s] Authentication info ignored\n", mn, rn);
***************
*** 504,509 ****
--- 520,526 ----
              fprintf(stderr, "[%s:%s] Authentication information used\n", mn, rn);
      }
      if (as->parms[p_server].items) {
+         cmd_argc--;
          if (main_debug)
              fprintf(stderr, "[%s:%s] Using server configuration directory: '%s'\n", mn, rn, AFSCONF_SERVERNAME);
          strncpy(confdir, AFSCONF_SERVERNAME, 100);
***************
*** 513,520 ****
       * Really shouldn't do this until we know which site we're backing up (Is this comment
       * still true?)
       */
!     if (as->parms[p_config].items) {
!         strcpy(confpath, as->parms[p_config].items->data);
          if (main_debug)
              fprintf(stderr, "[%s:%s] Using config file pathname from command line: '%s'\n", mn, rn, confpath);
      }
--- 530,538 ----
       * Really shouldn't do this until we know which site we're backing up (Is this comment
       * still true?)
       */
!     if (as->parms[p_dbdir].items) {
!         cmd_argc -= 2;
!         strcpy(confpath, as->parms[p_dbdir].items->data);
          if (main_debug)
              fprintf(stderr, "[%s:%s] Using config file pathname from command line: '%s'\n", mn, rn, confpath);
      }
***************
*** 562,568 ****
--- 580,605 ----
  
  } /*backupInit*/
  
+ 
  /*
+  * backupInitCmd
+  *
+  * Description:
+  *      This routine is a dummy routine for dealing with the command-line
+  *      switches that can also be used for interactive mode.  By having a
+  *      no-op routine, we can allow the use of -cell and call this routine
+  *      and then fallback to using interactive mode if no other arguments
+  *      were supplied.
+  */
+ static backupInitCmd(as, arock)
+     struct cmd_syndesc *as;
+     char *arock;
+ 
+ {
+         return(0);
+ }
+ 
+ /*
   * Initialize everything for interactive mode.
   */
  static int newInit()
***************
*** 592,599 ****
          com_err(whoami,code,"; Couldn't initialize VLDB library");
          exit(1);
      }
      return(0);
- 
  }
  
  
--- 629,636 ----
          com_err(whoami,code,"; Couldn't initialize VLDB library");
          exit(1);
      }
+     bcInit = 1;
      return(0);
  }
  
  
***************
*** 636,644 ****
              code = backupInit(as,rock);
              if(code){
                  com_err(whoami,code,"; Could not initialize Backup coordinator");
- /*
-                 printf("Could not initialize Backup coordinator\n");
- */
                  exit(1);
              }
              bcInit = 1;
--- 673,678 ----
***************
*** 648,653 ****
--- 682,704 ----
          /*We aren't handling the command line, so any opcode is legal (except initcmd, which will be intercepted elsewhere)*/
          bc_opStatus->forcedBCExit = 0;
          bc_opStatus->forcedOpcodeExit = 0;
+ 
+         if (as->parms[p_noauth].items != 0 ||
+             as->parms[p_debug].items != 0 ||
+             as->parms[p_dbdir].items != 0 ||
+             as->parms[p_cell].items != 0) {
+                 fprintf(stderr, "You may only use the %s, %s, %s, and %s flags at startup.\n",
+                         as->parms[p_noauth].name,
+                         as->parms[p_debug].name,
+                         as->parms[p_dbdir].name,
+                         as->parms[p_cell].name);
+                 return(1);
+         }
+         if (!strcmp(as->name, "initcmd")) {
+                 fprintf(stderr, "%s is not a user-callable function.\n",
+                         as->name);
+                 return(1);
+         }
      } /*Not handling command line*/
  
      /*At this point, we won't see another command line opcode*/
***************
*** 696,701 ****
--- 747,753 ----
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
      cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("volrestore", bc_VolRestoreCmd, 0, "restore volume");
      cmd_AddParm(ts, "-server",    CMD_SINGLE, CMD_REQUIRED, "destination machine");
***************
*** 715,725 ****
--- 767,779 ----
      cmd_AddParm(ts, "-newserver",    CMD_SINGLE, CMD_OPTIONAL, "destination machine");
      cmd_AddParm(ts, "-newpartition", CMD_SINGLE, CMD_OPTIONAL, "destination partition");
      cmd_AddParm(ts, "-n", CMD_FLAG, CMD_OPTIONAL, "don't really execute it");
+     COMMONPARMS;
      
      ts = cmd_CreateSyntax("quit", bc_QuitCmd, 0, "leave the program");
  #ifdef notdef
      cmd_AddParm(ts, "-force", CMD_FLAG, CMD_OPTIONAL, "quit without questions");
  #endif
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("addhost", bc_AddHostCmd, 0, "add host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED, "tape machine name");
***************
*** 729,734 ****
--- 783,789 ----
      cmd_AddParm(ts, "-dbhost",   CMD_SINGLE, CMD_OPTIONAL, "hosts for dbase");
      cmd_AddParm(ts, "-dbpoffset", CMD_SINGLE, CMD_OPTIONAL, "offset from standard port");
  #endif
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("delhost", bc_DeleteHostCmd, 0, "delete host to config");
      cmd_AddParm(ts, "-tapehost", CMD_SINGLE, CMD_REQUIRED, "tape machine name");
***************
*** 738,773 ****
      cmd_AddParm(ts, "-dbhost",   CMD_SINGLE, CMD_OPTIONAL, "hosts for dbase");
      cmd_AddParm(ts, "-dbpoffset", CMD_SINGLE, CMD_OPTIONAL, "offset of the TC port to use");
  #endif
  
      ts = cmd_CreateSyntax("listhosts", bc_ListHostsCmd, 0, "list config hosts");
  
      ts = cmd_CreateSyntax("jobs", bc_JobsCmd, 0, "list running jobs");
  
      ts = cmd_CreateSyntax("kill", bc_KillCmd, 0, "kill running job");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "job ID or dump set name");
  
! /*    ts = cmd_CreateSyntax("initcmd", backupInit, 0, " --do not use--");
!     cmd_Seek(ts, 12);
!     cmd_AddParm(ts, "-cell",   CMD_SINGLE, CMD_OPTIONAL, "cell name");
!     cmd_AddParm(ts, "-noauth", CMD_FLAG,   CMD_OPTIONAL, "don't authenticate");
!     cmd_AddParm(ts, "-debug",  CMD_FLAG,   CMD_OPTIONAL, "print debugging info");
      cmd_AddParm(ts, "-server", CMD_FLAG,   CMD_OPTIONAL, "server config");
-     cmd_AddParm(ts, "-config", CMD_SINGLE, CMD_OPTIONAL, "config file pathname");
- */
  
      ts = cmd_CreateSyntax("listvolsets", bc_ListVolSetCmd, 0, "list volume sets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
  
      ts = cmd_CreateSyntax("listdumps", bc_ListDumpScheduleCmd, 0, "list dump schedules");
  
      ts = cmd_CreateSyntax("addvolset", bc_AddVolSetCmd, 0, "create a new volume set");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
  
      ts = cmd_CreateSyntax("status", bc_GetTapeStatus, 0, "get tape coordinator status");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
  
      ts = cmd_CreateSyntax("delvolset", bc_DeleteVolSetCmd, 0, "delete a volume set");
      cmd_AddParm(ts, "-name", CMD_LIST, CMD_REQUIRED, "volume set name");
  
      ts = cmd_CreateSyntax("addvolentry", bc_AddVolEntryCmd, 0, "add a new volume entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
--- 793,832 ----
      cmd_AddParm(ts, "-dbhost",   CMD_SINGLE, CMD_OPTIONAL, "hosts for dbase");
      cmd_AddParm(ts, "-dbpoffset", CMD_SINGLE, CMD_OPTIONAL, "offset of the TC port to use");
  #endif
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("listhosts", bc_ListHostsCmd, 0, "list config hosts");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("jobs", bc_JobsCmd, 0, "list running jobs");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("kill", bc_KillCmd, 0, "kill running job");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "job ID or dump set name");
+     COMMONPARMS;
  
!     ts = cmd_CreateSyntax("initcmd", backupInitCmd, 0, " --do not use--");
!     COMMONPARMS;
      cmd_AddParm(ts, "-server", CMD_FLAG,   CMD_OPTIONAL, "server config");
  
      ts = cmd_CreateSyntax("listvolsets", bc_ListVolSetCmd, 0, "list volume sets");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "volume set name");
+     COMMONPARMS;
      
      ts = cmd_CreateSyntax("listdumps", bc_ListDumpScheduleCmd, 0, "list dump schedules");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("addvolset", bc_AddVolSetCmd, 0, "create a new volume set");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("status", bc_GetTapeStatus, 0, "get tape coordinator status");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("delvolset", bc_DeleteVolSetCmd, 0, "delete a volume set");
      cmd_AddParm(ts, "-name", CMD_LIST, CMD_REQUIRED, "volume set name");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("addvolentry", bc_AddVolEntryCmd, 0, "add a new volume entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
***************
*** 774,810 ****
--- 833,878 ----
      cmd_AddParm(ts, "-server", CMD_SINGLE, CMD_REQUIRED, "machine name");
      cmd_AddParm(ts, "-partition", CMD_SINGLE, CMD_REQUIRED, "partition name");
      cmd_AddParm(ts, "-volumes", CMD_SINGLE, CMD_REQUIRED, "volume name (regular expression)");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("delvolentry", bc_DeleteVolEntryCmd, 0, "delete a volume set sub-entry");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "volume set name");
      cmd_AddParm(ts, "-entry", CMD_SINGLE, CMD_REQUIRED, "volume set index");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("adddump", bc_AddDumpCmd, 0, "add dump schedule");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("deldump", bc_DeleteDumpCmd, 0, "delete dump schedule");
      cmd_AddParm(ts, "-dump", CMD_SINGLE, CMD_REQUIRED, "dump level name");
+     COMMONPARMS;
  
  
      ts = cmd_CreateSyntax("tapeinfo", bc_EnumTapeCmd, 0, "list all the volumes on tape");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_REQUIRED, "tape name");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("check", bc_CheckDumpStatCmd, 0, "check the status of a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "dump ID");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("labeltape", bc_LabelTapeCmd, 0, "label a tape");
      cmd_AddParm(ts, "-name", CMD_SINGLE, CMD_OPTIONAL, "tape name, defaults to NULL");
      cmd_AddParm(ts, "-size", CMD_SINGLE, CMD_OPTIONAL, "tape size in Kbytes, defaults to size in tapeconfig");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("abort", bc_AbortDumpCmd, 0, "abort a dump");
      cmd_AddParm(ts, "-id", CMD_SINGLE, CMD_REQUIRED, "dump ID");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("readlabel", bc_ReadLabelCmd, 0, "read the label on tape");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      ts = cmd_CreateSyntax("scantape", bc_ScanDumpsCmd, 0,
                            "dump information recovery from tape");
***************
*** 811,816 ****
--- 879,885 ----
      cmd_AddParm(ts, "-dbadd", CMD_FLAG, CMD_OPTIONAL,
                  "add information to the database");
      cmd_AddParm(ts, "-portoffset", CMD_SINGLE, CMD_OPTIONAL, "TC port offset");
+     COMMONPARMS;
  
      /* XXX */
      ts = cmd_CreateSyntax("volinfo", bc_dblookupCmd, 0,
***************
*** 820,825 ****
--- 889,895 ----
      ts = cmd_CreateSyntax("setexp", bc_SetExpCmd, 0, "set/clear dump expiration dates");
      cmd_AddParm(ts, "-dump", CMD_LIST, CMD_REQUIRED, "dump level name");
      cmd_AddParm(ts, "-expires", CMD_LIST, CMD_OPTIONAL, "expiration date");
+     COMMONPARMS;
  
  
      /* Set up preliminary opcode status: First opcode processed is the
***************
*** 833,844 ****
      /* Parse command-line switches first, then iterate, interpreting user
       * commands.
       */
!     if(argc == 1) bc_opStatus->isCmdLineOpcode = 0;
!     if(bc_opStatus->isCmdLineOpcode){
          code = cmd_Dispatch(argc, argv);
          if (code)
              exit(-1);
      }
      /*If we handled an opcode that we shouldn't return from, we honor that*/
      if (bc_opStatus->forcedBCExit) {
          /* we get here if we are run in non-interactive mode */
--- 903,924 ----
      /* Parse command-line switches first, then iterate, interpreting user
       * commands.
       */
! 
!     if (cmd_argc = argc-1) {
          code = cmd_Dispatch(argc, argv);
          if (code)
              exit(-1);
+ 
+         if (cmd_argc > 0) {
+             bc_opStatus->isCmdLineOpcode  = 1;
+             bc_opStatus->forcedBCExit     = 1;
+             bc_opStatus->forcedOpcodeExit = 1;
+         } else {
+             bc_opStatus->isCmdLineOpcode  = 0;
+             bc_opStatus->forcedBCExit     = 0;
+             bc_opStatus->forcedOpcodeExit = 0;
          }
+     }
      /*If we handled an opcode that we shouldn't return from, we honor that*/
      if (bc_opStatus->forcedBCExit) {
          /* we get here if we are run in non-interactive mode */
***************
*** 846,851 ****
--- 926,933 ----
          exit(0);                /* and exit */
      }
  
+     if (!bcInit) {
+ 
          if(newInit()){
              printf("Could not initialize correctly\n");
              exit(-1);
***************
*** 855,861 ****
      /* initialize as a ubik client */
      rx_Init(0);
  
!     /* lookup hosts in CellServeDB - TBD
       * For the present, use local host only
       */
  
--- 937,943 ----
          /* initialize as a ubik client */
          rx_Init(0);
  
!         /* lookup hosts in CellServDB - TBD
           * For the present, use local host only
           */
  
***************
*** 917,923 ****
      }
  
  #endif PA    
!     
  
      while(1) {
          printf("backup> ");
--- 999,1005 ----
              }
  
  #endif PA
!     }
  
      while(1) {
          printf("backup> ");
===================================================================
RCS file: ./bucoord/RCS/restore.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/restore.c
*** /tmp/,RCSt1kfAFp4	Wed Jan  1 13:15:54 1992
--- ./bucoord/restore.c	Mon Dec 30 10:18:52 1991
***************
*** 22,28 ****
  #include <afs/butc.h>
  #include <afs/budb.h>
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/restore.c,v 1.1 91/12/23 17:00:43 probe Exp $")
  
  extern struct bc_config *bc_globalConfig;
  extern struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS];
--- 22,28 ----
  #include <afs/butc.h>
  #include <afs/budb.h>
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/bucoord/RCS/restore.c,v 1.2 91/12/30 10:18:51 probe Exp $")
  
  extern struct bc_config *bc_globalConfig;
  extern struct bc_dumpTask bc_dumpTasks[BC_MAXSIMDUMPS];
***************
*** 213,239 ****
      return 0;
  }
  
! /* bc_DoRestore
!  * entry:
!  *      avolDumps is a list of volume dump structures giving the names  of 
!  *      the volumes we want back.
!  *      adate - date we want the volumes back as of (the volumes restored will
!  *              be the latest volumes available dumped previous to adate).
!  *      anewName - the extension to add to the volume name, if any (non-null)
!  *      anewID is a bool, true-->generate new volume id, false-->use orig. id.
!  *      anewHost is the host to which to restore the volumes
!  *      anewPartition is the partition on which to restore the volumes.
!  */
  
! bc_DoRestore(avolDumps, adate, anewName, anewHost, anewPartition, aoldFlag, aconn, arestoreID)
! long adate;
! struct sockaddr_in *anewHost;
! long *arestoreID;
! int aoldFlag;           /* true iff we restore to the old volume # and names */
  struct rx_connection *aconn;
! long anewPartition;
! char *anewName;
! struct bc_volumeDump *avolDumps; {
      struct bc_dumpList *dumps[BC_MAXLEVELS], *tdumps[BC_MAXLEVELS], *tdl;
      struct budb_dumpEntry *dumpDescr, tdumpDescr;
      struct budb_volumeEntry *tapeEntries;
--- 213,224 ----
      return 0;
  }
  
! /* bc_DoRestore */
  
! bc_DoRestore(adump,aconn)
! struct bc_dumpTask *adump;
  struct rx_connection *aconn;
! {
      struct bc_dumpList *dumps[BC_MAXLEVELS], *tdumps[BC_MAXLEVELS], *tdl;
      struct budb_dumpEntry *dumpDescr, tdumpDescr;
      struct budb_volumeEntry *tapeEntries;
***************
*** 260,266 ****
      }
      tcitems = 0;    /* array is empty now */
      tcarray = (struct tc_restoreDesc *) 0;
!     for (tvol = avolDumps; tvol; tvol = tvol->next) {
          /* for each dump, contact dump dbase and find the best dump to use for
           * this volume */
          for(i=0;i<BC_MAXLEVELS;i++)     {   /* clear out tdump arrays */
--- 245,251 ----
      }
      tcitems = 0;    /* array is empty now */
      tcarray = (struct tc_restoreDesc *) 0;
!     for (tvol = adump->volumes; tvol; tvol = tvol->next) {
          /* for each dump, contact dump dbase and find the best dump to use for
           * this volume */
          for(i=0;i<BC_MAXLEVELS;i++)     {   /* clear out tdump arrays */
***************
*** 272,283 ****
           * one dump scheme to another
           */
  
!         code = bcdb_FindDump(tvol->name, adate, &dumpDescr[i]); /* look for volume */
          if (!BackupName(tvol->name)) {  /* look for backup, too */
              /* volume doesn't end ".backup", try adding it */
              strcpy(tname, tvol->name);
              strcat(tname, ".backup");
!             j = bcdb_FindDump(tname, adate, &tdumpDescr);
          }
          else j = -1;    /* already backup? pretend that can't find other dump */
          if (code == 0 && j == 0) {
--- 257,268 ----
           * one dump scheme to another
           */
  
!         code = bcdb_FindDump(tvol->name, adump->fromDate, &dumpDescr[i]);       /* look for volume */
          if (!BackupName(tvol->name)) {  /* look for backup, too */
              /* volume doesn't end ".backup", try adding it */
              strcpy(tname, tvol->name);
              strcat(tname, ".backup");
!             j = bcdb_FindDump(tname, adump->fromDate, &tdumpDescr);
          }
          else j = -1;    /* already backup? pretend that can't find other dump */
          if (code == 0 && j == 0) {
***************
*** 377,386 ****
          for(titem = ttape->restoreList; titem; titem=titem->next) {
              tcarray[i].origVid = titem->oid;    /* means unknown */
              tcarray[i].vid = 0;
!             tcarray[i].partition = anewPartition;
              tcarray[i].frag = 1;   
              tcarray[i].position = titem->position;
!             bcopy(anewHost, &tcarray[i].hostID, sizeof(struct sockaddr_in));
              strcpy(tcarray[i].tapeName, ttape->tapeName);
              strcpy(tcarray[i].oldName, titem->volumeName);
              strcpy(tcarray[i].newName, titem->volumeName);
--- 362,372 ----
          for(titem = ttape->restoreList; titem; titem=titem->next) {
              tcarray[i].origVid = titem->oid;    /* means unknown */
              tcarray[i].vid = 0;
!             tcarray[i].partition = adump->destPartition;
              tcarray[i].frag = 1;   
              tcarray[i].position = titem->position;
!             bcopy(&adump->destServer, &tcarray[i].hostID,
!                   sizeof(struct sockaddr_in));
              strcpy(tcarray[i].tapeName, ttape->tapeName);
              strcpy(tcarray[i].oldName, titem->volumeName);
              strcpy(tcarray[i].newName, titem->volumeName);
***************
*** 389,396 ****
                     name to excise ".backup" */
                  StripBackup(tcarray[i].newName);
              }
!             if (anewName)
!                 strcat(tcarray[i].newName, anewName);
              if (titem->level > 0) {
                  /* link up the restore nodes which correspond to the same
                   * volume
--- 375,382 ----
                     name to excise ".backup" */
                  StripBackup(tcarray[i].newName);
              }
!             if (adump->newExt)
!                 strcat(tcarray[i].newName, adump->newExt);
              if (titem->level > 0) {
                  /* link up the restore nodes which correspond to the same
                   * volume
***************
*** 418,428 ****
      /* amazingly enough, we're now ready to make the call */
      rpcArray.tc_restoreArray_len = nentries;
      rpcArray.tc_restoreArray_val = tcarray;
!     code = TC_PerformRestore(aconn, "DumpSetName", &rpcArray, arestoreID);
      if (code)
          com_err(whoami,0,"Failed start restore");
      else
!         com_err(whoami,0,"Dump ID of restore operation : %u",*arestoreID);
      /* free up everything */
    done:
      if (tcarray) free(tcarray);
--- 404,416 ----
      /* amazingly enough, we're now ready to make the call */
      rpcArray.tc_restoreArray_len = nentries;
      rpcArray.tc_restoreArray_val = tcarray;
!     code = TC_PerformRestore(aconn, "DumpSetName", &rpcArray,
!                              adump->config->cell, adump->config->path,
!                              &adump->dumpID);
      if (code)
          com_err(whoami,0,"Failed start restore");
      else
!         com_err(whoami,0,"Dump ID of restore operation : %u",adump->dumpID);
      /* free up everything */
    done:
      if (tcarray) free(tcarray);
***************
*** 476,486 ****
      }
      
      /* make call to start restore */
!     code = bc_DoRestore(tdump->volumes, tdump->fromDate, tdump->newExt,
!                         &tdump->destServer,
!                         tdump->destPartition,
!                         tdump->oldFlag, tconn,
!                         &tdump->dumpID);
      if(code == 0 && dontExecute){
          dontExecute = 0;
          goto finish;
--- 464,470 ----
      }
      
      /* make call to start restore */
!     code = bc_DoRestore(tdump, tconn);
      if(code == 0 && dontExecute){
          dontExecute = 0;
          goto finish;
===================================================================
RCS file: ./bucoord/RCS/volstub.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./bucoord/volstub.c
*** /tmp/,RCSt1kfALI8	Wed Jan  1 13:15:55 1992
--- ./bucoord/volstub.c	Mon Dec 30 10:18:54 1991
***************
*** 110,116 ****
  
  { /*LongToDottedIP*/
  
!     char *addrbytes;    /*Bytes in the IP address*/
  
      /*
       * If we don't have a buffer to put things in, we go home right away.
--- 110,117 ----
  
  { /*LongToDottedIP*/
  
!     long saddr = htonl(aaddr);
!     char *addrbytes = (char *)&saddr;   /* Bytes in the IP address */
  
      /*
       * If we don't have a buffer to put things in, we go home right away.
***************
*** 122,128 ****
       * Map the 4 bytes to the longword, then just write them into the buffer in the
       * correct order.
       */
-     addrbytes = (char *)(&aaddr);
      sprintf(adotted, "%d.%d.%d.%d",
               (int) *addrbytes,
               (int) *(addrbytes + 1),
--- 123,128 ----
===================================================================
RCS file: ./butc/RCS/lwps.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./butc/lwps.c
*** /tmp/,RCSt1kfAMV6	Wed Jan  1 13:15:56 1992
--- ./butc/lwps.c	Mon Dec 30 10:19:01 1991
***************
*** 22,27 ****
--- 22,28 ----
  #include <afs/tcdata.h>
  #include <afs/ktime.h>                                  /* PA */
  #include <afs/bubasics.h>                               /* PA */
+ #include <afs/bc.h>
  
  #define LABEL_CHECKS            1
  
***************
*** 156,161 ****
--- 157,164 ----
  struct timeval tp;
  struct timezone tzp;
  
+ extern struct bc_config *bc_globalConfig;
+ 
  /* checkpoint landmarks on the tapelog */
  void LogTape(s,a,b,c,d,e,f,g,h,i,j) 
  {
***************
*** 882,888 ****
                                 ptr->curNode->realDumpId);
                  if ( code )
                        LogError("Dumper: error %d in deleting old DB entries\n",
!                                code);
              }
              break;                              /* terminate while */
          } /*exp*/
--- 885,891 ----
                                 ptr->curNode->realDumpId);
                  if ( code )
                        LogError("Dumper: error %d in deleting old DB entries\n",
!                                code, code);
              }
              break;                              /* terminate while */
          } /*exp*/
***************
*** 2240,2245 ****
--- 2243,2249 ----
              code = GetNewTape(&curTapeInfo,curTapeName,&volHeader,0,ptr,0);
              if ( code == TC_ABORTEDBYREQUEST )
              {
+                  butm_Dismount(&curTapeInfo);
                   SetAndReturn(curNode, ABORTED ,code,deviceLatch)
              }
              else
***************
*** 2246,2251 ****
--- 2250,2256 ----
              if(code) {
                  LogError("Dumper: dump %u: can't use the new  tape %s\n",
                           code,curNode->dumpID,curTapeName);
+                 butm_Dismount(&curTapeInfo);
                  SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
              }
              
***************
*** 2261,2266 ****
--- 2266,2272 ----
              if (code) {
                  LogError("Dumper: failed to record start of new tape %s\n",
                           code, backupTape.name);
+                 butm_Dismount(&curTapeInfo);
                  SetAndReturn(curNode,ERROR | ABORTED, code,deviceLatch);
              }
  #ifdef notdef
***************
*** 2279,2284 ****
--- 2285,2291 ----
          if(!curServer) {
              LogError("Dumper: dump %u: illegal host ID  %s\n",
                       0,curNode->dumpID,curDump->hostID);
+             butm_Dismount(&curTapeInfo);
              SetAndReturn(curNode,ERROR | ABORTED,-1,deviceLatch);
          }
          curPart = curDump->partition;
***************
*** 2319,2324 ****
--- 2326,2332 ----
          if(code) {
              LogError("Dumper: dump %u: can't write FileBegin on tape %s\n",
                       code,curNode->dumpID,curTapeName);
+             butm_Dismount(&curTapeInfo);
              SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
          }
  
***************
*** 2327,2332 ****
--- 2335,2341 ----
          if(code) {
              LogError("Dumper: dump %u: can't write data on tape %s\n",
                       code,curNode->dumpID,curTapeName);
+             butm_Dismount(&curTapeInfo);
              SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
          }
          /* positionOnTape = curTapeInfo.position; PA */
***************
*** 2397,2402 ****
--- 2406,2412 ----
          if(code) {
              LogError("Dumper: dump %u: can't write EOF on tape %s \n",
                       code,curNode->dumpID,curTapeName);
+             butm_Dismount(&curTapeInfo);
              SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
          }
  
***************
*** 2422,2427 ****
--- 2432,2438 ----
              if(code) {
                  LogError("Dumper: dump %u: can't write EOT on tape %s \n",
                           code,curNode->dumpID,curTapeName);
+                 butm_Dismount(&curTapeInfo);
                  SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
              }
              mounted = 0;
***************
*** 2429,2435 ****
              if(code) {
                  LogError("Dumper: dump %u: can't dismount tape %s\n",
                           code,curNode->dumpID,curTapeName);
!                 SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch);
              }
  
              /* tell the database that the tape ended */
--- 2440,2448 ----
              if(code) {
                  LogError("Dumper: dump %u: can't dismount tape %s\n",
                           code,curNode->dumpID,curTapeName);
!                 /* Don't abort if it was just a problem unmounting;
!                  * the backup finished... */
!                 /* SetAndReturn(curNode,ERROR | ABORTED,code,deviceLatch); */
              }
  
              /* tell the database that the tape ended */
===================================================================
RCS file: ./butc/RCS/tcmain.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./butc/tcmain.c
*** /tmp/,RCSt1kfAR8e	Wed Jan  1 13:16:01 1992
--- ./butc/tcmain.c	Mon Dec 30 10:19:04 1991
***************
*** 44,49 ****
--- 44,51 ----
  #include <sys/errno.h>
  #include <afs/cmd.h>
  #include <afs/tcdata.h>
+ #include <afs/bc.h>
+ 
  #define N_SECURITY_OBJECTS 3
  #define ERRCODE_RANGE 8                 /* from error_table.h */
  
***************
*** 63,68 ****
--- 65,71 ----
  extern LogTape();
  struct tapeConfig globalTapeConfig;
  struct deviceSyncNode *deviceLatch;
+ struct bc_config *bc_globalConfig;
  char globalCellName[64];
  
  static long SafeATOL(anum)
***************
*** 436,449 ****
      register long code;
      struct rx_securityClass *(securityObjects[3]);
      struct rx_service *service;
-     struct afsconf_dir *tdir;
-     struct ktc_principal sname;
-     struct ktc_token ttoken;
-     long scIndex;
      struct rx_securityClass *sc;
-     int i;
-     struct afsconf_cell info;
-     char cellName[64];
      /*process arguments */
      long portOffset = 0;
      debugLevel = 0;
--- 439,445 ----
***************
*** 464,489 ****
              exit(1);
          }
      }
      if(GetDeviceConfig(tapeConfigFile,&globalTapeConfig,portOffset)){
          fprintf(stderr,"Problem in reading config file %s\n",tapeConfigFile);
          exit(1);
      }
  
- /* take out cell switch for now, so aixscsi becomes position 2 */
- #if 0
-     if (as->parms[2].items) {
-       strncpy(cellName, as->parms[2].items->data, sizeof(cellName));
-     } else {
-       cellName[0] = '\0';
-     }
- 
-     if (as->parms[3].items)
- #else
      if (as->parms[2].items)
- #endif
          globalTapeConfig.aixScsi = 1;
      else
          globalTapeConfig.aixScsi = 0;
      fprintf(stderr,"Tape Coordinator: Port offset %u   Debug level %d  Aix Scsi flag %d\n",
              portOffset,debugLevel,globalTapeConfig.aixScsi);
      strcpy(logFile,lFile);
--- 460,476 ----
              exit(1);
          }
      }
+ 
      if(GetDeviceConfig(tapeConfigFile,&globalTapeConfig,portOffset)){
          fprintf(stderr,"Problem in reading config file %s\n",tapeConfigFile);
          exit(1);
      }
  
      if (as->parms[2].items)
          globalTapeConfig.aixScsi = 1;
      else
          globalTapeConfig.aixScsi = 0;
+ 
      fprintf(stderr,"Tape Coordinator: Port offset %u   Debug level %d  Aix Scsi flag %d\n",
              portOffset,debugLevel,globalTapeConfig.aixScsi);
      strcpy(logFile,lFile);
***************
*** 516,540 ****
      }
      rx_SetRxDeadTime(150);
  
      tdir = afsconf_Open(confDir);
      if (!tdir) {
          fprintf(stderr,"Could not open configuration directory (%s).\n", confDir);
          return -1;
      }
!     if (!cellName[0]) {
        code = afsconf_GetLocalCell(tdir,cellName,sizeof(cellName));
        if (code) {
          printf("butc: can't get the local cell name - check %s/ThisCell\n",confDir);
!         exit(1);
        }
!     }
!     strcpy(globalCellName,cellName);
      code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
!         printf("butc: can't find cell %s's hosts in %s/CellServDB\n", cellName, confDir);
!         exit(1);
      }
      scIndex = 0;
      strcpy(sname.cell, info.name);
      sname.instance[0] = 0;
      strcpy(sname.name, "afs");
--- 503,602 ----
      }
      rx_SetRxDeadTime(150);
  
+     /*initialize the tape module */
+     
+     /*initialize the error tables */
+     initialize_ka_error_table();
+     initialize_rxk_error_table();
+     initialize_ktc_error_table();
+     initialize_acfg_error_table();
+     initialize_cmd_error_table();
+     initialize_vl_error_table();
+     initialize_butm_error_table();
+     initialize_butc_error_table();
+     initialize_vols_error_table();
+ 
+     /*initialize the dumpNode list */
+     InitNodeList();
+ 
+     deviceLatch = (struct deviceSyncNode *)(malloc (sizeof(struct deviceSyncNode)));
+     Lock_Init(&(deviceLatch->lock));
+     deviceLatch->flags = 0;
+ 
+     /* create the lwp to garbage-collect old transactions */
+     LWP_CreateProcess(BKGLoop, 8192, 1, 0, "GC for nodes", &pid);
+ 
+    
+    /* initialize database support
+      initialize the volume support 
+      initialize logs */
+     bc_globalConfig = (struct bc_config *)calloc(1, sizeof(struct bc_config));
+     bc_globalConfig->path = (char *)calloc(1,256);
+ 
+      /* Create a single security object, in this case the null security object, for unauthenticated connections, which will be used to control security on connections made to this server */
+ 
+     securityObjects[0] = (struct rx_securityClass *) rxnull_NewServerSecurityObject();
+     securityObjects[1] = (struct rx_securityClass *) 0; /* don't bother with rxvab */
+     
+     if (securityObjects[0] == (struct rx_securityClass *) 0) Quit("rxnull_NewServerSecurityObject");
+     service = rx_NewService(0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
+     if (service == (struct rx_service *) 0) Quit("rx_NewService");
+     rx_SetMaxProcs(service, 4);
+ 
+     rx_StartServer(1); /* Donate this process to the server process pool */
+     Quit("StartServer returned?");
+     
+ }
+ 
+ long vldbClient_Init(noAuthFlag, cell)
+     int noAuthFlag;
+     char *cell;
+ {
+     register long code;
+     struct rx_securityClass *(securityObjects[3]);
+     struct rx_service *service;
+     struct afsconf_dir *tdir;
+     struct ktc_principal sname;
+     struct ktc_token ttoken;
+     long scIndex;
+     struct rx_securityClass *sc;
+     int i;
+     struct afsconf_cell info;
+     char cellName[64];
+ 
+     /*
+      * Destroy any previous connections
+      */
+     ubik_ClientDestroy(cstruct);
+ 
+     /*
+      * Get the cell configuration
+      */
      tdir = afsconf_Open(confDir);
      if (!tdir) {
          fprintf(stderr,"Could not open configuration directory (%s).\n", confDir);
          return -1;
      }
!     if (!cell || !*cell) {
        code = afsconf_GetLocalCell(tdir, cellName, sizeof(cellName));
        if (code) {
          printf("butc: can't get the local cell name - check %s/ThisCell\n",confDir);
!         return code;
        }
!     } else
!         strncpy(cellName, cell, sizeof(cellName));
! 
      code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
!         printf("butc: can't find cell %s's hosts in %s/CellServDB\n",
!                cellName, confDir);
!         return code;
      }
+ 
      scIndex = 0;
+     strcpy(globalCellName, info.name);
+ 
+     if (!noAuthFlag) {
          strcpy(sname.cell, info.name);
          sname.instance[0] = 0;
          strcpy(sname.name, "afs");
***************
*** 541,558 ****
      code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), (char *)0);
      if (code) {
          fprintf(stderr,"butc: Could not get afs tokens, running unauthenticated.\n");
-         scIndex = 0;
      }
      else {
          /* got a ticket */
!         if (ttoken.kvno >= 0 && ttoken.kvno <= 255) scIndex = 2; /* kerberos */
!         else {
!             fprintf (stderr, "butc: funny kvno (%d) in ticket, proceeding\n",
                       ttoken.kvno);
              scIndex = 2;
          }
      }
-     
      switch (scIndex) {
          case 0 :
              sc = (struct rx_securityClass *) rxnull_NewClientSecurityObject();
--- 603,618 ----
          code = ktc_GetToken(&sname, &ttoken, sizeof(ttoken), (char *)0);
          if (code) {
              fprintf(stderr,"butc: Could not get afs tokens, running unauthenticated.\n");
          }
          else {
              /* got a ticket */
!             if (ttoken.kvno < 0 || ttoken.kvno > 255)
!                 fprintf (stderr,
!                          "butc: funny kvno (%d) in ticket, proceeding\n",
                           ttoken.kvno);
              scIndex = 2;
          }
      }
      switch (scIndex) {
          case 0 :
              sc = (struct rx_securityClass *) rxnull_NewClientSecurityObject();
***************
*** 560,630 ****
          
          case 1 :
              break;
          case 2:
              sc = (struct rx_securityClass *) rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey, ttoken.kvno, ttoken.ticketLen, ttoken.ticket);
              break;
      }
      UV_SetSecurity(sc, scIndex);    /* tell UV module about default authentication */
      if (info.numServers > VLDB_MAXSERVERS) {
          fprintf(stderr, "butc: 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);
  
      code = ubik_ClientInit(serverconns, &cstruct);
- 
      if (code) {
          fprintf(stderr,"butc: ubik client init failed.\n");
          return code;
      }
  
-     /*initialize the tape module */
-     
-     /*initialize the error tables */
-     initialize_ka_error_table();
-     initialize_rxk_error_table();
-     initialize_ktc_error_table();
-     initialize_acfg_error_table();
-     initialize_cmd_error_table();
-     initialize_vl_error_table();
-     initialize_butm_error_table();
-     initialize_butc_error_table();
-     initialize_vols_error_table();
- 
-     /*initialize the dumpNode list */
-     InitNodeList();
- 
-     deviceLatch = (struct deviceSyncNode *)(malloc (sizeof(struct deviceSyncNode)));
-     Lock_Init(&(deviceLatch->lock));
-     deviceLatch->flags = 0;
- 
-     /* create the lwp to garbage-collect old transactions */
-     LWP_CreateProcess(BKGLoop, 8192, 1, 0, "GC for nodes", &pid);
- 
-    
-    /* initialize database support
-      initialize the volume support 
-      initialize logs */
- 
-      /* Create a single security object, in this case the null security object, for unauthenticated connections, which will be used to control security on connections made to this server */
- 
-     securityObjects[0] = (struct rx_securityClass *) rxnull_NewServerSecurityObject();
-     securityObjects[1] = (struct rx_securityClass *) 0; /* don't bother with rxvab */
-     
-     if (securityObjects[0] == (struct rx_securityClass *) 0) Quit("rxnull_NewServerSecurityObject");
-     service = rx_NewService(0, 1, "BUTC", securityObjects, 3, TC_ExecuteRequest);
-     if (service == (struct rx_service *) 0) Quit("rx_NewService");
-     rx_SetMaxProcs(service, 4);
- 
  #ifdef UBIK_DB
      udbClientInit();
      /* udbLocalInit(); */
  #endif UBIK_DB
! 
!     rx_StartServer(1); /* Donate this process to the server process pool */
!     Quit("StartServer returned?");
!     
  }
  
  main(argc, argv)
--- 620,650 ----
          
          case 1 :
              break;
+ 
          case 2:
              sc = (struct rx_securityClass *) rxkad_NewClientSecurityObject(rxkad_clear, &ttoken.sessionKey, ttoken.kvno, ttoken.ticketLen, ttoken.ticket);
              break;
      }
      UV_SetSecurity(sc, scIndex);    /* tell UV module about default authentication */
+ 
      if (info.numServers > VLDB_MAXSERVERS) {
          fprintf(stderr, "butc: info.numServers=%d (> VLDB_MAXSERVERS=%d)\n", info.numServers, VLDB_MAXSERVERS);
!         return 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);
  
      code = ubik_ClientInit(serverconns, &cstruct);
      if (code) {
          fprintf(stderr,"butc: ubik client init failed.\n");
          return code;
      }
  
  #ifdef UBIK_DB
      udbClientInit();
      /* udbLocalInit(); */
  #endif UBIK_DB
!     return 0;
  }
  
  main(argc, argv)
***************
*** 636,645 ****
      ts = cmd_CreateSyntax((char *) 0, WorkerBee, 1, "tape coordinator");
      cmd_AddParm(ts, "-port", CMD_SINGLE, CMD_OPTIONAL, "port offset");
      cmd_AddParm(ts, "-debuglevel", CMD_SINGLE, CMD_OPTIONAL, "debug level");
- /* take out cell switch */
- #if 0
-     cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
- #endif
      cmd_AddParm(ts, "-aixscsi", CMD_FLAG, CMD_OPTIONAL, "aix extended scsi drive");
  
      /* special case "no args" case since cmd_dispatch gives help message instead */
--- 656,661 ----
***************
*** 655,667 ****
          ti->next = 0;
          ti->data = "0";
          ts->parms[1].items = ti;
- /* take out the cell switch, which makes the aixscsi switch position 2 */
- #if 0
          ts->parms[2].items = (struct cmd_item *) NULL;
-         ts->parms[3].items = (struct cmd_item *)0;
- #else
-         ts->parms[2].items = (struct cmd_item *)0;
- #endif
          return WorkerBee(ts, (char *) 0);
      }
      else
--- 671,677 ----
===================================================================
RCS file: ./butc/RCS/tcprocs.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./butc/tcprocs.c
*** /tmp/,RCSt1kfAX8m	Wed Jan  1 13:16:02 1992
--- ./butc/tcprocs.c	Mon Dec 30 10:19:06 1991
***************
*** 46,53 ****
--- 46,55 ----
  #include <afs/fssync.h>
  #include <afs/acl.h>
  #include <afs/tcdata.h>
+ #include <afs/bc.h>
  
  
+ 
  extern struct rx_securityClass *rxnull_NewServerSecurityObject();
  extern struct rx_service *rx_NewService();
  extern struct rx_securityClass *rxnull_NewClientSecurityObject();
***************
*** 56,63 ****
--- 58,67 ----
  extern int Labeller();
  extern int ReadLabel();
  extern int WatchDog();
+ extern long vldbClient_Init();
  extern int debugLevel;
  extern struct deviceSyncNode *deviceLatch;
+ extern struct bc_config *bc_globalConfig;
  extern void EnterDeviceQueue();
  
  /* STC_PerformDump
***************
*** 64,76 ****
   *      Tape coordinator server routine to do a dump
   */
  
! STC_PerformDump(acid, dumpSetName, aTapeSet, dumpName, adumps, parentDumpID,
!                 dumpLevel, dumpID)
  struct rx_call *acid;
  char *dumpSetName;
  struct tc_tapeSet *aTapeSet;
  char *dumpName;
  tc_dumpArray *adumps;
  long parentDumpID,dumpLevel;
  long *dumpID;
  {
--- 68,82 ----
   *      Tape coordinator server routine to do a dump
   */
  
! STC_PerformDump(acid, dumpSetName, aTapeSet, dumpName, adumps,
!                 cell, dbdir, parentDumpID, dumpLevel, dumpID)
  struct rx_call *acid;
  char *dumpSetName;
  struct tc_tapeSet *aTapeSet;
  char *dumpName;
  tc_dumpArray *adumps;
+ char *cell;
+ char *dbdir;
  long parentDumpID,dumpLevel;
  long *dumpID;
  {
***************
*** 100,105 ****
--- 106,115 ----
      newNode->level = dumpLevel;
      /* should be logging  the intent */
  
+     /* Initialize VLDB client */
+     strcpy(bc_globalConfig->path,dbdir);
+     vldbClient_Init(0, cell);
+ 
      /* create the LWP to do the real work behind the scenes */
      code = LWP_CreateProcess(Dumper,16384, 1,newNode ,"dumper process",
                               &(newNode->pid));
***************
*** 124,133 ****
      return GetNthNode(aindex, aresult);
  }
  
! STC_PerformRestore(acid,  dumpSetName, arestores, dumpID)
  struct rx_call *acid;
  char *dumpSetName;
  tc_restoreArray *arestores;
  long *dumpID;
  {
  
--- 134,145 ----
      return GetNthNode(aindex, aresult);
  }
  
! STC_PerformRestore(acid, dumpSetName, arestores, cell, dbdir, dumpID)
  struct rx_call *acid;
  char *dumpSetName;
  tc_restoreArray *arestores;
+ char *cell;
+ char *dbdir;
  long *dumpID;
  {
  
***************
*** 148,153 ****
--- 160,169 ----
      newNode->opcode = RESTORE;
      /* should log the intent */
  
+     /* Initialize VLDB client */
+     strcpy(bc_globalConfig->path, dbdir);
+     vldbClient_Init(0, cell);
+ 
      /* create the LWP to do the real work behind the scenes */
      code = LWP_CreateProcess(Restorer,16384, 1,newNode ,"dumper process",&(newNode->pid));
      if(code) return code;
***************
*** 368,376 ****
   *      addDbFlag - if set, the information will be added to the database
   */
  
! STC_ScanDumps(acid, addDbFlag)
       struct rx_call *acid;
       long addDbFlag;
  {
      long pid;
      long code;
--- 384,393 ----
   *      addDbFlag - if set, the information will be added to the database
   */
  
! STC_ScanDumps(acid, addDbFlag, dbdir)
       struct rx_call *acid;
       long addDbFlag;
+      char *dbdir;
  {
      long pid;
      long code;
***************
*** 378,383 ****
--- 395,401 ----
      extern long ScanDumps();
     
      EnterDeviceQueue(deviceLatch);
+     strcpy(bc_globalConfig->path, dbdir);
      code = LWP_CreateProcess(ScanDumps,16384, 1,addDbFlag ,
                           "scandump process",&pid);
      /* code = ScanDumps(addDbFlag); */
===================================================================
RCS file: ./cmd/RCS/cmd.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./cmd/cmd.c
*** /tmp/,RCSt1kfAaWT	Wed Jan  1 13:16:03 1992
--- ./cmd/cmd.c	Mon Dec 30 09:36:24 1991
***************
*** 1,5 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/cmd/RCS/cmd.c,v 1.1 91/12/23 17:00:50 probe Exp $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/cmd/RCS/cmd.c,v $ */
  
  /* Copyright (C) 1989 Transarc Corporation - All rights reserved */
  
--- 1,5 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/cmd/RCS/cmd.c,v 1.2 91/12/30 09:36:08 probe Exp $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/cmd/RCS/cmd.c,v $ */
  
  /* Copyright (C) 1989 Transarc Corporation - All rights reserved */
  
***************
*** 10,19 ****
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/cmd/RCS/cmd.c,v 1.1 91/12/23 17:00:50 probe Exp $";
  #endif
  
  /* $Log:        cmd.c,v $
   * Revision 1.1  91/12/23  17:00:50  probe
   * Initial revision
   * 
--- 10,22 ----
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/cmd/RCS/cmd.c,v 1.2 91/12/30 09:36:08 probe Exp $";
  #endif
  
  /* $Log:        cmd.c,v $
+  * Revision 1.2  91/12/30  09:36:08  probe
+  * Missing quote
+  * 
   * Revision 1.1  91/12/23  17:00:50  probe
   * Initial revision
   * 
***************
*** 655,661 ****
              /* if there is an initcmd, don't print an error message, just
                 setup to use the initcmd below. */
              if (!(initcmdpossible && FindSyntax(initcmd_opcode, (int *) 0))) {
!                 printf("%s: Type '%s help' or '%s help <topic> for help\n",
                         pname, pname, pname);
                  return(CMD_USAGE);
              }
--- 658,664 ----
              /* if there is an initcmd, don't print an error message, just
                 setup to use the initcmd below. */
              if (!(initcmdpossible && FindSyntax(initcmd_opcode, (int *) 0))) {
!                 printf("%s: Type '%s help' or '%s help <topic>' for help\n",
                         pname, pname, pname);
                  return(CMD_USAGE);
              }
===================================================================
RCS file: ./comerr/RCS/compile_et.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./comerr/compile_et.c
*** /tmp/,RCSt1kfAcO7	Wed Jan  1 13:16:05 1992
--- ./comerr/compile_et.c	Mon Dec 30 09:36:46 1991
***************
*** 8,13 ****
--- 8,14 ----
   */
  
  #include <stdio.h>
+ #include <sys/types.h>
  #include <sys/file.h>
  #include <string.h>
  #include <sys/param.h>
***************
*** 23,29 ****
      "Copyright 1987,1988 by MIT Student Information Processing Board";
  
  static const char rcsid_compile_et_c[] =
!     "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/comerr/RCS/compile_et.c,v 1.1 91/12/23 17:00:52 probe Exp $";
  #endif
  
  extern char *gensym();
--- 24,30 ----
      "Copyright 1987,1988 by MIT Student Information Processing Board";
  
  static const char rcsid_compile_et_c[] =
!     "$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/comerr/RCS/compile_et.c,v 1.2 91/12/30 09:36:32 probe Exp $";
  #endif
  
  extern char *gensym();
===================================================================
RCS file: ./config/RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./config/Makefile
*** /tmp/,RCSt1kfAht%	Wed Jan  1 13:16:06 1992
--- ./config/Makefile	Mon Dec 30 09:25:48 1991
***************
*** 1,6 ****
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/config/RCS/Makefile,v 1.1 91/12/23 17:00:54 probe Exp $
  
  DESTDIR=/usr/andy/
  SRCDIR=/usr/andy/
--- 1,6 ----
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/config/RCS/Makefile,v 1.2 91/12/30 09:24:57 probe Exp $
  
  DESTDIR=/usr/andy/
  SRCDIR=/usr/andy/
***************
*** 8,14 ****
  SYS_NAME=`sys`
  SHELL=/bin/sh
  
! CFLAGS=-g -I${SRCDIR}include
  
  all: config param.h
  
--- 8,14 ----
  SYS_NAME=`sys`
  SHELL=/bin/sh
  
! CFLAGS= -I${SRCDIR}include
  
  all: config param.h
  
***************
*** 24,30 ****
  param.h: param.xxx
          -if cmp -s param.h param.${SYS_NAME}; \
             then echo param.h up to date ; \
!            else chmod +w param.h ; cp param.${SYS_NAME} param.h ; \
           fi
          -mkdir ${KERNELDIR}
          -mkdir ${KERNELDIR}/afs
--- 24,30 ----
  param.h: param.xxx
          -if cmp -s param.h param.${SYS_NAME}; \
             then echo param.h up to date ; \
!            else rm param.h ; cp param.${SYS_NAME} param.h ; \
           fi
          -mkdir ${KERNELDIR}
          -mkdir ${KERNELDIR}/afs
***************
*** 38,46 ****
--- 38,50 ----
  
  ${KERNELDIR}/afs/param.h ${DESTDIR}include/afs/param.h: param.h
          rm -f ${KERNELDIR}/afs/param.h
+         rm -f ${KERNELDIR}/afs/param.${SYS_NAME}
          cp param.h ${KERNELDIR}/afs/param.h
+         cp param.h ${KERNELDIR}/afs/param.${SYS_NAME}
          cp param.h ${DESTDIR}include/afs/param.h
+         cp param.h ${DESTDIR}include/afs/param.${SYS_NAME}
          -chmod 666 ${DESTDIR}include/afs/param.h
+         -chmod 666 ${DESTDIR}include/afs/param.${SYS_NAME}
  
  param: ${KERNELDIR}/afs/param.h ${DESTDIR}include/afs/param.h
  
***************
*** 52,58 ****
          cp stds.h ${DESTDIR}include/afs/stds.h
          -chmod 666 ${DESTDIR}include/afs/stds.h
  
! xprt.both: ${KERNELDIR}/afs/permit_xprt.h ${DESTDIR}/include/afs/permit_xprt.h
  ${KERNELDIR}/afs/permit_xprt.h ${DESTDIR}/include/afs/permit_xprt.h:
          @rm -f ${KERNELDIR}/afs/permit_xprt.h \
                 ${DESTDIR}/include/afs/permit_xprt.h \
--- 56,62 ----
          cp stds.h ${DESTDIR}include/afs/stds.h
          -chmod 666 ${DESTDIR}include/afs/stds.h
  
! xprt.both: ${KERNELDIR}/afs/permit_xprt.h ${DESTDIR}/include/afs/permit_xprt.h param.h
  ${KERNELDIR}/afs/permit_xprt.h ${DESTDIR}/include/afs/permit_xprt.h:
          @rm -f ${KERNELDIR}/afs/permit_xprt.h \
                 ${DESTDIR}/include/afs/permit_xprt.h \
===================================================================
RCS file: ./config/RCS/param.rt_aos4,v
retrieving revision 1.1
diff -btw -c -r1.1 ./config/param.rt_aos4
*** /tmp/,RCSt1kfAkhR	Wed Jan  1 13:16:07 1992
--- ./config/param.rt_aos4	Mon Dec 30 09:24:39 1991
***************
*** 7,17 ****
  #define AFS_VFSINCL_ENV    1
  #define AFS_GREEDY43_ENV        1
  #define AFS_ENV  1
! #define AFS_MINPHYS_ENV 1
! #define CMUSTD_ENV      1
  #define AFS_IBM_ENV  1
! #define AFS_MAXTEXTCACHE_HACK 1
  
  /* basic system call numbers */
  #define AFS_PIOCTL      159
  #define AFS_SETPAG      160
--- 7,24 ----
  #define AFS_VFSINCL_ENV         1
  #define AFS_GREEDY43_ENV        1
  #define AFS_ENV                 1
! #define AFS_QUIETFS_ENV         1
! #define AFS_TRYGETFS_ENV        1
  #define AFS_IBM_ENV             1
! #define CMUSTD_ENV              1
  
+ #define AFS_ATHENA_ENV          1
+ #define AFS_ATHENA_STDENV       1
+ #define AFS_NO_STRTOL_ENV       1
+ #define AFS_PREFER_LOCAL        1
+ #define AFS_NOMEMCACHE          1
+ #define AFS_NORMTSYS            1
+ 
  /* basic system call numbers */
  #define AFS_PIOCTL      159
  #define AFS_SETPAG      160
***************
*** 24,30 ****
  #define AFS_AFSCALL     181
  
  /* File system entry (used if mount.h doesn't define MOUNT_AFS */
! #define AFS_MOUNT_AFS   3
  
  /* Machine / Operating system information */
  #define sys_rt_r4       1
--- 31,37 ----
  #define AFS_AFSCALL     181
  
  /* File system entry (used if mount.h doesn't define MOUNT_AFS */
! #define AFS_MOUNT_AFS   4
  
  /* Machine / Operating system information */
  #define sys_rt_r4  1
***************
*** 35,44 ****
  /* Extra kernel definitions (from kdefs file) */
  #ifdef KERNEL
  /* rt definitions here */
! #define AFS_VFS34       1
  #define AFS_SHORTGID    1               /* are group id's short? */
- #define AFS_ADDTRYGETFS_ENV     1       /* add trygetfs function to kernel */
- #define AFS_SYSVLOCK    1               /* system V locking supported */
  #define AFS_USEBUFFERS  1
  #define afsio_iov       uio_iov
  #define afsio_iovcnt    uio_iovcnt
--- 42,49 ----
  /* Extra kernel definitions (from kdefs file) */
  #ifdef KERNEL
  /* rt definitions here */
! #define AFS_VFS30       1
  #define AFS_SHORTGID    1               /* are group id's short? */
  #define AFS_USEBUFFERS  1
  #define afsio_iov       uio_iov
  #define afsio_iovcnt    uio_iovcnt
***************
*** 47,58 ****
  #define afsio_resid     uio_resid
  #define AFS_UIOSYS      UIO_SYSSPACE
  #define AFS_UIOUSER     UIO_USERSPACE
! #define AFS_CLBYTES     MB_CLBYTES
  #define AFS_MINCHANGE   2
  #define osi_GetTime(x)  microtime(x)
  #define AFS_KALLOC      kmem_alloc
  #define AFS_KFREE       kmem_free
  #define VATTR_NULL      vattr_null
  #endif KERNEL
  
  #endif  _PARAM_RT_AOS4_H_
--- 52,65 ----
  #define afsio_resid     uio_resid
  #define AFS_UIOSYS      UIO_SYSSPACE
  #define AFS_UIOUSER     UIO_USERSPACE
! #define AFS_CLBYTES     MCLBYTES
  #define AFS_MINCHANGE   2
  #define osi_GetTime(x)  microtime(x)
  #define AFS_KALLOC      kmem_alloc
  #define AFS_KFREE       kmem_free
  #define VATTR_NULL      vattr_null
+ 
+ #define AFS_ATHENA_BSD  1
  #endif KERNEL
  
  #endif _PARAM_RT_AOS4_H_
===================================================================
RCS file: ./config/RCS/param.pmax_ul4,v
retrieving revision 1.1
diff -btw -c -r1.1 ./config/param.pmax_ul4
*** /tmp/,RCSt1kfAq6_	Wed Jan  1 13:16:07 1992
--- ./config/param.pmax_ul4	Mon Dec 30 09:24:36 1991
***************
*** 15,20 ****
--- 15,26 ----
  #define AFS_DECMIPS_30 1
  #define AFS_DECMIPS_40 1
  
+ #define AFS_ATHENA_ENV          1
+ #define AFS_ATHENA_STDENV       1
+ #define AFS_PREFER_LOCAL        1
+ #define AFS_NOMEMCACHE          1
+ #define AFS_NORMTSYS            1
+ 
  /* basic system call numbers */
  #define AFS_PIOCTL      224
  #define AFS_SETPAG      225
***************
*** 37,44 ****
  #define sys_pmax_ul31  1
  #define sys_pmax_31d 1
  #define sys_pmax_ul31d 1
- #define SYS_NAME        "pmax_ul4"
  #define sys_pmax_ul4 1
  #define sys_pmax_ul40 1
  
  #define AFSLITTLE_ENDIAN        1
--- 43,50 ----
  #define sys_pmax_ul31  1
  #define sys_pmax_31d 1
  #define sys_pmax_ul31d 1
  #define sys_pmax_ul4 1
+ #define SYS_NAME        "pmax_ul4"
  #define sys_pmax_ul40 1
  
  #define AFSLITTLE_ENDIAN        1
===================================================================
RCS file: ./config/RCS/param.rs_aix31,v
retrieving revision 1.1
diff -btw -c -r1.1 ./config/param.rs_aix31
*** /tmp/,RCSt1kfAsaB	Wed Jan  1 13:16:08 1992
--- ./config/param.rs_aix31	Mon Dec 30 09:24:38 1991
***************
*** 8,13 ****
--- 8,20 ----
  #define AFS_AIX_ENV             1
  #define AFS_AIX31_ENV           1
  
+ #define AFS_ATHENA_ENV          1
+ #define AFS_ATHENA_STDENV       1
+ #define AFS_PREFER_LOCAL        1
+ #define AFS_NOMEMCACHE          1
+ #define AFS_NORMTSYS            1
+ 
+ 
  /* basic system call numbers */
  #define AFS_PIOCTL      224
  #define AFS_SETPAG      225
===================================================================
RCS file: ./config/RCS/param.vax_bsd43,v
retrieving revision 1.1
diff -btw -c -r1.1 ./config/param.vax_bsd43
*** /tmp/,RCSt1kfAzFz	Wed Jan  1 13:16:08 1992
--- ./config/param.vax_bsd43	Mon Dec 30 09:24:42 1991
***************
*** 0 ****
--- 1,64 ----
+ /* THIS FILE IS AUTOMATICALLY GENERATED; DO NOT EDIT */
+ 
+ #ifndef _PARAM_VAX_BSD43_H_
+ #define _PARAM_VAX_BSD43_H_
+ 
+ #define AFS_VFS_ENV             1
+ #define AFS_VFSINCL_ENV         1
+ #define AFS_GREEDY43_ENV        1
+ #define AFS_ENV                 1
+ #define AFS_QUIETFS_ENV         1
+ #define AFS_TRYGETFS_ENV        1
+ #define AFS_DEC_ENV             1
+ #define CMUSTD_ENV              1
+ 
+ #define AFS_ATHENA_ENV          1
+ #define AFS_ATHENA_STDENV       1
+ #define AFS_NO_STRTOL_ENV       1
+ #define AFS_PREFER_LOCAL        1
+ #define AFS_NOMEMCACHE          1
+ #define AFS_NORMTSYS            1
+ 
+ /* basic system call numbers */
+ #define AFS_PIOCTL      182
+ #define AFS_SETPAG      183
+ #define AFS_IOPEN       177
+ #define AFS_ICREATE     184
+ #define AFS_IREAD       178
+ #define AFS_IWRITE      179
+ #define AFS_IINC        180
+ #define AFS_IDEC        181
+ #define AFS_AFSCALL     185
+ 
+ /* File system entry (used if mount.h doesn't define MOUNT_AFS */
+ #define AFS_MOUNT_AFS   4
+ 
+ /* Machine / Operating system information */
+ #define sys_vax_43  1
+ #define sys_vax_bsd43  1
+ #define SYS_NAME        "vax_bsd43"
+ 
+ /* Extra kernel definitions (from kdefs file) */
+ #ifdef KERNEL
+ #define AFS_VFS30       1
+ #define AFS_USEBUFFERS  1
+ #define AFS_SHORTGID    1               /* are group id's short? */
+ #define AFS_ACTCHAIN    1               /* standard 4.3 act chain to next addr mbuf */
+ #define afsio_iov       uio_iov
+ #define afsio_iovcnt    uio_iovcnt
+ #define afsio_offset    uio_offset
+ #define afsio_seg       uio_segflg
+ #define afsio_resid     uio_resid
+ #define AFS_UIOSYS      UIO_SYSSPACE
+ #define AFS_UIOUSER     UIO_USERSPACE
+ #define AFS_CLBYTES     CLBYTES            /* MCLBYTES on RT's */
+ #define osi_GetTime(x)  microtime(x)
+ #define strcpy(_to,_from) (bcopy(_from,_to,strlen(_from)+1),(char *)_to)
+ #define AFS_KALLOC kmem_alloc
+ #define AFS_KFREE kmem_free
+ #define VATTR_NULL vattr_null
+ 
+ #define AFS_ATHENA_BSD  1
+ #endif KERNEL
+ 
+ #endif _PARAM_VAX_BSD43_H_
===================================================================
RCS file: ./libafs/RCS/MakefileProto,v
retrieving revision 1.1
diff -btw -c -r1.1 ./libafs/MakefileProto
*** /tmp/,RCSt1kfA0Dy	Wed Jan  1 13:16:09 1992
--- ./libafs/MakefileProto	Wed Jan  1 09:47:59 1992
***************
*** 1,5 ****
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/libafs/RCS/MakefileProto,v 1.1 91/12/23 17:00:57 probe Exp $
  # 
  # Sample test makefile to create the libafs library for the aix kernel
  #
--- 1,5 ----
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/libafs/RCS/MakefileProto,v 1.2 92/01/01 09:46:46 probe Exp $
  # 
  # Sample test makefile to create the libafs library for the aix kernel
  #
***************
*** 55,61 ****
        INCL0 = -I. -I${VRMIX}/inc -I${VRMIX}/inc/sys
         KOFF =
        KDEF0 = -DKERNEL -D_KERNEL -DAFS -DAFS_COMMON -D_VOPS -D_SUN
!       KDEFS = -g ${KDEF0} ${INCL0} ${KOFF}
      LDFLAG0 = -bexport:../${DESTDIR}/lib/afs/afs.exp ${IMPORTS}
      LDFLAGS = ${LDFLAG0} ../${DESTDIR}bos/lib/rpc/librpc.a -lcsys -lsys
  
--- 55,61 ----
        INCL0 = -I. -I${VRMIX}/inc -I${VRMIX}/inc/sys
         KOFF =
        KDEF0 = -DKERNEL -D_KERNEL -DAFS -DAFS_COMMON -D_VOPS -D_SUN
!       KDEFS =  ${KDEF0} ${INCL0} ${KOFF}
      LDFLAG0 = -bexport:../${DESTDIR}/lib/afs/afs.exp ${IMPORTS}
      LDFLAGS = ${LDFLAG0} ../${DESTDIR}bos/lib/rpc/librpc.a -lcsys -lsys
  
***************
*** 101,107 ****
  KDEFS=-S -DVAX3600 -DVAX6200 -DMVAX -DEMULFLT
  <pmax_30 pmax_31 pmax_ul3 decmips_30 pmax_ul31d pmax_ul40 pmax_ul4>
  GP_VALUE=8
! KDEFS=-EL -DR2000a -DSYS_TRACE -DMIPS -G ${GP_VALUE} -g
  <mac_aux10>
  KDEFS=-DPAGING -DSTREAMS
  <mac2_51 mac_mach51>
--- 101,107 ----
  KDEFS=-S -DVAX3600 -DVAX6200 -DMVAX -DEMULFLT
  <pmax_30 pmax_31 pmax_ul3 decmips_30 pmax_ul31d pmax_ul40 pmax_ul4>
  GP_VALUE=8
! KDEFS=-EL -DR2000a -DSYS_TRACE -DMIPS -G ${GP_VALUE} 
  <mac_aux10>
  KDEFS=-DPAGING -DSTREAMS
  <mac2_51 mac_mach51>
***************
*** 117,123 ****
  LD = kl_ld
  NEXT_LIBS = -lkernload
  <all>
! DEFINES= -DAFSDEBUG -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA
  
  CFLAGS=-I. $(DEFINES) $(KDEFS) $(KOPTS)
  CPP     =/lib/cpp
--- 117,123 ----
  LD = kl_ld
  NEXT_LIBS = -lkernload
  <all>
! DEFINES= -DKERNEL -DAFS -DVICE -DNFS -DUFS -DINET -DQUOTA
  
  CFLAGS=-I. $(DEFINES) $(KDEFS) $(KOPTS)
  CPP     =/lib/cpp
***************
*** 375,381 ****
  <rs_aix31>
  all system:             setup afs.ext
  kinstall install:       system
!         ${INSTALL} -f COMMON/afs.ext ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext.trans
          ${INSTALL} -f COMMON_NONFS/afs.ext ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext
          -${STRIP} ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext
          -${STRIP} ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext.trans
--- 375,381 ----
  <rs_aix31>
  all system:             setup afs.ext
  kinstall install:       system
!         -${INSTALL} -f COMMON/afs.ext ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext.trans
          ${INSTALL} -f COMMON_NONFS/afs.ext ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext
          -${STRIP} ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext
          -${STRIP} ${DESTDIR}root.client/usr/vice/etc/dkload/afs.ext.trans
***************
*** 382,388 ****
  
  COMMON/libafsa.a: FRC
          cd COMMON; make COMMON.libafs DESTDIR=../${DESTDIR} VRMIX=../${DESTDIR}/bos
!         cd COMMON; ${LD} -o afs.ext -eafs_config ../afs_config.o ../afs_syms.o libafsa.a ${LIBS} ${LDFLAGS}
  
  COMMON_NONFS/libafsa.a: FRC
          cd COMMON_NONFS; make COMMON_NONFS.libafs DESTDIR=../${DESTDIR} VRMIX=${DESTDIR}/bos
--- 382,388 ----
  
  COMMON/libafsa.a: FRC
          cd COMMON; make COMMON.libafs DESTDIR=../${DESTDIR} VRMIX=../${DESTDIR}/bos
!         cd COMMON; ${LD} -o afs.ext -eafs_config ../afs_config.o ../afs_syms.o libafsa.a ${LIBS} ${LDFLAGS} ../DEST/bos/lib/libdes.a
  
  COMMON_NONFS/libafsa.a: FRC
          cd COMMON_NONFS; make COMMON_NONFS.libafs DESTDIR=../${DESTDIR} VRMIX=${DESTDIR}/bos
===================================================================
RCS file: ./lwp/RCS/iomgr.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./lwp/iomgr.c
*** /tmp/,RCSt1kfA6D6	Wed Jan  1 13:16:11 1992
--- ./lwp/iomgr.c	Wed Jan  1 09:48:59 1992
***************
*** 1,8 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v 1.1 91/12/23 17:00:59 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v 1.1 91/12/23 17:00:59 probe Exp $";
  #endif
  
  /*
--- 1,8 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v 1.2 92/01/01 09:48:40 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/iomgr.c,v 1.2 92/01/01 09:48:40 probe Exp $";
  #endif
  
  /*
***************
*** 42,47 ****
--- 42,48 ----
  
  #include <afs/param.h>
  #include <stdio.h>
+ #include <sys/types.h>
  #include "lwp.h"
  #include <sys/time.h>
  #include "timer.h"
===================================================================
RCS file: ./lwp/RCS/fasttime.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./lwp/fasttime.c
*** /tmp/,RCSt1kfA8EC	Wed Jan  1 13:16:13 1992
--- ./lwp/fasttime.c	Wed Jan  1 09:48:28 1992
***************
*** 1,8 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v 1.1 91/12/23 17:01:01 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v 1.1 91/12/23 17:01:01 probe Exp $";
  #endif
  
  /*
--- 1,8 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v 1.2 92/01/01 09:48:23 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/fasttime.c,v 1.2 92/01/01 09:48:23 probe Exp $";
  #endif
  
  /*
***************
*** 48,54 ****
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/file.h>
! #ifndef AFS_AIX_ENV
  #include <sys/mman.h>
  #endif
  #include <nlist.h>
--- 48,54 ----
  #include <sys/types.h>
  #include <sys/time.h>
  #include <sys/file.h>
! #if !defined(AFS_AIX_ENV) && !defined(AFS_AUX_ENV)
  #include <sys/mman.h>
  #endif
  #include <nlist.h>
===================================================================
RCS file: ./lwp/RCS/process.s,v
retrieving revision 1.1
diff -btw -c -r1.1 ./lwp/process.s
*** /tmp/,RCSt1kfBCv0	Wed Jan  1 13:16:14 1992
--- ./lwp/process.s	Wed Jan  1 09:49:14 1992
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/process.s,v 1.1 91/12/23 17:02:25 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/process.s,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/process.s,v 1.2 92/01/01 09:49:00 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/lwp/RCS/process.s,v $ */
  
  /*
***************
*** 97,103 ****
  
  #endif  /* RIOS */
  
! #ifdef mc68000
  /*
  #
  #       Information Technology Center
--- 97,103 ----
  
  #endif  /* RIOS */
  
! #if defined(mc68000) && !defined(AFS_AUX_ENV)
  /*
  #
  #       Information Technology Center
***************
*** 185,190 ****
--- 185,261 ----
          clrb    _PRE_Block
          rts                             | Return to previous process
  #endif mc68000
+ 
+ #if defined(m68k) && defined(AFS_AUX_ENV)
+         data
+         text
+         even
+ /*
+ #
+ # struct savearea {
+ #       char    *topstack;
+ # }
+ #
+ */
+         global  PRE_Block
+ 
+         set topstack,0
+ /* Stuff to allow saving/restoring registers */
+         set nregs,13
+         set regs, 0x3ffe                        # d1-d7 & a0-a5
+ 
+ /*
+ # savecontext(f, area1, newsp)
+ #     int (*f)(); struct savearea *area1; char *newsp;
+ */
+ 
+ /* Stack offsets of arguments */
+         set f, 8
+         set area1,12
+         set newsp, 16
+ 
+         global  savecontext
+ savecontext:
+         move.b  &1,PRE_Block            # Don't allow any interrupt finagling
+         link.w  %a6,&-(nregs*4)         # Save frame pointer & ...
+                                         # ... allocate space for nregs registers
+ /* Save registers */
+         movem.l &regs,(%sp)
+         move.l  area1(%a6),%a0          # a0 = base of savearea
+         move.l  %sp,topstack(%a0)       # area->topstack = sp
+         move.l  newsp(%a6),%d0          # Get new sp
+         beq.l   foo                     # If newsp == 0, no stack switch
+         move.l  %d0,%sp                 # Switch to new stack
+ foo:
+         move.l  f(%a6),%a0              # a0 = f
+         jsr     (%a0)                   # f()
+ 
+ /* It is impossible to be here, so abort() */
+ 
+         jsr     abort
+ /*
+ # returnto(area2)
+ #     struct savearea *area2;
+ */
+ 
+ /* Stack offset of argument */
+         set area2, 8
+ 
+         global returnto
+ returnto:
+         link.l  %a6,&0
+         move.l  area2(%a6),%a0          # Base of savearea
+         move.l  topstack(%a0),%sp       # Restore sp
+ /* Restore registers */
+         movem.l (%sp),&regs
+ 
+         add.l   &(nregs*4),%sp
+         move.l  %sp,%a6                 # Argghh...be careful here
+         unlk    %a6
+         clr.b   PRE_Block
+         rts                             # Return to previous process
+ #endif AFS_AUX_ENV 
+ 
  #ifdef sparc
  #include        <sun4/asm_linkage.h>
  #include  <sun4/trap.h>
===================================================================
RCS file: ./pinstall/RCS/install.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./pinstall/install.c
*** /tmp/,RCSt1kfBEHX	Wed Jan  1 13:16:15 1992
--- ./pinstall/install.c	Mon Dec 30 09:44:44 1991
***************
*** 19,30 ****
  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  SOFTWARE.
  ******************************************************************/
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/pinstall/RCS/install.c,v 1.1 91/12/23 17:02:28 probe Exp $ */
  /* $ACIS: $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/pinstall/RCS/install.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/pinstall/RCS/install.c,v 1.1 91/12/23 17:02:28 probe Exp $ ";
  #endif
  
  /* ALSO utimes and strip the file
--- 19,30 ----
  ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
  SOFTWARE.
  ******************************************************************/
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/pinstall/RCS/install.c,v 1.2 91/12/30 09:44:21 probe Exp $ */
  /* $ACIS: $ */
! /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/pinstall/RCS/install.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/pinstall/RCS/install.c,v 1.2 91/12/30 09:44:21 probe Exp $ ";
  #endif
  
  /* ALSO utimes and strip the file
***************
*** 664,669 ****
--- 664,707 ----
  }
  
  #else   !AFS_NEXT_ENV
+ #ifdef  AFS_AUX_ENV
+ int quickStrip(fd, asize)
+ int fd; /* file descriptor */
+ long asize; /* ignored */
+ {
+     FILHDR fheader;
+     int dum, newlen;
+ 
+     /* Read the file header, if it is one. */
+     if (lseek(fd, 0, L_SET) == -1) {
+         printf("Initial lseek failed while stripping file: %s\n", ErrorString(errno));
+         return -1;
+     }
+     dum = read(fd, (char *) &fheader, sizeof(fheader));
+     /* Fail on I/O error */
+     if (dum < 0) {
+         printf("Initial read failed while stripping: %s\n", ErrorString(errno)); 
+         return -1;
+     }
+     /* If the file is smaller than a file header, forget it. */
+     if (dum != sizeof(fheader)) return 0;
+     if ((fheader.f_flags & F_EXEC) == 0 ||
+         fheader.f_magic != MC68MAGIC)
+         return 0;
+ 
+     /* Already stripped? */
+     if (fheader.f_symptr == 0 || fheader.f_nsyms == 0) return 0;
+     /* Strip it.  Zero out the symbol pointers. */
+     newlen = fheader.f_symptr;
+     fheader.f_symptr = 0;
+     fheader.f_nsyms = 0;
+     if (lseek(fd, 0, L_SET) == -1) return -1;
+     if (write(fd, (char *) &fheader, sizeof(fheader)) != sizeof(fheader)) return -1;
+ /* Now truncate the file itself. */
+     if (ftruncate(fd, newlen) != 0) return -1;
+     return 0;
+ }
+ #else !AFS_AUX_ENV
  static int quickStrip (afd, asize)
      int afd;
      long asize; {
***************
*** 699,704 ****
--- 737,743 ----
          }
      return 0;
      }
+ #endif AFS_AUX_ENV
  #endif AFS_NEXT_ENV
  #endif mips
  #endif
***************
*** 842,848 ****
                  /* else create dir component if it doesn't exist */
                  code = stat(protopath, &istat);
                  if (code && (errno == ENOENT)) {
!                     code = mkdir (protopath, 0700);
                      if (code) {
                          printf ("Can't create destination path at %s\n",
                                  protopath);
--- 881,887 ----
                  /* else create dir component if it doesn't exist */
                  code = stat(protopath, &istat);
                  if (code && (errno == ENOENT)) {
!                     code = mkdir (protopath, 0777);
                      if (code) {
                          printf ("Can't create destination path at %s\n",
                                  protopath);
===================================================================
RCS file: ./ptserver/RCS/ptutils.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./ptserver/ptutils.c
*** /tmp/,RCSt1kfBKHf	Wed Jan  1 13:16:17 1992
--- ./ptserver/ptutils.c	Wed Jan  1 09:49:53 1992
***************
*** 33,39 ****
  #include "ptserver.h"
  #include "pterror.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/ptserver/RCS/ptutils.c,v 1.1 91/12/23 17:02:29 probe Exp $")
  
  extern struct ubik_dbase *dbase;
  extern struct afsconf_dir *prdir;
--- 33,39 ----
  #include "ptserver.h"
  #include "pterror.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/ptserver/RCS/ptutils.c,v 1.2 92/01/01 09:49:34 probe Exp $")
  
  extern struct ubik_dbase *dbase;
  extern struct afsconf_dir *prdir;
***************
*** 271,277 ****
                  }
                  n = ntohl(*nP);
                  if (n <= 0) {
!                     if (!pr_noAuth) return PRNOMORE;
                  }
                  else {                  /* don't use up admin user's quota */
                      int admin = ((creator == SYSADMINID) ||
--- 271,279 ----
                  }
                  n = ntohl(*nP);
                  if (n <= 0) {
!                     if (!pr_noAuth &&
!                         !IsAMemberOf (at, creator, SYSADMINID))
!                         return PRNOMORE;
                  }
                  else {                  /* don't use up admin user's quota */
                      int admin = ((creator == SYSADMINID) ||
===================================================================
RCS file: ./ptserver/RCS/testpt.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./ptserver/testpt.c
*** /tmp/,RCSt1kfBMAI	Wed Jan  1 13:16:18 1992
--- ./ptserver/testpt.c	Mon Dec 30 09:38:06 1991
***************
*** 1,7 ****
  /* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/ptserver/RCS/testpt.c,v 1.1 91/12/23 17:02:31 probe Exp $";
  #endif
  
  #include <ctype.h>
--- 1,7 ----
  /* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/ptserver/RCS/testpt.c,v 1.2 91/12/30 09:37:37 probe Exp $";
  #endif
  
  #include <ctype.h>
***************
*** 10,15 ****
--- 10,17 ----
  #include <sys/socket.h>
  #include <netdb.h>
  #include <netinet/in.h>
+ 
+ #include <afs/param.h>
  #include <rx/rx.h>
  #include <rx/xdr.h>
  #include <afs/rxgen_consts.h>
***************
*** 23,29 ****
  extern char *ucstring();
  extern char *lcstring();
  
! static char *whoami = "testpr";
  static struct afsconf_dir *conf;        /* cell info, set by MyBeforeProc */
  static char  conf_dir[100];
  static char  lcell[MAXCELLCHARS];
--- 25,31 ----
  extern char *ucstring();
  extern char *lcstring();
  
! static char *whoami = "testpt";
  static struct afsconf_dir *conf;        /* cell info, set by MyBeforeProc */
  static char  conf_dir[100];
  static char  lcell[MAXCELLCHARS];
===================================================================
RCS file: ./ptserver/RCS/display.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./ptserver/display.c
No differences encountered
===================================================================
RCS file: ./rx/RCS/rx_user.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./rx/rx_user.c
*** /tmp/,RCSt1kfBUZ9	Wed Jan  1 13:16:21 1992
--- ./rx/rx_user.c	Mon Dec 30 09:38:38 1991
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/rx/RCS/rx_user.c,v 1.1 91/12/29 17:55:52 probe Exp $ */
  
  /*
  ****************************************************************************
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/rx/RCS/rx_user.c,v 1.2 91/12/30 09:38:11 probe Exp $ */
  
  /*
  ****************************************************************************
***************
*** 116,121 ****
--- 116,122 ----
      register int socketFd = OSI_NULLSOCKET;
      struct sockaddr_in taddr;
      char *name = "rxi_GetUDPSocket: ";
+     int i;
  
      if (port >= IPPORT_RESERVED && port < IPPORT_USERRESERVED) {
          (osi_Msg "%s*WARNING* port number %d is not a reserved port number.  Use port numbers above %d\n", name, port, IPPORT_USERRESERVED);
***************
*** 139,150 ****
      taddr.sin_addr.s_addr = 0;
      taddr.sin_family = AF_INET;
      taddr.sin_port = port;
!     if (bind(socketFd, &taddr, sizeof(taddr)) < 0) {
              perror("bind");
              (osi_Msg "%sbind failed\n", name);
              goto error;
-     }
  
      /* Use one of three different ways of getting a socket buffer expanded to a reasonable size */
  #ifdef AFS_GREEDYCMU_ENV
  /* This will quickly become obsolete, so it doesn't matter that I define it here */
--- 140,159 ----
      taddr.sin_addr.s_addr = 0;
      taddr.sin_family = AF_INET;
      taddr.sin_port = port;
! 
!     for (i=0; i<6; i++) {
!         if (bind(socketFd, &taddr, sizeof(taddr)) == 0)
!             goto bind_ok;
!         (osi_Msg "%sbind failed - sleeping\n", name);
!         sleep(10);
!     }
!     if (bind(socketFd, &taddr, sizeof(taddr)) == 0)
!         goto bind_ok;
      perror("bind");
      (osi_Msg "%sbind failed\n", name);
      goto error;
  
+ bind_ok:
      /* Use one of three different ways of getting a socket buffer expanded to a reasonable size */
  #ifdef AFS_GREEDYCMU_ENV
  /* This will quickly become obsolete, so it doesn't matter that I define it here */
===================================================================
RCS file: ./rxgen/RCS/rpc_main.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./rxgen/rpc_main.c
*** /tmp/,RCSt1kfBbNP	Wed Jan  1 13:16:22 1992
--- ./rxgen/rpc_main.c	Wed Jan  1 09:50:21 1992
***************
*** 35,40 ****
--- 35,41 ----
  
  #include <afs/param.h>
  #include <stdio.h>
+ #include <sys/types.h>
  #ifdef  RXGEN
  #include <ctype.h>
  #endif
RCS file: ./sys/RCS/ilib.s,v
retrieving revision 1.1
diff -btw -c -r1.1 ./sys/ilib.s
*** /tmp/,RCSt1kU0CsC	Wed Jan  1 13:16:23 1992
--- ./sys/ilib.s	Wed Jan  1 09:50:55 1992
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/ilib.s,v 1.1 91/12/23 17:02:35 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/ilib.s,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/ilib.s,v 1.2 92/01/01 09:50:44 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/ilib.s,v $ */
  
  /*
***************
*** 251,381 ****
          bcss    error
          rts
  #endif mc68000
! #ifdef aux
! | Inode system calls
! | RNS, 3/85.
! 
          text    
          global  xicreate, cerror%
  xicreate:
          mov.l   &AFS_ICREATE,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         mov.l   %d2,xsave%
!         mov.l   %a2,ysave%
!         mov.l   %d3,zsave%
!         mov.l   16(%sp),%d2             # fetch argumemt
!         mov.l   20(%sp),%a2             # fetch argumemt
!         mov.l   24(%sp),%d3             # fetch argumemt
!         trap    &15
!         bcs     LS%2
!         mov.l   xsave%,%d2
!         mov.l   ysave%,%a2
!         mov.l   zsave%,%d3
          rts     
  
- LS%2:   mov.l   %d0,errno
-         mov.l   &-1,%d0
-         mov.l   xsave%,%d2
-         mov.l   ysave%,%a2
-         mov.l   zsave%,%d3
-         rts     
- 
-         data    
- xsave%: long    0
- ysave%: long    0
- zsave%: long    0
- 
-         text    
          global  xiopen, cerror%
  xiopen:
          mov.l   &AFS_IOPEN,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         trap    &15
!         bcs     LS%1
          rts     
- LS%1:   jmp     cerror%
  
-         text    
          global  xiread, cerror%
  xiread:
          mov.l   &AFS_IREAD,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         mov.l   %d2,xsave%
!         mov.l   %a2,ysave%
!         mov.l   %d3,zsave%
!         mov.l   16(%sp),%d2             # fetch argumemt
!         mov.l   20(%sp),%a2             # fetch argumemt
!         mov.l   24(%sp),%d3             # fetch argumemt
!         trap    &15
!         bcs     LS%2
!         mov.l   xsave%,%d2
!         mov.l   ysave%,%a2
!         mov.l   zsave%,%d3
          rts     
  
- LS%2:   mov.l   %d0,errno
-         mov.l   &-1,%d0
-         mov.l   xsave%,%d2
-         mov.l   ysave%,%a2
-         mov.l   zsave%,%d3
-         rts     
- 
-         text    
          global  xiwrite, cerror%
  xiwrite:
          mov.l   &AFS_IWRITE,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         mov.l   %d2,xsave%
!         mov.l   %a2,ysave%
!         mov.l   %d3,zsave%
!         mov.l   16(%sp),%d2             # fetch argumemt
!         mov.l   20(%sp),%a2             # fetch argumemt
!         mov.l   24(%sp),%d3             # fetch argumemt
!         trap    &15
!         bcs     LS%2
!         mov.l   xsave%,%d2
!         mov.l   ysave%,%a2
!         mov.l   zsave%,%d3
          rts     
  
- LS%2:   mov.l   %d0,errno
-         mov.l   &-1,%d0
-         mov.l   xsave%,%d2
-         mov.l   ysave%,%a2
-         mov.l   zsave%,%d3
-         rts     
- 
-         text    
          global  xiinc, cerror%
  xiinc:
          mov.l   &AFS_IINC,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         trap    &15
!         bcs     LS%1
          rts     
- LS%1:   jmp     cerror%
  
-         text    
          global  xidec, cerror%
  xidec:
          mov.l   &AFS_IDEC,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         trap    &15
!         bcs     LS%1
          rts     
- LS%1:   jmp     cerror%
  #endif
  #ifdef  AFS_AIX22_ENV
          .globl  _xiopen
--- 251,306 ----
          bcss    error
          rts
  #endif mc68000
! #ifdef AFS_AUX_ENV
          text
          global  xicreate, cerror%
  xicreate:
          mov.l   &AFS_ICREATE,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
! noerror:
          rts
  
          global  xiopen, cerror%
  xiopen:
          mov.l   &AFS_IOPEN,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
          rts
  
          global  xiread, cerror%
  xiread:
          mov.l   &AFS_IREAD,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
          rts
  
          global  xiwrite, cerror%
  xiwrite:
          mov.l   &AFS_IWRITE,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
          rts
  
          global  xiinc, cerror%
  xiinc:
          mov.l   &AFS_IINC,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
          rts
  
          global  xidec, cerror%
  xidec:
          mov.l   &AFS_IDEC,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
          rts
  #endif
  #ifdef  AFS_AIX22_ENV
          .globl  _xiopen
===================================================================
RCS file: ./sys/RCS/rmtsysc.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./sys/rmtsysc.c
*** /tmp/,RCSt1kU0E_P	Wed Jan  1 13:16:24 1992
--- ./sys/rmtsysc.c	Wed Jan  1 09:51:13 1992
***************
*** 22,27 ****
--- 22,30 ----
  #include <sys/dir.h>
  #endif
  /*#include <afs/cellconfig.h>*/
+ 
+ #ifndef AFS_NORMTSYS
+ 
  #include "rmtsys.h"
  
  
***************
*** 283,285 ****
--- 286,305 ----
      creds->group1 = groups[1];
      return ngroups;
  }   
+ 
+ #else /* !AFS_NORMTSYS */
+ 
+ pioctl(path, cmd, data, follow) 
+ char *path;
+ long cmd, follow;
+ struct ViceIoctl *data;
+ {
+     return (lpioctl(path, cmd, data, follow));
+ }
+ 
+ setpag()
+ {
+     return (lsetpag());
+ }
+ 
+ #endif /* !AFS_NORMTSYS */
===================================================================
RCS file: ./sys/RCS/pioctl.s,v
retrieving revision 1.1
diff -btw -c -r1.1 ./sys/pioctl.s
*** /tmp/,RCSt1kU0K_X	Wed Jan  1 13:16:25 1992
--- ./sys/pioctl.s	Wed Jan  1 09:50:57 1992
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/pioctl.s,v 1.1 91/12/23 17:02:37 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/pioctl.s,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/pioctl.s,v 1.2 92/01/01 09:50:55 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/pioctl.s,v $ */
  
  /*
***************
*** 68,98 ****
          bcss    error
          rts
  #endif mc68000
! #ifdef aux
! | pioctl system call
! | rns, 3/85.
! 
          text
          global  xlpioctl, cerror%
  xlpioctl:
          mov.l   &AFS_PIOCTL,%d0
!         mov.l   4(%sp),%a0              # fetch argument
!         mov.l   8(%sp),%d1              # fetch argument
!         mov.l   12(%sp),%a1             # fetch argument
!         mov.l   %d2,xsave%
!         mov.l   16(%sp),%d2             # fetch argumemt
!         trap    &15
!         bcs     LS%2
!         mov.l   xsave%,%d2
          rts     
- 
- LS%2:   mov.l   %d0,errno
-         mov.l   &-1,%d0
-         mov.l   xsave%,%d2
-         rts     
- 
-         data    
- xsave%: long    0
  #endif
  #ifdef  AFS_AIX22_ENV
          .globl  _xlpioctl
--- 68,83 ----
          bcss    error
          rts
  #endif mc68000
! #ifdef AFS_AUX_ENV
          text
          global  xlpioctl, cerror%
  xlpioctl:
          mov.l   &AFS_PIOCTL,%d0
!         trap    &0
!         bcc.b   noerror
!         jmp     cerror%
! noerror:
          rts
  #endif
  #ifdef  AFS_AIX22_ENV
          .globl  _xlpioctl
===================================================================
RCS file: ./sys/RCS/setpag.s,v
retrieving revision 1.1
diff -btw -c -r1.1 ./sys/setpag.s
*** /tmp/,RCSt1kU0Nxp	Wed Jan  1 13:16:27 1992
--- ./sys/setpag.s	Wed Jan  1 09:50:59 1992
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/setpag.s,v 1.1 91/12/23 17:02:38 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/setpag.s,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/setpag.s,v 1.2 92/01/01 09:50:57 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/sys/RCS/setpag.s,v $ */
  
  /*
***************
*** 67,81 ****
          bcss    error
          rts
  #endif mc68000
! #ifdef aux
! | setpag system call
! | rns, 6/85.
! 
          text
          global  xlsetpag, cerror%
  xlsetpag:
          mov.l   &AFS_SETPAG,%d0
!         trap    &15
          bcc.b   noerror
          jmp     cerror%
  noerror:
--- 67,78 ----
          bcss    error
          rts
  #endif mc68000
! #ifdef AFS_AUX_ENV
          text
          global  xlsetpag, cerror%
  xlsetpag:
          mov.l   &AFS_SETPAG,%d0
!         trap    &0
          bcc.b   noerror
          jmp     cerror%
  noerror:
===================================================================
RCS file: ./tools/RCS/washtool.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./tools/washtool.c
*** /tmp/,RCSt1kU0Qk6	Wed Jan  1 13:16:28 1992
--- ./tools/washtool.c	Mon Dec 30 09:41:13 1991
***************
*** 126,132 ****
  #include <afs/cmd.h>
  #include "wash_errors.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/tools/RCS/washtool.c,v 1.1 91/12/23 17:02:39 probe Exp $")
  
  extern int errno;
  
--- 126,132 ----
  #include <afs/cmd.h>
  #include "wash_errors.h"
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/tools/RCS/washtool.c,v 1.2 91/12/30 09:39:05 probe Exp $")
  
  extern int errno;
  
***************
*** 345,351 ****
              return -1;
          }
      }
!     code = mkdir (dir, 0700);
      if (code) return errno;
      return 0;
  }
--- 345,351 ----
              return -1;
          }
      }
!     code = mkdir (dir, 0777);
      if (code) return errno;
      return 0;
  }
***************
*** 464,471 ****
          code = getentry (".", "rcs", &type, 0, 0);
          if (type != S_IFDIR) {
              int dir;
!             code = makelink (".", "rcs", "PARENT/rcs", &dir, 0, 0);
!             if (!dir) {
                  com_err (whoami, 0, "can't make rcs link");
                  return -1;
              }
--- 464,471 ----
          code = getentry (".", "rcs", &type, 0, 0);
          if (type != S_IFDIR) {
              int dir;
!             code = makelink (".", "rcs", "PARENT/rcs", 0, 0, 0);
!             if (code) {
                  com_err (whoami, 0, "can't make rcs link");
                  return -1;
              }
***************
*** 561,571 ****
      code = getentry (rcslink, 0, &type, 0, 0);
      if (type == S_IFDIR) return 0;
  
!     code = makelink (rcslink, 0, rcstarget, &dir, 0, 0);
!     if (code || !dir) {
!         com_err (whoami, 0, "%s must be a link to a dir", rcslink);
!         return WASH_NOPKGRCS;
!     }
      return 0;
  }
  
--- 561,567 ----
      code = getentry (rcslink, 0, &type, 0, 0);
      if (type == S_IFDIR) return 0;
  
!     (void) makelink (rcslink, 0, rcstarget, 0, 0, 0);
      return 0;
  }
  
***************
*** 888,894 ****
      /* no sys name specified */
      if (strlen(SYS_NAME) <= 0) {
  bad_sysname:
!         com_err (whoami, 0, "Bad SYS_NAME compile constant: '%s'", SYS_NAME);
          return WASH_STRINGTOOLONG;
      }
      if (tsize <= strlen (SYS_NAME)) goto bad_sysname;
--- 884,890 ----
      /* no sys name specified */
      if (strlen(SYS_NAME) <= 0) {
  bad_sysname:
!         com_err (whoami, 0, "Bad SYS_NAME compile constant");
          return WASH_STRINGTOOLONG;
      }
      if (tsize <= strlen (SYS_NAME)) goto bad_sysname;
***************
*** 901,907 ****
          com_err (whoami, code, "can't make machine dir for type %s", type);
          return WASH_NOMACHINE;
      }
! 
      code = stat (SYS_NAME, &sn_info);
      if (!code) code = stat ("@sys", &as_info);
      if (!code) {
--- 897,903 ----
          com_err (whoami, code, "can't make machine dir for type %s", type);
          return WASH_NOMACHINE;
      }
! #if 0
      code = stat (SYS_NAME, &sn_info);
      if (!code) code = stat ("@sys", &as_info);
      if (!code) {
***************
*** 912,917 ****
--- 908,914 ----
          com_err (whoami, code, "Compile time SYS_NAME (%s) and @sys don't lead to same directory", SYS_NAME);
          return code;
      }
+ #endif
      machine_made++;                     /* don't bother again */
      return 0;
  }
***************
*** 931,938 ****
          com_err (whoami, code, "failed to create dest dir for %s", type);
          return WASH_NODEST;
      }
!     code = makelink (".", "dest", "@sys/dest", &dir, 0, 0);
!     if (code || !dir) {
          code = WASH_NOMACHINELINK;
          com_err (whoami, code, "making dest link to @sys/dest");
          return code;
--- 928,935 ----
          com_err (whoami, code, "failed to create dest dir for %s", type);
          return WASH_NODEST;
      }
!     code = makelink (".", "dest", "@sys/dest", 0, 0, 0);
!     if (code) {
          code = WASH_NOMACHINELINK;
          com_err (whoami, code, "making dest link to @sys/dest");
          return code;
***************
*** 956,963 ****
          com_err (whoami, code, "failed to create machine dest dir");
          return WASH_NOOBJ;
      }
!     code = makelink (".", "obj", "@sys/obj", &dir, 0, 0);
!     if (code || !dir) {
          code = WASH_NOMACHINELINK;
          com_err (whoami, code, "making dest link to @sys/obj");
          return code;
--- 953,960 ----
          com_err (whoami, code, "failed to create machine dest dir");
          return WASH_NOOBJ;
      }
!     code = makelink (".", "obj", "@sys/obj", 0, 0, 0);
!     if (code) {
          code = WASH_NOMACHINELINK;
          com_err (whoami, code, "making dest link to @sys/obj");
          return code;
***************
*** 983,989 ****
      char dots[32];
      int  type;
  
!     code = makedir ("@sys", dd, 0); /* make sure dir exists */
      makedots (dd, dots, sizeof(dots));
  
      sprintf (pdd, "PARENT/%s", dd);
--- 980,986 ----
      char dots[32];
      int  type;
  
!     code = makedir (SYS_NAME, dd, 0); /* make sure dir exists */
      makedots (dd, dots, sizeof(dots));
  
      sprintf (pdd, "PARENT/%s", dd);
***************
*** 1151,1157 ****
                  (strcmp(file->d_name, "RCS") == 0)) continue;
  
              /* check the source file */
!             code = getentry (srcdir, file->d_name, &type, target, 0);
              if (type == S_IFREG) {      /* only link to files */
                  sprintf (target, "SRC/%s", file->d_name);
                  code = makelink (objdir, file->d_name, target, 0,0,0);
--- 1148,1154 ----
                  (strcmp(file->d_name, "RCS") == 0)) continue;
  
              /* check the source file */
!             code = getentry (srcdir, file->d_name, &type, 0, 0);
              if (type == S_IFREG) {      /* only link to files */
                  sprintf (target, "SRC/%s", file->d_name);
                  code = makelink (objdir, file->d_name, target, 0,0,0);
***************
*** 1308,1315 ****
          char *pkg = packages->data;
  
          sprintf (buf,
!             "cd @sys/obj/%s; %s DESTDIR=DEST/ SRCDIR=DEST/ SYS_NAME=%s %s",
!                  pkg, make, SYS_NAME, makeArg);
          code = system (buf);
          if (code) {
              com_err (whoami, 0, "running '%s'", buf);
--- 1305,1312 ----
          char *pkg = packages->data;
  
          sprintf (buf,
!             "cd %s/obj/%s; %s DESTDIR=DEST/ SRCDIR=DEST/ SYS_NAME=%s %s",
!                  SYS_NAME, pkg, make, SYS_NAME, makeArg);
          code = system (buf);
          if (code) {
              com_err (whoami, 0, "running '%s'", buf);
===================================================================
RCS file: ./util/RCS/malloc.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./util/malloc.c
*** /tmp/,RCSt1kU0Wdj	Wed Jan  1 13:16:30 1992
--- ./util/malloc.c	Wed Jan  1 09:51:46 1992
***************
*** 1,8 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v 1.1 91/12/23 17:02:41 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v 1.1 91/12/23 17:02:41 probe Exp $";
  #endif
  
  /*
--- 1,8 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v 1.2 92/01/01 09:51:37 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/malloc.c,v 1.2 92/01/01 09:51:37 probe Exp $";
  #endif
  
  /*
***************
*** 87,93 ****
  */
  
  #include <afs/param.h>  /* get system type (e.g. AFS_AIX_ENV) define */
! #if     !defined(AFS_AIX_ENV) && !defined(AFS_VFS40) && !defined(AFS_HPUX_ENV) && !defined(AFS_NEXT20_ENV)
  #include <stdio.h>
  #include "malloc.h"
  
--- 87,93 ----
  */
  
  #include <afs/param.h>  /* get system type (e.g. AFS_AIX_ENV) define */
! #if     !defined(AFS_AIX_ENV) && !defined(AFS_AUX_ENV) && !defined(AFS_VFS40) && !defined(AFS_HPUX_ENV) && !defined(AFS_NEXT20_ENV)
  #include <stdio.h>
  #include "malloc.h"
  
===================================================================
RCS file: ./util/RCS/vice.h,v
retrieving revision 1.1
diff -btw -c -r1.1 ./util/vice.h
*** /tmp/,RCSt1kU0Ydr	Wed Jan  1 13:16:32 1992
--- ./util/vice.h	Wed Jan  1 09:51:48 1992
***************
*** 1,9 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v 1.1 91/12/23 17:02:43 probe Exp $ */
  /* $ACIS:vice.h 9.0$ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v $ */
  
  #if !defined(lint) && !defined(LOCORE)  && defined(RCS_HDRS)
! static char *rcsidvice = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v 1.1 91/12/23 17:02:43 probe Exp $";
  #endif
  
  /*
--- 1,9 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v 1.2 92/01/01 09:51:46 probe Exp $ */
  /* $ACIS:vice.h 9.0$ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v $ */
  
  #if !defined(lint) && !defined(LOCORE)  && defined(RCS_HDRS)
! static char *rcsidvice = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/vice.h,v 1.2 92/01/01 09:51:46 probe Exp $";
  #endif
  
  /*
***************
*** 56,62 ****
   * So, we need to test for an ANSI compiler OR usage in an environment in which
   * the called macro is defined in an ANSI-like manner.
   */
! #if defined(AFS_HPUX_ENV) || defined(hpux) || defined(AFS_AIX31_ENV) || defined(_AIX) || defined(AFS_NEXT_ENV) || defined(NeXT) || defined(AFS_ULTRIX_40)
  #define _VICEIOCTL(id)  ((unsigned int ) _IOW('V', id, struct ViceIoctl))
  #else
  #define _VICEIOCTL(id)  ((unsigned int ) _IOW(V, id, struct ViceIoctl))
--- 56,62 ----
   * So, we need to test for an ANSI compiler OR usage in an environment in which
   * the called macro is defined in an ANSI-like manner.
   */
! #if defined(AFS_HPUX_ENV) || defined(hpux) || defined(AFS_AIX31_ENV) || defined(_AIX) || defined(AFS_NEXT_ENV) || defined(NeXT) || defined(AFS_ULTRIX_40) || defined(AFS_AUX_ENV)
  #define _VICEIOCTL(id)  ((unsigned int ) _IOW('V', id, struct ViceIoctl))
  #else
  #define _VICEIOCTL(id)  ((unsigned int ) _IOW(V, id, struct ViceIoctl))
===================================================================
RCS file: ./util/RCS/strtol.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./util/strtol.c
*** /tmp/,RCSt1kU0e3Y	Wed Jan  1 13:16:32 1992
--- ./util/strtol.c	Wed Jan  1 09:52:14 1992
***************
*** 0 ****
--- 1,99 ----
+ /*
+  * $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/strtol.c,v 1.2 92/01/01 09:52:12 probe Exp $
+  * 
+  * strtol - Convert a string to a long integer.
+  *
+  *    Implementation for systems lacking this function in the C library.
+  *
+  * 
+  * Author:      Richard Basch
+  * Created:     24 Dec 1990
+  *
+  * 
+  * Copyright 1990 by the Massachusetts Institute of Technology
+  *
+  * Permission to use, copy, modify, and distribute this software and its
+  * documentation for any purpose and without fee is hereby granted,
+  * provided that the above copyright notice appear in all copies and that
+  * both that copyright notice and this permission notice appear in
+  * supporting documentation, and that the name of M.I.T. not be used in
+  * advertising or publicity pertaining to distribution of the software
+  * without specific, written prior permission.  M.I.T. makes no
+  * representations about the suitability of this software for any
+  * purpose.  It is provided "as is" without express or implied warranty.
+  */
+ 
+ #include <afs/param.h>
+ 
+ #if defined(AFS_NO_STRTOL_ENV)
+ 
+ #include <ctype.h>
+ #include <errno.h>
+ 
+ /*
+  * We do not bother with limits since <limits.h> doesn't exist
+  * on all systems.
+  */
+ 
+ long strtol(nptr, eptr, base)
+         char *nptr, **eptr;
+         int base;
+ {
+         register char *s = nptr;
+         register int c = *s;
+         register int neg = 0;           /* Negative number? */
+         register int num = 0;           /* Running count of the number */
+         register int any = 0;           /* Have we seen any digits? */
+ 
+         if (eptr) *eptr = nptr;         /* in case we abort */
+ 
+         if (base > 36 || base < 0 || base == 1) {
+                 errno = EINVAL;
+                 return 0;
+         }
+         
+         /* Skip leading whitespace */
+         do {
+                 c = *s++;
+         } while (isspace(c));
+ 
+         /* Test for leading +/- */
+         if (c == '-') {
+                 neg = 1;
+                 c = *s++;
+         } else if (c == '+')
+                 c = *s++;
+ 
+         /* Check for 0x or 0X for base 16 */
+         if ((base == 0 || base == 16) &&
+             c == '0' && (*s == 'x' || *s == 'X')) {
+                 c = s[1];
+                 s += 2;
+                 base = 16;
+         }
+         /* Check for leading 0 (base 8) */
+         else if (base == 0)
+                 base = ((c == '0') ? 8 : 10);
+ 
+         do {
+                 if (isdigit(c))
+                         c -= '0';
+                 else if (isalpha(c))
+                         c -= (isupper(c) ? 'A' - 10 : 'a' - 10);
+                 else break;
+ 
+                 if (c >= base)
+                         break;
+                 else {
+                         any=1;
+                         num *= base;
+                         num += (neg ? -c : c);
+                 }
+         } while (c = *s++);
+         
+         if (eptr)
+                 *eptr = (any ? s-1 : nptr);
+         return(num);
+ }
+ 
+ #endif /* AFS_NO_STRTOL_ENV */
===================================================================
RCS file: ./util/RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./util/Makefile
*** /tmp/,RCSt1kU0hCF	Wed Jan  1 13:16:33 1992
--- ./util/Makefile	Wed Jan  1 09:52:12 1992
***************
*** 1,4 ****
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/Makefile,v 1.1 91/12/23 17:11:05 probe Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/Makefile,v $ 
  
  #/* Copyright (C) 1989,1990 Transarc Corporation - All rights reserved */
--- 1,4 ----
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/Makefile,v 1.2 92/01/01 09:51:53 probe Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/util/RCS/Makefile,v $ 
  
  #/* Copyright (C) 1989,1990 Transarc Corporation - All rights reserved */
***************
*** 14,23 ****
  INSTALL = ${SRCDIR}bin/install
  
  objects = assert.o ffs.o malloc.o plumber.o casestrcpy.o strcasecmp.o ktime.o \
!         volparse.o hostparse.o hputil.o kreltime.o
  headers = assert.h potpourri.h itc.h errors.h
  
! CFLAGS = -g -I$(SRCDIR)include
  
  all:    util.a sys tests
  
--- 14,23 ----
  INSTALL = ${SRCDIR}bin/install
  
  objects = assert.o ffs.o malloc.o plumber.o casestrcpy.o strcasecmp.o ktime.o \
!         volparse.o hostparse.o hputil.o kreltime.o strtol.o
  headers = assert.h potpourri.h itc.h errors.h
  
! CFLAGS =  -I$(SRCDIR)include
  
  all:    util.a sys tests
  
===================================================================
RCS file: ./venus/RCS/fs.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./venus/fs.c
*** /tmp/,RCSt1kU0mhI	Wed Jan  1 13:16:35 1992
--- ./venus/fs.c	Mon Dec 30 09:42:50 1991
***************
*** 37,43 ****
  #include <string.h>
  #endif /* !defined(AFS_HPUX_ENV) */
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/venus/RCS/fs.c,v 1.1 91/12/23 17:02:44 probe Exp $")
  
  #define MAXNAME 100
  #define MAXSIZE 2048
--- 37,43 ----
  #include <string.h>
  #endif /* !defined(AFS_HPUX_ENV) */
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/bld/src/venus/RCS/fs.c,v 1.2 91/12/30 09:41:25 probe Exp $")
  
  #define MAXNAME 100
  #define MAXSIZE 2048
***************
*** 124,129 ****
--- 124,160 ----
      return 1;
  }
  
+ /* Canonicalize the cellname
+  * Returns a pointer to its static buffer.
+  */
+ static char *GetCellName(tcell)
+     char *tcell;
+ {
+     static char local_cell[MAXCELLCHARS+1] = "";
+     static struct afsconf_dir *configdir = (struct afsconf_dir *)0;
+     static struct afsconf_cell cellconfig;
+ 
+     if (!configdir && !(configdir = afsconf_Open(AFSCONF_CLIENTNAME))) {
+         printf("%s: unable to get afs configuration (afsconf_Open(%s))\n",
+                pn, AFSCONF_CLIENTNAME);
+         return tcell;
+     }
+     if (tcell == NULL || tcell[0] == 0) {
+         if (local_cell[0] == 0
+             && afsconf_GetLocalCell(configdir, local_cell, MAXCELLCHARS)) {
+             printf("%s: unable to get local cell information\n", pn);
+             return tcell;
+         }
+         return local_cell;
+     }
+     if (afsconf_GetCellInfo(configdir, tcell, NULL, &cellconfig)) {
+         printf("%s: unable to get information about cell %s from %s/CellServDB\n",
+                pn, tcell, AFSCONF_CLIENTNAME);
+         return tcell;
+     }
+     return cellconfig.name;
+ }
+ 
  /* return a static pointer to a buffer */
  static char *Parent(apath)
  char *apath; {
***************
*** 420,425 ****
--- 451,457 ----
      int plusp;
      long rights;
      int clear;
+     int error = 0;
  
      if (as->parms[2].items) clear=1;
      else clear=0;
***************
*** 459,469 ****
              }
              else {
                  Die(errno, ti->data);
                  continue;
              }
          }
      }
!     return 0;
  }
  
  /* tell if a name is 23 or -45 (digits or minus digits), which are bad names we must prune */
--- 491,502 ----
              }
              else {
                  Die(errno, ti->data);
+                 error = 1;
                  continue;
              }
          }
      }
!     return error;
  }
  
  /* tell if a name is 23 or -45 (digits or minus digits), which are bad names we must prune */
***************
*** 528,533 ****
--- 561,567 ----
      int changes;
      register struct cmd_item *ti;
      register struct AclEntry *te;
+     int error = 0;
  
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
***************
*** 536,541 ****
--- 570,576 ----
          blob.out = space;
          code = pioctl(ti->data, VIOCGETAL, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 557,562 ****
--- 592,598 ----
                      return 1;
                  }
                  else {
+                     error = 1;
                      Die(errno, ti->data);
                      continue;
                  }
***************
*** 585,591 ****
          else
              printf("Access list for %s is fine.\n", ti->data);
      }
!     return 0;
  }
  
  static ListACLCmd(as)
--- 621,627 ----
          else
              printf("Access list for %s is fine.\n", ti->data);
      }
!     return error;
  }
  
  static ListACLCmd(as)
***************
*** 595,600 ****
--- 631,637 ----
      struct ViceIoctl blob;
      struct AclEntry *te;
      register struct cmd_item *ti;
+     int error = 0;
  
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
***************
*** 603,608 ****
--- 640,646 ----
          blob.out = space;
          code = pioctl(ti->data, VIOCGETAL, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 704,710 ****
          if (as->parms[1].items) {
              code = util_GetLong(as->parms[1].items->data, &status->MaxQuota);
              if (code) {
!                 printf("fs: bad integer specified for quota.\n");
                  return code;
              }
          }
--- 742,748 ----
          if (as->parms[1].items) {
              code = util_GetLong(as->parms[1].items->data, &status->MaxQuota);
              if (code) {
!                 printf("%s: bad integer specified for quota.\n", pn);
                  return code;
              }
          }
***************
*** 771,776 ****
--- 809,815 ----
      register struct cmd_item *ti;
      struct VolumeStatus *status;
      char *name;
+     int error = 0;
      
      printf("%-20s%-9s%-8s%-11s%-11s\n",
              "Volume Name","   Quota", "   Used", "   % Used", " Partition");
***************
*** 782,787 ****
--- 821,827 ----
          blob.out = space;
          code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 789,795 ****
          name = (char *)status + sizeof(*status);
          QuickPrintStatus(status, name);
      }
!     return 0;
  }
  
  static WhereIsCmd(as)
--- 829,835 ----
          name = (char *)status + sizeof(*status);
          QuickPrintStatus(status, name);
      }
!     return error;
  }
  
  static WhereIsCmd(as)
***************
*** 800,805 ****
--- 840,846 ----
      register int j;
      long *hosts;
      char *tp;
+     int error = 0;
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
***************
*** 810,815 ****
--- 851,857 ----
          bzero(space, sizeof(space));
          code = pioctl(ti->data, VIOCWHEREIS, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 822,828 ****
          }
          printf("\n");
      }
!     return 0;
  }
  
  static DiskFreeCmd(as)
--- 864,870 ----
          }
          printf("\n");
      }
!     return error;
  }
  
  static DiskFreeCmd(as)
***************
*** 832,837 ****
--- 874,880 ----
      register struct cmd_item *ti;
      char *name;
      struct VolumeStatus *status;
+     int error = 0;
      
      printf("%-20s%-9s%-8s%-11s%-11s\n",
              "Volume Name","  kbytes ", " used", "  avail ", " %used");
***************
*** 843,848 ****
--- 886,892 ----
          blob.out = space;
          code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 850,856 ****
          name = (char *)status + sizeof(*status);
          QuickPrintSpace(status, name);
      }
!     return 0;
  }
  
  static QuotaCmd(as)
--- 894,900 ----
          name = (char *)status + sizeof(*status);
          QuickPrintSpace(status, name);
      }
!     return error;
  }
  
  static QuotaCmd(as)
***************
*** 860,865 ****
--- 904,910 ----
      register struct cmd_item *ti;
      double quotaPct;
      struct VolumeStatus *status;
+     int error = 0;
      
      SetDotDefault(&as->parms[0].items);
      for(ti=as->parms[0].items; ti; ti=ti->next) {
***************
*** 869,874 ****
--- 914,920 ----
          blob.out = space;
          code = pioctl(ti->data, VIOCGETVOLSTAT, &blob, 1);
          if (code) {
+             error = 1;
              Die(code, ti->data);
              continue;
          }
***************
*** 877,883 ****
          else quotaPct = 0.0;
          printf("%2.0f%% of quota used.\n", quotaPct);
      }
!     return 0;
  }
  
  static ListMountCmd(as)
--- 923,929 ----
          else quotaPct = 0.0;
          printf("%2.0f%% of quota used.\n", quotaPct);
      }
!     return error;
  }
  
  static ListMountCmd(as)
***************
*** 968,975 ****
          }
  
          if (strcmp(last_component, ".") == 0 || strcmp(last_component, "..") == 0) {
!             printf("fs: you may not use '.' or '..' as the last component\n");
!             printf("fs: of a name in the 'fs lsmount' command.\n");
              error = 1;
              continue;
          }
--- 1014,1021 ----
          }
  
          if (strcmp(last_component, ".") == 0 || strcmp(last_component, "..") == 0) {
!             printf("%s: you may not use '.' or '..' as the last component\n", pn);
!             printf("%s: of a name in the '%s lsmount' command.\n", pn, pn);
              error = 1;
              continue;
          }
***************
*** 1011,1028 ****
      struct ViceIoctl blob;
  
      if (as->parms[5].items && !as->parms[2].items) {
!         printf("fs: must provide cell when creating cellular mount point.\n");
          return 1;
      }
  
      if (as->parms[2].items)     /* cell name specified */
!         cellName = as->parms[2].items->data;
      else
          cellName = (char *) 0;
      volName = as->parms[1].items->data;
  
      if (strlen(volName) >= 64) {
!         printf("fs: volume name too long (length must be < 64 characters)\n");
          return 1;
      }
  
--- 1057,1074 ----
      struct ViceIoctl blob;
  
      if (as->parms[5].items && !as->parms[2].items) {
!         printf("%s: must provide cell when creating cellular mount point.\n", pn);
          return 1;
      }
  
      if (as->parms[2].items)     /* cell name specified */
!         cellName = GetCellName(as->parms[2].items->data);
      else
          cellName = (char *) 0;
      volName = as->parms[1].items->data;
  
      if (strlen(volName) >= 64) {
!         printf("%s: volume name too long (length must be < 64 characters)\n", pn);
          return 1;
      }
  
***************
*** 1032,1038 ****
        *tmpName = '\0';
        if (cellName) {
          if (strcasecmp(cellName,volName)) {
!           printf("fs: cellnames do not match.\n");
            return 1;
          }
        }
--- 1078,1084 ----
        *tmpName = '\0';
        if (cellName) {
          if (strcasecmp(cellName,volName)) {
!           printf("%s: cellnames do not match.\n", pn);
            return 1;
          }
        }
***************
*** 1041,1047 ****
      }
  
      if (!InAFS(Parent(as->parms[0].items->data))) {
!         printf("fs: mount points must be created within the AFS file system\n");
          return 1;
      }
  
--- 1087,1093 ----
      }
  
      if (!InAFS(Parent(as->parms[0].items->data))) {
!         printf("%s: mount points must be created within the AFS file system\n", pn);
          return 1;
      }
  
***************
*** 1059,1071 ****
          /* not fast, check name with VLDB */
        if (!code)
          code = VLDBInit(1, AFSCONF_CLIENTNAME, cellName?cellName:space);
!       if (code == 0) {
              /* make the check.  Don't complain if there are problems with init */
              code = ubik_Call(VL_GetEntryByName, uclient, 0, volName, &vldbEntry);
              if (code == VL_NOENT) {
!               printf("fs: warning, volume %s does not exist in cell %s.\n",
!                      volName, cellName ? cellName : space);
              }
          }
      }
  
--- 1105,1120 ----
          /* not fast, check name with VLDB */
        if (!code)
          code = VLDBInit(1, AFSCONF_CLIENTNAME, cellName?cellName:space);
!       if (code == 0)
            /* make the check.  Don't complain if there are problems with init */
            code = ubik_Call(VL_GetEntryByName, uclient, 0, volName, &vldbEntry);
        if (code == VL_NOENT) {
!           printf("%s: warning, volume %s does not exist in cell %s.\n",
!                  pn, volName, cellName?cellName:space);
        }
+       else if (code) {
+           printf("%s: warning, unable to get information about volume %s in cell %s\n",
+                  pn, volName, cellName?cellName:space);
        }
      }
  
***************
*** 1102,1107 ****
--- 1151,1157 ----
      char tbuffer[1024];
      char lsbuffer[1024];
      register char *tp;
+     int error = 0;
      
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          /* once per file */
***************
*** 1122,1131 ****
          code = pioctl(tbuffer, VIOC_AFS_STAT_MT_PT, &blob, 0);
          if (code) {
              if (errno == EINVAL)
!                 printf("fs: '%s' is not a mount point.\n", ti->data);
              else {
                  Die(code, ti->data);
              }
              continue;   /* don't bother trying */
          }
          blob.out_size = 0;
--- 1172,1182 ----
          code = pioctl(tbuffer, VIOC_AFS_STAT_MT_PT, &blob, 0);
          if (code) {
              if (errno == EINVAL)
!                 printf("%s: '%s' is not a mount point.\n", pn, ti->data);
              else {
                  Die(code, ti->data);
              }
+             error = 1;
              continue;   /* don't bother trying */
          }
          blob.out_size = 0;
***************
*** 1134,1143 ****
          code = pioctl(tbuffer, VIOC_AFS_DELETE_MT_PT, &blob, 0);
          if (code) {
              Die(code, ti->data);
          }
  
      }
!     return 0;
  }
  
  static CheckServersCmd(as)
--- 1185,1195 ----
          code = pioctl(tbuffer, VIOC_AFS_DELETE_MT_PT, &blob, 0);
          if (code) {
              Die(code, ti->data);
+             error = 1;
          }
  
      }
!     return error;
  }
  
  static CheckServersCmd(as)
***************
*** 1162,1169 ****
      bcopy(&temp, tbuffer, sizeof(long));
      /* now copy in optional cell name, if specified */
      if (as->parms[0].items) {
!         strcpy(tbuffer+sizeof(long), as->parms[0].items->data);
!         blob.in_size += strlen(as->parms[0].items->data)+1;
      }
  
      code = pioctl(0, VIOCCKSERV, &blob, 1);
--- 1214,1224 ----
      bcopy(&temp, tbuffer, sizeof(long));
      /* now copy in optional cell name, if specified */
      if (as->parms[0].items) {
!         char *cell;
!         cell = GetCellName(as->parms[0].items->data);
! 
!         strcpy(tbuffer+sizeof(long), cell);
!         blob.in_size += strlen(cell)+1;
      }
  
      code = pioctl(0, VIOCCKSERV, &blob, 1);
***************
*** 1216,1222 ****
      if (as->parms[0].items) {
          code = util_GetLong(as->parms[0].items->data, &temp);
          if (code) {
!             printf("fs: bad integer specified for cache size.\n");
              return code;
          }
      }
--- 1271,1277 ----
      if (as->parms[0].items) {
          code = util_GetLong(as->parms[0].items->data, &temp);
          if (code) {
!             printf("%s: bad integer specified for cache size.\n", pn);
              return code;
          }
      }
***************
*** 1227,1233 ****
      blob.out_size = 0;
      code = pioctl(0, VIOCSETCACHESIZE, &blob, 1);
      if (code)
!         Die(code, (char *) 0);
      else
          printf("New cache size set.\n");
      return 0;
--- 1282,1288 ----
      blob.out_size = 0;
      code = pioctl(0, VIOCSETCACHESIZE, &blob, 1);
      if (code)
!         return(Die(code, (char *) 0));
      else
          printf("New cache size set.\n");
      return 0;
***************
*** 1246,1252 ****
      blob.out = (char *) parms;
      code = pioctl(0, VIOCGETCACHEPARMS, &blob, 1);
      if (code)
!         Die(code, (char *) 0);
      else {
          printf("AFS using %d of the cache's available %d 1K byte blocks.\n",
                 parms[1], parms[0]);
--- 1301,1307 ----
      blob.out = (char *) parms;
      code = pioctl(0, VIOCGETCACHEPARMS, &blob, 1);
      if (code)
!         return(Die(code, (char *) 0));
      else {
          printf("AFS using %d of the cache's available %d 1K byte blocks.\n",
                 parms[1], parms[0]);
***************
*** 1318,1324 ****
      blob.out_size = 0;
      code = pioctl(0, VIOCNEWCELL, &blob, 1);
      if (code < 0)
!         Die(code, 0);
      return 0;
  }
  
--- 1373,1379 ----
      blob.out_size = 0;
      code = pioctl(0, VIOCNEWCELL, &blob, 1);
      if (code < 0)
!         return(Die(code, 0));
      return 0;
  }
  
***************
*** 1365,1371 ****
      code = pioctl((char *) 0, VIOC_GET_WS_CELL, &blob, 1);
  
      if (code) {
!         Die(code, (char *) 0);
      }
      else
          printf("This workstation belongs to cell '%s'\n", space);
--- 1420,1426 ----
      code = pioctl((char *) 0, VIOC_GET_WS_CELL, &blob, 1);
  
      if (code) {
!         return(Die(code, (char *) 0));
      }
      else
          printf("This workstation belongs to cell '%s'\n", space);
***************
*** 1557,1563 ****
      blob.out_size = sizeof(long);
      code = pioctl(0, VIOC_VENUSLOG, &blob, 1);
      if (code)
!         Die(code, 0);
  
      /* should be able to print results out, but that code doesn't work and I'm tired of being lied to */
      return 0;
--- 1612,1618 ----
      blob.out_size = sizeof(long);
      code = pioctl(0, VIOC_VENUSLOG, &blob, 1);
      if (code)
!         return(Die(code, 0));
  
      /* should be able to print results out, but that code doesn't work and I'm tired of being lied to */
      return 0;
***************
*** 1566,1571 ****
--- 1621,1627 ----
  static GetCellCmd(as)
  register struct cmd_syndesc *as; {
      register long code;
+     int error;
      struct ViceIoctl blob;
      register struct cmd_item *ti;
      struct a {
***************
*** 1572,1593 ****
          long stat;
          long junk;
      } args;
      
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          /* once per cell */
          blob.out_size = sizeof(args);
          blob.out = (caddr_t) &args;
!         blob.in_size = 1+strlen(ti->data);
!         blob.in = ti->data;
          code = pioctl(0, VIOC_GETCELLSTATUS, &blob, 1);
          if (code) {
              if (errno == ENOENT)
!                 printf("fs: the cell named '%s' does not exist\n", ti->data);
              else
!                 Die(code, ti->data);
!             return 1;
          }
!         printf("Cell %s status: ", ti->data);
  #ifdef notdef
          if (args.stat & 1) printf("primary ");
  #endif
--- 1628,1653 ----
          long stat;
          long junk;
      } args;
+     char *cell;
  
+     error = 0;  /* no error occurred */
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          /* once per cell */
+         cell = GetCellName(ti->data);
          blob.out_size = sizeof(args);
          blob.out = (caddr_t) &args;
!         blob.in_size = 1+strlen(cell);
!         blob.in = cell;
          code = pioctl(0, VIOC_GETCELLSTATUS, &blob, 1);
          if (code) {
              if (errno == ENOENT)
!                 printf("%s: the cell named '%s' does not exist\n", pn, cell);
              else
!                 Die(code, cell);
!             error = 1;
!             continue;
          }
!         printf("Cell %s status: ", cell);
  #ifdef notdef
          if (args.stat & 1) printf("primary ");
  #endif
***************
*** 1596,1607 ****
          if (args.stat & 4) printf(", using old VLDB");
          printf("\n");
      }
!     return 0;
  }
  
  static SetCellCmd(as)
  register struct cmd_syndesc *as; {
      register long code;
      struct ViceIoctl blob;
      register struct cmd_item *ti;
      struct a {
--- 1656,1668 ----
          if (args.stat & 4) printf(", using old VLDB");
          printf("\n");
      }
!     return error;
  }
  
  static SetCellCmd(as)
  register struct cmd_syndesc *as; {
      register long code;
+     int error;
      struct ViceIoctl blob;
      register struct cmd_item *ti;
      struct a {
***************
*** 1610,1615 ****
--- 1671,1678 ----
          char cname[64];
      } args;
  
+     error = 0;  /* no error occurred */
+     
      /* figure stuff to set */
      args.stat = 0;
      args.junk = 0;
***************
*** 1618,1624 ****
      /* set stat for all listed cells */
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          /* once per cell */
!         strcpy(args.cname, ti->data);
          blob.in_size = sizeof(args);
          blob.in = (caddr_t) &args;
          blob.out_size = 0;
--- 1681,1687 ----
      /* set stat for all listed cells */
      for(ti=as->parms[0].items; ti; ti=ti->next) {
          /* once per cell */
!         strcpy(args.cname, GetCellName(ti->data));
          blob.in_size = sizeof(args);
          blob.in = (caddr_t) &args;
          blob.out_size = 0;
***************
*** 1625,1635 ****
          blob.out = (caddr_t) 0;
          code = pioctl(0, VIOC_SETCELLSTATUS, &blob, 1);
          if (code) {
!             Die(code, 0);
!             exit(1);
          }
      }
!     return 0;
  }
  
  static VLDBInit(noAuthFlag, confDir, cellName)
--- 1688,1701 ----
          blob.out = (caddr_t) 0;
          code = pioctl(0, VIOC_SETCELLSTATUS, &blob, 1);
          if (code) {
!             if (errno == ENOENT)
!                 printf("%s: the cell named '%s' does not exist\n", pn, args.cname);
!             else
!                 Die(code, args.cname);
!             error = 1;
          }
      }
!     return error;
  }
  
  static VLDBInit(noAuthFlag, confDir, cellName)
***************
*** 1648,1657 ****
  
      code = rx_Init(0);
      if (code) {
!         fprintf(stderr,"fs: could not initialize rx.\n");
          return code;
      }
!     rx_SetRxDeadTime(50);
      tdir = afsconf_Open(confDir);
      if (!tdir) {
          fprintf(stderr,"Could not process files in configuration directory (%s).\n",
--- 1714,1723 ----
  
      code = rx_Init(0);
      if (code) {
!         fprintf(stderr,"%s: could not initialize rx.\n", pn);
          return code;
      }
!     rx_SetRxDeadTime(10);
      tdir = afsconf_Open(confDir);
      if (!tdir) {
          fprintf(stderr,"Could not process files in configuration directory (%s).\n",
***************
*** 1660,1667 ****
      }
      code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
-         fprintf(stderr,"vos: cell %s not in /usr/vice/etc/CellServDB\n",
-                 cellName);
          return code;
      }
      if (!noAuthFlag) {   /* we don't need tickets for null */
--- 1726,1731 ----
***************
*** 1670,1676 ****
          strcpy(sname.name, "afs");
          code = ktc_GetToken(&sname,&ttoken, sizeof(ttoken), (char *)0);
          if (code) {
!             fprintf(stderr,"fs: Could not get afs tokens, running unauthenticated.\n");
              scIndex = 0;
          }
          else {
--- 1734,1740 ----
          strcpy(sname.name, "afs");
          code = ktc_GetToken(&sname,&ttoken, sizeof(ttoken), (char *)0);
          if (code) {
!             fprintf(stderr,"%s: Could not get afs tokens, running unauthenticated.\n", pn);
              scIndex = 0;
          }
          else {
***************
*** 1677,1684 ****
              /* got a ticket */
              if (ttoken.kvno >= 0 && ttoken.kvno <= 255) scIndex = 2;    /* kerberos */
              else {
!                 fprintf (stderr, "fs: funny kvno (%d) in ticket, proceeding\n",
!                          ttoken.kvno);
                  scIndex = 2;
              }
          }
--- 1741,1748 ----
              /* 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;
              }
          }
***************
*** 1699,1706 ****
              break;
      }
      if (info.numServers > VLDB_MAXSERVERS) {
!         fprintf(stderr, "fs: info.numServers=%d (> VLDB_MAXSERVERS=%d)\n",
!                 info.numServers, VLDB_MAXSERVERS);
          exit(1);
      }
      bzero(serverconns, sizeof(serverconns));
--- 1763,1770 ----
              break;
      }
      if (info.numServers > VLDB_MAXSERVERS) {
!         fprintf(stderr, "%s: info.numServers=%d (> VLDB_MAXSERVERS=%d)\n",
!                 pn, info.numServers, VLDB_MAXSERVERS);
          exit(1);
      }
      bzero(serverconns, sizeof(serverconns));
***************
*** 1712,1718 ****
      code = ubik_ClientInit(serverconns, &uclient);
  
      if (code) {
!         fprintf(stderr,"fs: ubik client init failed.\n");
          return code;
      }
      return 0;
--- 1776,1782 ----
      code = ubik_ClientInit(serverconns, &uclient);
  
      if (code) {
!         fprintf(stderr,"%s: ubik client init failed.\n", pn);
          return code;
      }
      return 0;
***************
*** 1879,1882 ****
--- 1943,1947 ----
          else printf("%s", pn);
          printf(": %s\n", error_message(errno));
      }
+     return 1;
  } /*Die*/
===================================================================
RCS file: ./viced/RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./viced/Makefile
*** /tmp/,RCSt1kU0ohR	Wed Jan  1 13:16:38 1992
--- ./viced/Makefile	Mon Dec 30 10:29:39 1991
***************
*** 1,4 ****
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/Makefile,v 1.1 91/12/23 17:02:47 probe Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/Makefile,v $ 
  
  #
--- 1,4 ----
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/Makefile,v 1.2 91/12/30 10:29:32 probe Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/Makefile,v $ 
  
  #
***************
*** 11,17 ****
  DESTDIR = /usr/andy/
  INSTALL = ${SRCDIR}bin/install
  
! DEBUG = -g 
  CFLAGS = -DNINTERFACE ${DEBUG} -I. -I${SRCDIR}include/afs -I${SRCDIR}include ${XCFLAGS}
  LDFLAGS = ${DEBUG}
  
--- 11,17 ----
  DESTDIR = /usr/andy/
  INSTALL = ${SRCDIR}bin/install
  
! DEBUG =  
  CFLAGS = -DNINTERFACE ${DEBUG} -I. -I${SRCDIR}include/afs -I${SRCDIR}include ${XCFLAGS}
  LDFLAGS = ${DEBUG}
  
***************
*** 55,72 ****
          callback.o      \
          profile.o
  
! all: fileserver
  
  ${objects}:${headers}
  
  fileserver: viced.o ${objects} ${headers} ${LIBS}
          ${CC} ${LDFLAGS} -o fileserver ${objects} ${LIBS}
  
  lint:
          lint -uvn  -I${SRCDIR}include viced.c afsfileprocs.c host.c physio.c callback.c profile.c ${SRCDIR}lib/afs/llib-lutil.ln
  
  install: all
          ${INSTALL} -ns fileserver ${DESTDIR}root.server/usr/afs/bin/fileserver
          ${INSTALL} fs_stats.h ${DESTDIR}/include/afs
  
  system: install
--- 55,91 ----
          callback.o      \
          profile.o
  
! gobjects=viced.o                \
!         afsfileprocs.group.o    \
!         host.o                  \
!         physio.o                \
!         callback.o              \
!         profile.o
  
+ all: fileserver fileserver.group
+ 
  ${objects}:${headers}
+ ${gobjects}:${headers}
  
  fileserver: viced.o ${objects} ${headers} ${LIBS}
          ${CC} ${LDFLAGS} -o fileserver ${objects} ${LIBS}
  
+ fileserver.group: viced.o ${gobjects} ${headers} ${LIBS}
+         ${CC} ${LDFLAGS} -o fileserver.group ${gobjects} ${LIBS}
+ 
+ afsfileprocs.group.o: afsfileprocs.group.c
+         ${CC} ${CFLAGS} -DUSE_GROUP_PERMS -c afsfileprocs.group.c
+ 
+ afsfileprocs.group.c: afsfileprocs.c
+         rm -f afsfileprocs.group.c
+         ln -s afsfileprocs.c afsfileprocs.group.c
+ 
  lint:
          lint -uvn  -I${SRCDIR}include viced.c afsfileprocs.c host.c physio.c callback.c profile.c ${SRCDIR}lib/afs/llib-lutil.ln
  
  install: all
          ${INSTALL} -ns fileserver ${DESTDIR}root.server/usr/afs/bin/fileserver
+         ${INSTALL} -ns fileserver.group ${DESTDIR}root.server/usr/afs/bin/fileserver.group
          ${INSTALL} fs_stats.h ${DESTDIR}/include/afs
  
  system: install
===================================================================
RCS file: ./viced/RCS/afsfileprocs.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./viced/afsfileprocs.c
*** /tmp/,RCSt1kU0u6_	Wed Jan  1 13:16:39 1992
--- ./viced/afsfileprocs.c	Mon Dec 30 10:30:29 1991
***************
*** 72,78 ****
  #include <sys/inode.h>
  #endif AFS_VFSINCL_ENV
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/afsfileprocs.c,v 1.1 91/12/23 17:02:47 probe Exp $")
  
  #ifndef R_SUPPORT
  #define R_SUPPORT 0
--- 72,78 ----
  #include <sys/inode.h>
  #endif AFS_VFSINCL_ENV
  
! RCSID ("$Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/viced/RCS/afsfileprocs.c,v 1.2 91/12/30 10:29:50 probe Exp $")
  
  #ifndef R_SUPPORT
  #define R_SUPPORT 0
***************
*** 3584,3589 ****
--- 3584,3591 ----
              if ((InStatus->Mask & AFS_SETOWNER) && InStatus->Owner != targetptr->disk.owner && VanillaUser (client))
                  return(EACCES);
              if ((InStatus->Mask & AFS_SETGROUP) && InStatus->Group != targetptr->disk.group && VanillaUser (client))
+                 return(EACCES);
+             if ((InStatus->Mask & AFS_SETMODE) && (InStatus->UnixModeBits & (ISUID|ISGID)) != 0 && VanillaUser(client))
                return(EACCES);
          } else {
              if (CallingRoutine == CHK_STOREDATA || VanillaUser(client)) {
===================================================================
RCS file: ./volser/RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./volser/Makefile
*** /tmp/,RCSt1kU0wzm	Wed Jan  1 13:16:47 1992
--- ./volser/Makefile	Wed Jan  1 09:52:49 1992
***************
*** 1,6 ****
  #/* Copyright (C) 1990 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/volser/RCS/Makefile,v 1.1 91/12/23 17:02:52 probe Exp $
  
  SHELL=/bin/sh
  SRCDIR=/usr/andy/
--- 1,6 ----
  #/* Copyright (C) 1990 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/volser/RCS/Makefile,v 1.2 92/01/01 09:52:25 probe Exp $
  
  SHELL=/bin/sh
  SRCDIR=/usr/andy/
***************
*** 8,14 ****
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=${SRCDIR}bin/compile_et
! CFLAGS=-g -I${SRCDIR}include ${XCFLAGS}
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
--- 8,14 ----
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=${SRCDIR}bin/compile_et
! CFLAGS= -I${SRCDIR}include ${XCFLAGS}
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
***************
*** 41,47 ****
  all: volserver libvolser.a vos
  
  vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
!         cc -g -o vos vos.o $(VSOBJS) libvolser.a  ${LIBS}
  
  libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o 
          -rm -f libvolser.a
--- 41,47 ----
  all: volserver libvolser.a vos
  
  vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
!         cc  -o vos vos.o $(VSOBJS) libvolser.a  ${LIBS}
  
  libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o 
          -rm -f libvolser.a
***************
*** 71,77 ****
  volint.xdr.o: volint.xdr.c ${INTINCLS}
  
  volserver: $(SOBJS) $(LIBS) $(HACKS)
!         cc -g -o volserver $(SOBJS) $(HACKS) $(LIBS)
  
  system: install
  install: all
--- 71,77 ----
  volint.xdr.o: volint.xdr.c ${INTINCLS}
  
  volserver: $(SOBJS) $(LIBS) $(HACKS)
!         cc  -o volserver $(SOBJS) $(HACKS) $(LIBS)
  
  system: install
  install: all
***************
*** 78,83 ****
--- 78,84 ----
          ${INSTALL} volserver ${DESTDIR}root.server/usr/afs/bin
          ${INSTALL} volser.h ${DESTDIR}include/afs
          ${INSTALL} volint.h ${DESTDIR}include/afs
+         ${INSTALL} vos ${DESTDIR}bin
          ${INSTALL} vos ${DESTDIR}etc
          ${INSTALL} vos ${DESTDIR}root.server/usr/afs/bin
          ${INSTALL} libvolser.a ${DESTDIR}lib/afs
===================================================================
RCS file: ./wash/RCS/rcsmkdir.c,v
retrieving revision 1.1
diff -btw -c -r1.1 ./wash/rcsmkdir.c
*** /tmp/,RCSt1kU03m4	Wed Jan  1 13:16:49 1992
--- ./wash/rcsmkdir.c	Mon Dec 30 09:45:08 1991
***************
*** 25,31 ****
                  /*
                   *  Non-terminal must be created
                   */
!                 if (mkdir(totalpath, 0755) != 0) {
                      perror(argv[0]);
                      exit(1);
                  }
--- 25,31 ----
                  /*
                   *  Non-terminal must be created
                   */
!                 if (mkdir(totalpath, 0777) != 0) {
                      perror(argv[0]);
                      exit(1);
                  }
***************
*** 37,43 ****
              /*
               *  terminal must be created
               */
!             if (mkdir(totalpath, 0755) != 0) {
                  perror(argv[0]);
                  exit(1);
              }
--- 37,43 ----
              /*
               *  terminal must be created
               */
!             if (mkdir(totalpath, 0777) != 0) {
                  perror(argv[0]);
                  exit(1);
              }
rcsdiff error: can't find ./RCS/.rcstimes,v nor ./.rcstimes,v
===================================================================
RCS file: ./RCS/Makefile,v
retrieving revision 1.1
diff -btw -c -r1.1 ./Makefile
*** /tmp/,RCSt1kU05nA	Wed Jan  1 13:16:49 1992
--- ./Makefile	Mon Dec 30 10:22:27 1991
***************
*** 1,10 ****
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/RCS/Makefile,v 1.1 91/12/23 17:02:55 probe Exp $
  
  SHELL=/bin/sh
  SYS_NAME=`sys`
! DESTDIR=dest/
  SRCDIR=${DESTDIR}
  INSTALL=${SRCDIR}bin/install
  WASHTOOL=${SRCDIR}bin/washtool
--- 1,10 ----
  #/* Copyright (C) 1990, 1989 Transarc Corporation - All rights reserved */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/src/3.1b/src/RCS/Makefile,v 1.2 91/12/30 10:21:58 probe Exp $
  
  SHELL=/bin/sh
  SYS_NAME=`sys`
! DESTDIR=${SYS_NAME}/dest/
  SRCDIR=${DESTDIR}
  INSTALL=${SRCDIR}bin/install
  WASHTOOL=${SRCDIR}bin/washtool
***************
*** 26,31 ****
--- 26,71 ----
  #   install, rxgen, compile_et and others already exist and runs it with
  #   "-argument kinstall".
  
+ athena:
+         -mkdir ${SYS_NAME} ${SYS_NAME}/dest ${SYS_NAME}/obj
+         -case "${SYS_NAME}" in \
+         rs_aix31) \
+                 flags="$(MFLAGS) XCFLAGS='-I/usr/athena/include -D_BSD' XLIBS='/usr/athena/lib/libkrb.a /lib/libbsd.a' KLIBDIR=/usr/athena/lib" \
+                 dirs="libafs";;\
+         mac_aux2) \
+                 flags="$(MFLAGS) XCFLAGS='-I/usr/athena/include' XLIBS='/lib/libc.a /usr/athena/lib/libkrb.a' KLIBDIR=/usr/athena/lib RANLIB=\:";;\
+         pmax_ul*) \
+                 flags="$(MFLAGS) XCFLAGS='-I/usr/athena/include' XLIBS='/lib/libc.a /usr/athena/lib/libkrb.a' KLIBDIR=/usr/athena/lib" \
+                 dirs="libafs dkload";;\
+         *) \
+                 flags="$(MFLAGS) XCFLAGS='-I/usr/athena/include' XLIBS='/lib/libc.a /usr/athena/lib/libkrb.a' KLIBDIR=/usr/athena/lib";;\
+         esac; \
+         wflags='-arg "install '"$${flags}"'"'; \
+         for i in config pinstall util comerr cmd tools wash; do \
+                 if [ ! -d ${SYS_NAME}/obj/$$i ]; then \
+                         mkdir ${SYS_NAME}/obj/$$i; \
+                 ( cd ${SYS_NAME}/obj/$$i; \
+                   if [ ! -d DEST ]; then \
+                           ln -s ../../../src/$$i SRC; \
+                           ln -s ../../../${SYS_NAME}/dest DEST; \
+                           ln -s SRC/* .; rm -f RCS; \
+                   fi; \
+                   eval make install \
+                         SYS_NAME=${SYS_NAME} SRCDIR=DEST/ DESTDIR=DEST/ \
+                         "$${flags}" ); \
+                 fi; \
+                 done; \
+         PATH=`/bin/pwd`/${SYS_NAME}/dest/bin:$$PATH; export PATH; \
+         make $(MFLAGS) $(MOPT) \
+                 afsd bozo butc bu_utils log scout vfsck wash $${dirs} \
+                 SYS_NAME=${SYS_NAME} WASHTOOLFLAGS="$${wflags}"; \
+         ${WASHTOOL} object doc; \
+         ${WASHTOOL} object doc/man; \
+         ${WASHTOOL} object athena; \
+         ${WASHTOOL} object athena/aklog; \
+         eval ${COMPILE_PART1} athena "$${wflags}"; \
+         eval ${COMPILE_PART1} doc/man "$${wflags}"
+ 
  all:
          -mkdir ${SYS_NAME}
          -mkdir ${SYS_NAME}/dest
***************
*** 173,179 ****
  #convert: project ntp
  #       ${COMPILE_PART1} convert ${COMPILE_PART2}
  
! bozo: project ntp
          ${COMPILE_PART1} bozo ${COMPILE_PART2}
  
  rpc.mountd: project bozo
--- 213,219 ----
  #convert: project ntp
  #       ${COMPILE_PART1} convert ${COMPILE_PART2}
  
! bozo: project
          ${COMPILE_PART1} bozo ${COMPILE_PART2}
  
  rpc.mountd: project bozo
***************
*** 186,195 ****
                   echo skipping rpc.mountd for ${SYS_NAME} ;; \
          esac
  
! vfsck:  project rpc.mountd
          case ${SYS_NAME} in \
          rs_aix31 )      \
!                 ${COMPILE_PART1} vfsckaix31 ${COMPILE_PART2} ;; \
          aix_22 | rt_aix221 )  \
                  ${COMPILE_PART1} vfsckaix ${COMPILE_PART2} ;; \
          hp9000s300 | hp9000s800 | hp300_70 | hp800_70 | hp300_ux70 | hp800_ux70 ) \
--- 226,239 ----
                   echo skipping rpc.mountd for ${SYS_NAME} ;; \
          esac
  
! vfsck:  project
          case ${SYS_NAME} in \
          rs_aix31 )      \
!                 if [ -d ${DESTDIR}bos ]; then \
!                         ${COMPILE_PART1} vfsckaix31 ${COMPILE_PART2} ; \
!                 else \
!                         echo "Skipping vfsckaix31: bos package is missing"; \
!                 fi ;; \
          aix_22 | rt_aix221 )  \
                  ${COMPILE_PART1} vfsckaix ${COMPILE_PART2} ;; \
          hp9000s300 | hp9000s800 | hp300_70 | hp800_70 | hp300_ux70 | hp800_ux70 ) \
***************
*** 244,250 ****
  log: project update volser
          ${COMPILE_PART1} log ${COMPILE_PART2}
  
! bu_utils: project
          ${COMPILE_PART1} bu_utils ${COMPILE_PART2}
  
  bubasics: project comerr
--- 288,294 ----
  log: project update volser
          ${COMPILE_PART1} log ${COMPILE_PART2}
  
! bu_utils: project gtx
          ${COMPILE_PART1} bu_utils ${COMPILE_PART2}
  
  bubasics: project comerr
***************
*** 291,298 ****
          ${COMPILE_PART1} wash ${COMPILE_PART2}
  
  finale: afsd allrcmds butc dkload kauth log package project ptserver \
!         scout bu_utils ubik uss vfsck volser ircs wash xstat 
!         
          ${COMPILE_PART1} finale ${COMPILE_PART2}
  
  # Use washtool to ensure MakefileProto is current and obj/libafs exists.
--- 335,342 ----
          ${COMPILE_PART1} wash ${COMPILE_PART2}
  
  finale: afsd allrcmds butc dkload kauth log package project ptserver \
!                 scout bu_utils ubik uss vfsck volser ircs wash xstat \
!                 ntp rpc.mountd
          ${COMPILE_PART1} finale ${COMPILE_PART2}
  
  # Use washtool to ensure MakefileProto is current and obj/libafs exists.

home help back first fref pref prev next nref lref last post