[4680] in Athena Bugs

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

AFS: patches sent to Transarc for 3.0B2

daemon@ATHENA.MIT.EDU (Richard Basch)
Tue Apr 3 18:42:28 1990

Date: Tue, 3 Apr 90 18:41:17 -0400
To: bugs@ATHENA.MIT.EDU
From: Richard Basch <probe@MIT.EDU>

[0163] daemon@ATHENA.MIT.EDU  AFS_bugs  03/31/90 06:26 (1601 lines)
Subject: AFS 3.0 Beta 2 fixes
Date: Sat, 31 Mar 90 06:25:37 -0500
To: afsbugs@TRANSARC.COM
Cc: bug-afs@MIT.EDU
From: Richard Basch <probe@MIT.EDU>

Enclosed is the ChangeLog file and the patches that we have made to the
Beta2 code that was just released last week.  Additional descriptions
have been enclosed with the patches.

Enjoy,
-Richard


3/25/90		config/param.rt_r3		probe
		config/param.vax_43		probe
		config/param.decmips_30		probe
	Athena configuration

3/26/90		auth/userok.c, 1.14.1.1		probe
	Include <krb.h> if AFS_ATHENA_STDENV is defined.

3/26/90		auth/userok.c, 1.14.1.2		probe
	Replaced magic superuser "afs" with a string constant defined
	in auth.p.h (AUTH_SUPERUSER).  (We have a real user "afs")

	Allow for both Kerberos and kaserver authentication, even when
	cellname != realmname.
	
3/26/90		auth/auth.p.h, 1.9.1.1		probe
		auth/authcon.c, 1.3.1.1		probe
	Replaced magic superuser "afs" with a string constant defined
	in auth.p.h (AUTH_SUPERUSER).  (We have a real user "afs")

3/26/90		butc/tcmain.c, 1.14.1.1		probe
	Added -cell argument to allow butc to interact with volsers
	not in the machine's default cell.

3/26/90		viced/host.c			probe
	Added #include <krb.h> if AFS_ATHENA_STDENV is defined.

	Allow for both Kerberos and kaserver authentication, even when
	cellname != realmname.
	
3/26/90		viced/afsfileprocs.c		probe
	Added code (ifdef'd USE_GROUP_PERMS) that when enabled will mask
	members of the acl against the group bits and the owner against
	the owner bits of the files.  chmod() semantics are still the
	same, so people with PRFS_WRITE may still change files that have
	incorrectly set modes.

3/26/90		*/Makefile			probe
	Changed -g to -O.

3/26/90		bozo/Makefile	viced/Makefile		probe
		budb/Makefile	vlserver/Makefile
		kauth/Makefile	volser/Makefile
	Added -lkrb to link step (to resolve krb_get_lrealm)

3/27/90		rxkad/ticket.c, 1.13.1.1	probe
	Changed lifetime declarations from "char" to "unsigned char"

3/29/90		afs/afs_vnodeops.c, 1.118.1.1	probe
	Workaround for an IBM RT/PC "hc" compiler bug

3/29/90		afs/afs_osifile.c, 1.22.1.1	probe
	Ultrix vs. BSD handling of "pte"

3/29/90		volser/vsprocs.c, 1.71.1.1	probe
	Use a clone if the ro site is on the same partition as the rw site.

3/29/90		afsd/afsd.c, 1.28.1.1		probe
	Only have the hack for CMU's system if "CMU" is defined.

3/29/90		login/login.c, 1.10.1.1		probe
	BSD + Wisconsin's NFS yields an include structure similar to Sun's

3/31/90		vfsck43/main.c, 1.10.1.1	probe
	ACIS 4.3 (Dec. 88) calls the routine unmount() like all the
	other VFS systems.  Don't special case IBM anymore...

3/31/90		rx/testserver.c, 1.11.1.1	probe
		rx/testclient.c, 1.12.1.1	probe
	Added a missing htons() call around the server port.

3/31/90		butc/Makefile, 1.5.1.2		probe
		inetd/Makefile, 1.6.1.2		probe
		rsh/Makefile, 1.9.1.2		probe
	Changed reference to /usr/andy/ to ${SRCDIR}


We found the routines in the pre-3.0 alpha code to work better with our
BSD 4.3 system.  I believe that this should be based on "ultrix",
however, in this patch, we left the machines listed.  Since Ultrix only
exists on both of these architectures, it is possible to simplify the
condition.


RCS file: ./afs/RCS/afs_osifile.c,v
retrieving revision 1.23
diff -c -r1.23 ./afs/afs_osifile.c
*** /tmp/,RCSt1009453	Sat Mar 31 03:30:38 1990
--- ./afs/afs_osifile.c	Thu Mar 29 19:15:44 1990
***************
*** 221,227 ****
  		v = btop(bp->b_un.b_addr);
  		o = (int)bp->b_un.b_addr & PGOFSET;
  		npte = btoc(bp->b_bcount + o);
! #if defined(vax) || defined(mips)
  		rp = bp->b_flags&B_DIRTY ? &proc[2] : bp->b_proc;
  		if (bp->b_flags & B_UAREA)
  		    pte = &rp->p_addr[v];
--- 221,227 ----
  		v = btop(bp->b_un.b_addr);
  		o = (int)bp->b_un.b_addr & PGOFSET;
  		npte = btoc(bp->b_bcount + o);
! #if defined(ultrix) && (defined(vax) || defined(mips))
  		rp = bp->b_flags&B_DIRTY ? &proc[2] : bp->b_proc;
  		if (bp->b_flags & B_UAREA)
  		    pte = &rp->p_addr[v];


The distributed version hc2.1 for the IBM PC/RT exhibits a bug.
Enclosed is a simple work-around.  Admittedly, having compiler
dependencies is not clean, but you may wish to include it to broaden
your customer base.


RCS file: ./afs/RCS/afs_vnodeops.c,v
retrieving revision 1.118
diff -c -r1.118 ./afs/afs_vnodeops.c
*** /tmp/,RCSt1009460	Sat Mar 31 03:30:54 1990
--- ./afs/afs_vnodeops.c	Thu Mar 29 19:20:38 1990
***************
*** 767,772 ****
--- 767,775 ----
      long startDate;
      long max;
      register struct dcache *tdc;
+ #ifdef __HIGHC__
+     volatile
+ #endif
      long offset, len, error;
      struct uio tuio;
      struct iovec *tvec;  /* again, should have define */


CMU should really have their own #ifdef, if this is site-specific.  It
bit us, for instance.

RCS file: ./afsd/RCS/afsd.c,v
retrieving revision 1.28
diff -c -r1.28 ./afsd/afsd.c
*** /tmp/,RCSt1009474	Sat Mar 31 03:31:23 1990
--- ./afsd/afsd.c	Thu Mar 29 19:36:00 1990
***************
*** 969,975 ****
      if (afsd_verbose)
  	printf("%s: Mounting the AFS root on '%s', flags: %d.\n",
  	       rn, cacheMountDir, mountFlags);
! #ifdef sys_rt_r3
      /* hack for cmu while running combo vnode/normal system */
      if ((syscall(180, MOUNT_AFS,cacheMountDir,mountFlags,(caddr_t) 0)) < 0)
  #else sys_rt_r3
--- 969,975 ----
      if (afsd_verbose)
  	printf("%s: Mounting the AFS root on '%s', flags: %d.\n",
  	       rn, cacheMountDir, mountFlags);
! #if defined(sys_rt_r3) && defined(CMU)
      /* hack for cmu while running combo vnode/normal system */
      if ((syscall(180, MOUNT_AFS,cacheMountDir,mountFlags,(caddr_t) 0)) < 0)
  #else sys_rt_r3


At Athena, we had a user "afs" long before we incorporated AFS into our
environment.  The following change allows a site to choose a new magic
super-user name without much difficulty.


RCS file: ./auth/RCS/auth.p.h,v
retrieving revision 1.9
diff -c -r1.9 ./auth/auth.p.h
*** /tmp/,RCSt1009487	Sat Mar 31 03:31:42 1990
--- ./auth/auth.p.h	Mon Mar 26 15:14:58 1990
***************
*** 7,12 ****
--- 7,15 ----
  #ifndef __AUTH_AFS_INCL_
  #define	__AUTH_AFS_INCL_    1
  
+ /* super-user principal used by servers when talking to other servers */
+ #define AUTH_SUPERUSER		"#afs.\001\003\010\n\004"
+ 
  		/* no ticket good for longer than 30 days */
  #define MAXKTCTICKETLIFETIME (30*24*3600)
  #define MINKTCTICKETLEN	      32


At Athena, we had a user "afs" long before we incorporated AFS into our
environment.  The following change allows a site to choose a new magic
super-user name without much difficulty.

There are inconsistent definitions of AFS_ATHENA_STDENV.  In
pts/ptprocs.c, it is coded as supporting both Kerberos authentication
and kaserver authentication.  Though the primary Athena cell does not
run a kaserver, many of the other cells here do.  Our coding supports
both Kerberos and kaserver authentication.  Patches included...

RCS file: ./auth/RCS/userok.c,v
retrieving revision 1.14
diff -c -r1.14 ./auth/userok.c
*** /tmp/,RCSt1009500	Sat Mar 31 03:32:05 1990
--- ./auth/userok.c	Mon Mar 26 15:11:55 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v 1.14 89/09/12 16:58:45 kazar Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v 1.14.1.2 90/03/26 15:10:13 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v $ */
  
  /*
***************
*** 8,17 ****
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v 1.14 89/09/12 16:58:45 kazar Exp $";
  #endif
  
  /* $Log:	userok.c,v $
   * Revision 1.14  89/09/12  16:58:45  kazar
   * return better error codes from super-user maintaining 
   * code.
--- 8,24 ----
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/userok.c,v 1.14.1.2 90/03/26 15:10:13 probe Exp $";
  #endif
  
  /* $Log:	userok.c,v $
+  * Revision 1.14.1.2  90/03/26  15:10:13  probe
+  * Allow for using both a Kerberos server and a kaserver (where realm != cell)
+  * Replaced user "afs" with a string constant (defined in auth.p.h)
+  * 
+  * Revision 1.14.1.1  90/03/26  15:07:19  probe
+  * Include <krb.h> if AFS_ATHENA_STDENV is defined
+  * 
   * Revision 1.14  89/09/12  16:58:45  kazar
   * return better error codes from super-user maintaining 
   * code.
***************
*** 38,43 ****
--- 45,54 ----
  #include <rx/rx_vab.h>
  #include <stdio.h>
  
+ #ifdef AFS_ATHENA_STDENV
+ #include <krb.h>
+ #endif
+ 
  #include "auth.h"
  #include "cellconfig.h"
  #include "keys.h"
***************
*** 268,274 ****
  #ifdef AFS_ATHENA_STDENV
  	    if (krb_get_lrealm(local_realm, 0) != KSUCCESS)
  		strncpy(local_realm, localcellname, REALM_SZ);
! 	    if (strcasecmp(local_realm, tcell))
  #else
  	    if (strcasecmp(localcellname, tcell))
  #endif
--- 279,286 ----
  #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
***************
*** 286,292 ****
  
  
  	if (exp	< FT_ApproxTime()) return 0;	/* expired tix */
! 	if (strcmp("afs", uname) == 0) flag = 1;
  	else flag = FindUser(adir, uname);	/* true iff in userlist file */
  	return flag;
      }
--- 298,304 ----
  
  
  	if (exp	< FT_ApproxTime()) return 0;	/* expired tix */
! 	if (strcmp(AUTH_SUPERUSER, uname) == 0) flag = 1;
  	else flag = FindUser(adir, uname);	/* true iff in userlist file */
  	return flag;
      }


At Athena, we had a user "afs" long before we incorporated AFS into our
environment.  The following change allows a site to choose a new magic
super-user name without much difficulty.

RCS file: ./auth/RCS/authcon.c,v
retrieving revision 1.3
diff -c -r1.3 ./auth/authcon.c
*** /tmp/,RCSt1009505	Sat Mar 31 03:32:18 1990
--- ./auth/authcon.c	Mon Mar 26 15:15:29 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v 1.3 89/02/02 12:59:47 ota Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v 1.3.1.1 90/03/26 15:15:10 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v $ */
  
  /*
***************
*** 8,17 ****
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v 1.3 89/02/02 12:59:47 ota Exp $";
  #endif
  
  /* $Log:	authcon.c,v $
   * Revision 1.3  89/02/02  12:59:47  ota
   * Added copyright
   * Cleaned up session key code by calling des_random_key.
--- 8,20 ----
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/auth/RCS/authcon.c,v 1.3.1.1 90/03/26 15:15:10 probe Exp $";
  #endif
  
  /* $Log:	authcon.c,v $
+  * Revision 1.3.1.1  90/03/26  15:15:10  probe
+  * Replaced user "afs" with a string constant defined in auth.p.h
+  * 
   * Revision 1.3  89/02/02  12:59:47  ota
   * Added copyright
   * Cleaned up session key code by calling des_random_key.
***************
*** 92,98 ****
      
      /* now create the actual ticket */
      ticketLen = sizeof(tbuffer);
!     code = tkt_MakeTicket(tbuffer, &ticketLen, &key, "afs", "", "", 0,
  			   0xffffffff, &session, 0, "afs", "");
      /* parms were buffer, ticketlen, key to seal ticket with, principal
  	name, instance and cell, start time, end time, session key to seal
--- 95,101 ----
      
      /* now create the actual ticket */
      ticketLen = sizeof(tbuffer);
!     code = tkt_MakeTicket(tbuffer, &ticketLen, &key, AUTH_SUPERUSER, "", "", 0,
  			   0xffffffff, &session, 0, "afs", "");
      /* parms were buffer, ticketlen, key to seal ticket with, principal
  	name, instance and cell, start time, end time, session key to seal


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./bozo/RCS/Makefile,v
retrieving revision 1.24
diff -c -r1.24 ./bozo/Makefile
*** /tmp/,RCSt1009525	Sat Mar 31 03:32:42 1990
--- ./bozo/Makefile	Mon Mar 26 19:32:36 1990
***************
*** 4,10 ****
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=$(SRCDIR)bin/compile_et
! CFLAGS=-g -I${SRCDIR}include
  RPCINCLS=${SRCDIR}include/lwp.h ${SRCDIR}include/rx/rx.h bosint.h
  
  INCLS=bnode.h ${RPCINCLS} ${SRCDIR}include/afs/auth.h \
--- 4,10 ----
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=$(SRCDIR)bin/compile_et
! CFLAGS=-O -I${SRCDIR}include
  RPCINCLS=${SRCDIR}include/lwp.h ${SRCDIR}include/rx/rx.h bosint.h
  
  INCLS=bnode.h ${RPCINCLS} ${SRCDIR}include/afs/auth.h \
***************
*** 72,78 ****
  	ranlib libbos.a
  
  bosserver: $(OBJS) $(LIBS)
! 	cc $(CFLAGS) -o bosserver $(OBJS) $(LIBS)
  
  system: install
  
--- 72,78 ----
  	ranlib libbos.a
  
  bosserver: $(OBJS) $(LIBS)
! 	cc $(CFLAGS) -o bosserver $(OBJS) $(LIBS) -lkrb
  
  system: install
  


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./budb/RCS/Makefile,v
retrieving revision 1.4
diff -c -r1.4 ./budb/Makefile
*** /tmp/,RCSt1009538	Sat Mar 31 03:33:08 1990
--- ./budb/Makefile	Mon Mar 26 19:37:42 1990
***************
*** 1,4 ****
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/budb/RCS/Makefile,v 1.4 89/10/27 21:21:43 vasilis Exp $
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/budb/RCS/Makefile,v $
  
  #/*
--- 1,4 ----
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/budb/RCS/Makefile,v 1.4.1.2 90/03/26 19:37:33 probe Exp $
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/budb/RCS/Makefile,v $
  
  #/*
***************
*** 14,20 ****
  COMPILE_ET = ${SRCDIR}bin/compile_et
  RXGEN=${SRCDIR}bin/rxgen
  
! CFLAGS = -g -I${SRCDIR}include ${AIXCOPTS}
  INCLS= \
  	${SRCDIR}include/lock.h \
  	${SRCDIR}include/ubik.h \
--- 14,20 ----
  COMPILE_ET = ${SRCDIR}bin/compile_et
  RXGEN=${SRCDIR}bin/rxgen
  
! CFLAGS = -O -I${SRCDIR}include ${AIXCOPTS}
  INCLS= \
  	${SRCDIR}include/lock.h \
  	${SRCDIR}include/ubik.h \
***************
*** 66,72 ****
  	cc -o test_db test_db.o libbudb.a ${LIBS}
  
  budb_server: server.o procs.o database.o db_alloc.o db_hash.o budb.ss.o budb.xdr.o ${LIBS}
! 	cc -o budb_server server.o procs.o database.o db_alloc.o db_hash.o budb.ss.o budb.xdr.o ${LIBS}
  
  budb.xdr.c budb.cs.c budb.ss.c budb.h: budb.rg
  	${RXGEN} budb.rg
--- 66,72 ----
  	cc -o test_db test_db.o libbudb.a ${LIBS}
  
  budb_server: server.o procs.o database.o db_alloc.o db_hash.o budb.ss.o budb.xdr.o ${LIBS}
! 	cc -o budb_server server.o procs.o database.o db_alloc.o db_hash.o budb.ss.o budb.xdr.o ${LIBS} -lkrb
  
  budb.xdr.c budb.cs.c budb.ss.c budb.h: budb.rg
  	${RXGEN} budb.rg


This allows a "-cell ..." specification on the "butc" command line.  We
have servers that server a different cell than they are clients for.
Also, nothing states that the machine acting as the tape coordinator
must be in the same cell as that which the backups are being created
for.  This patch will allow a -cell to be specified.

RCS file: ./butc/RCS/tcmain.c,v
retrieving revision 1.14
diff -c -r1.14 ./butc/tcmain.c
*** /tmp/,RCSt1009554	Sat Mar 31 03:33:32 1990
--- ./butc/tcmain.c	Mon Mar 26 16:16:00 1990
***************
*** 211,216 ****
--- 211,222 ----
  	}
      }
  
+     if (as->parms[2].items) {
+ 	strncpy(cellName, as->parms[2].items->data, sizeof(cellName));
+     } else {
+ 	cellName[0] = '\0';
+     }
+ 
      fprintf(stderr,"Tape Coordinator: Port offset %u   Debug level %d\n",
  	    portOffset,debugLevel);
      if(GetDeviceConfig(tapeConfigFile,&globalTapeConfig,portOffset)){
***************
*** 248,257 ****
  	fprintf(stderr,"Could not open configuration directory (%s).\n", confDir);
  	return -1;
      }
!     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);
      }
      code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
--- 254,265 ----
  	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);
! 	}
      }
      code = afsconf_GetCellInfo(tdir, cellName, AFSCONF_VLDBSERVICE, &info);
      if (code) {
***************
*** 351,356 ****
--- 359,365 ----
      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");
+     cmd_AddParm(ts, "-cell", CMD_SINGLE, CMD_OPTIONAL, "cell name");
  
      /* special case "no args" case since cmd_dispatch gives help message instead */
      if (argc == 1) {
***************
*** 365,370 ****
--- 374,380 ----
  	ti->next = 0;
  	ti->data = "0";
  	ts->parms[1].items = ti;
+ 	ts->parms[2].items = (struct cmd_item *) NULL;
  	return WorkerBee(ts, (char *) 0);
      }
      else



Changed a reference of /usr/andy/ to ${SRCDIR}.  (Needed to have this
compile).

RCS file: ./butc/RCS/Makefile,v
retrieving revision 1.5
diff -c -r1.5 ./butc/Makefile
*** /tmp/,RCSt1010435	Sat Mar 31 05:34:51 1990
--- butc/Makefile	Sat Mar 31 05:33:29 1990
***************
*** 15,21 ****
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include/rx -I${SRCDIR}include
  
! CFLAGS=-g -w ${INCDIRS}
  
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
  
--- 15,21 ----
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include/rx -I${SRCDIR}include
  
! CFLAGS=-O -w ${INCDIRS}
  
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
  
***************
*** 23,29 ****
  ${SRCDIR}lib/afs/libvolser.a ${SRCDIR}lib/afs/vlib.a ${SRCDIR}/lib/afs/libacl.a \
  ${SRCDIR}lib/afs/libsys.a  ${SRCDIR}lib/afs/libvldb.a \
  ${SRCDIR}lib/libubik.a ${SRCDIR}lib/librx.a ${SRCDIR}lib/liblwp.a \
! ${SRCDIR}lib/libscrypt.a ${SRCDIR}lib/afs/libauth.a /usr/andy/lib/afs/libsys.a \
  ${SRCDIR}lib/afs/libcmd.a ${SRCDIR}lib/librxkad.a ${SRCDIR}lib/libdes.a \
  ${SRCDIR}lib/afs/libcom_err.a ${SRCDIR}lib/afs/libkauth.a ${SRCDIR}lib/afs/util.a
  
--- 23,29 ----
  ${SRCDIR}lib/afs/libvolser.a ${SRCDIR}lib/afs/vlib.a ${SRCDIR}/lib/afs/libacl.a \
  ${SRCDIR}lib/afs/libsys.a  ${SRCDIR}lib/afs/libvldb.a \
  ${SRCDIR}lib/libubik.a ${SRCDIR}lib/librx.a ${SRCDIR}lib/liblwp.a \
! ${SRCDIR}lib/libscrypt.a ${SRCDIR}lib/afs/libauth.a ${SRCDIR}lib/afs/libsys.a \
  ${SRCDIR}lib/afs/libcmd.a ${SRCDIR}lib/librxkad.a ${SRCDIR}lib/libdes.a \
  ${SRCDIR}lib/afs/libcom_err.a ${SRCDIR}lib/afs/libkauth.a ${SRCDIR}lib/afs/util.a
  


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./kauth/RCS/Makefile,v
retrieving revision 1.53
diff -c -r1.53 ./kauth/Makefile
*** /tmp/,RCSt1009621	Sat Mar 31 03:35:46 1990
--- ./kauth/Makefile	Mon Mar 26 19:39:13 1990
***************
*** 5,11 ****
  # * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
  # */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/kauth/RCS/Makefile,v 1.53 90/03/12 16:17:52 hines Exp $
  
  SHELL = /bin/sh
  SRCDIR=/usr/andy/
--- 5,11 ----
  # * REFER TO COPYRIGHT INSTRUCTIONS FORM NUMBER G120-2083
  # */
  
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/kauth/RCS/Makefile,v 1.53.1.2 90/03/26 19:39:04 probe Exp $
  
  SHELL = /bin/sh
  SRCDIR=/usr/andy/
***************
*** 13,19 ****
  INSTALL=${SRCDIR}bin/install
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! CFLAGS = -g -I${SRCDIR}include ${AIXCOPTS}
  INCLS=${SRCDIR}include/ubik.h \
               ${SRCDIR}include/lwp.h \
               ${SRCDIR}include/lock.h  \
--- 13,19 ----
  INSTALL=${SRCDIR}bin/install
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! CFLAGS = -O -I${SRCDIR}include ${AIXCOPTS}
  INCLS=${SRCDIR}include/ubik.h \
               ${SRCDIR}include/lwp.h \
               ${SRCDIR}include/lock.h  \
***************
*** 38,44 ****
  	rm -f *.o kaserver kas klog kpasswd klogin kauth.cs.c kauth.ss.c kauth.xdr.c kauth.h kautils.h kaerrors.c *.a core
  
  kaserver: kautils.o kalocalcell.o kadatabase.o kaprocs.o kauth.ss.o kauth.xdr.o kaserver.o kaaux.o krb_udp.o $(LIBS) ${SRCDIR}lib/libscrypt.a
! 	cc ${CFLAGS} -o kaserver kaserver.o kautils.o kalocalcell.o kadatabase.o krb_udp.o kaprocs.o kauth.ss.o kauth.xdr.o kaaux.o $(LIBS) ${SRCDIR}lib/libscrypt.a
  
  kaserver.o: kaserver.c ${INCLS}
  
--- 38,44 ----
  	rm -f *.o kaserver kas klog kpasswd klogin kauth.cs.c kauth.ss.c kauth.xdr.c kauth.h kautils.h kaerrors.c *.a core
  
  kaserver: kautils.o kalocalcell.o kadatabase.o kaprocs.o kauth.ss.o kauth.xdr.o kaserver.o kaaux.o krb_udp.o $(LIBS) ${SRCDIR}lib/libscrypt.a
! 	cc ${CFLAGS} -o kaserver kaserver.o kautils.o kalocalcell.o kadatabase.o krb_udp.o kaprocs.o kauth.ss.o kauth.xdr.o kaaux.o $(LIBS) ${SRCDIR}lib/libscrypt.a -lkrb
  
  kaserver.o: kaserver.c ${INCLS}
  

Unless I am mistaken, htons() wrappers are needed around the server
port.

RCS file: ./rx/RCS/testclient.c,v
retrieving revision 1.12
diff -c -r1.12 ./rx/testclient.c
*** /tmp/,RCSt1009693	Sat Mar 31 03:38:04 1990
--- ./rx/testclient.c	Sat Mar 31 03:08:01 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testclient.c,v 1.12 89/05/22 10:18:24 kazar Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testclient.c,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testclient.c,v 1.12.1.1 90/03/31 03:07:18 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testclient.c,v $ */
  
  /*
***************
*** 136,142 ****
      rx_Init(0);
      printf("Using %d packet buffers\n", rx_nPackets);
  
!     conn = rx_NewConnection(host, 2500, 3, rxnull_NewClientSecurityObject(), 0);
      if (!conn) Abort("unable to make a new connection");
      conn->peer->packetSize = packetSize - 28;
      
--- 136,142 ----
      rx_Init(0);
      printf("Using %d packet buffers\n", rx_nPackets);
  
!     conn = rx_NewConnection(host, htons(2500), 3, rxnull_NewClientSecurityObject(), 0);
      if (!conn) Abort("unable to make a new connection");
      conn->peer->packetSize = packetSize - 28;
      


RCS file: ./rx/RCS/testserver.c,v
retrieving revision 1.11
diff -c -r1.11 ./rx/testserver.c
*** /tmp/,RCSt1009702	Sat Mar 31 03:38:18 1990
--- ./rx/testserver.c	Sat Mar 31 03:08:15 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testserver.c,v 1.11 89/05/22 10:18:36 kazar Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testserver.c,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testserver.c,v 1.11.1.1 90/03/31 03:08:10 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rx/RCS/testserver.c,v $ */
  
  /*
***************
*** 104,110 ****
      signal(SIGINT, intSignal); /* Changed to SIGQUIT since dbx is broken right now */
      signal(SIGQUIT, quitSignal);
  
!     rx_Init(2500);
      secobjs[0] = rxnull_NewServerSecurityObject();
      service = rx_NewService(/*port*/0, /*service*/3, "test", secobjs, /*nsec*/1, /*Execute request*/ rcvFile? FileRequest: SimpleRequest);
      if (!service) Abort("rx_NewService returned 0!\n");
--- 104,110 ----
      signal(SIGINT, intSignal); /* Changed to SIGQUIT since dbx is broken right now */
      signal(SIGQUIT, quitSignal);
  
!     rx_Init(htons(2500));
      secobjs[0] = rxnull_NewServerSecurityObject();
      service = rx_NewService(/*port*/0, /*service*/3, "test", secobjs, /*nsec*/1, /*Execute request*/ rcvFile? FileRequest: SimpleRequest);
      if (!service) Abort("rx_NewService returned 0!\n");


Kerberos lifetimes are values from 0-255, not -128 to 127.  The
declarations should read "unsigned char" not "char".

RCS file: ./rxkad/RCS/ticket.c,v
retrieving revision 1.13
diff -c -r1.13 ./rxkad/ticket.c
*** /tmp/,RCSt1009720	Sat Mar 31 03:38:56 1990
--- ./rxkad/ticket.c	Tue Mar 27 02:21:50 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v 1.13 89/03/29 15:53:24 ota Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v $ */
  
  /*
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v 1.13.1.1 90/03/27 02:21:21 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v $ */
  
  /*
***************
*** 8,17 ****
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v 1.13 89/03/29 15:53:24 ota Exp $";
  #endif
  
  /* $Log:	ticket.c,v $
   * Revision 1.13  89/03/29  15:53:24  ota
   * Added return value for tkt_CheckTimes to indicate a recently
   *   expired ticket.
--- 8,20 ----
   */
  
  #ifndef lint
! static char rcsid[] = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/rxkad/RCS/ticket.c,v 1.13.1.1 90/03/27 02:21:21 probe Exp $";
  #endif
  
  /* $Log:	ticket.c,v $
+  * Revision 1.13.1.1  90/03/27  02:21:21  probe
+  * Changed lifetime-related declarations from "char" to "unsigned char"
+  * 
   * Revision 1.13  89/03/29  15:53:24  ota
   * Added return value for tkt_CheckTimes to indicate a recently
   *   expired ticket.
***************
*** 242,248 ****
      char  flags;
      int	  slen;
      int	  tlen;
!     char  lifetime;
      char  sname[MAXKTCNAMELEN];		/* these aren't used, */
      char  sinst[MAXKTCNAMELEN];		/* but are in the ticket */
  
--- 245,251 ----
      char  flags;
      int	  slen;
      int	  tlen;
!     unsigned char  lifetime;
      char  sname[MAXKTCNAMELEN];		/* these aren't used, */
      char  sinst[MAXKTCNAMELEN];		/* but are in the ticket */
  
***************
*** 329,335 ****
    char *sinst;
  {   char *ticketBeg = ticket;
      int	  slen;
!     char  life;
  
      *ticket++ = 0;			/* flags, always send network-byte-order */
      putstr (name, 1);
--- 332,338 ----
    char *sinst;
  {   char *ticketBeg = ticket;
      int	  slen;
!     unsigned char  life;
  
      *ticket++ = 0;			/* flags, always send network-byte-order */
      putstr (name, 1);


The Dec. '88 ACIS 4.3 release uses unmount().  Perhaps, things should be
based on AIX, but that probably doesn't have VFS so it is probably not
necessary.

RCS file: ./vfsck43/RCS/main.c,v
retrieving revision 1.10
diff -c -r1.10 ./vfsck43/main.c
*** /tmp/,RCSt1009773	Sat Mar 31 03:40:53 1990
--- ./vfsck43/main.c	Sat Mar 31 02:59:03 1990
***************
*** 2,13 ****
   * 5799-CGZ (C) COPYRIGHT = NONE
   * LICENSED MATERIALS - PROPERTY OF IBM
   */
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v 1.10 89/11/03 14:16:19 hines Exp $ */
  /* $ACIS:main.c 9.0$ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v 1.10 89/11/03 14:16:19 hines Exp $";
  #endif
  
  /*
--- 2,13 ----
   * 5799-CGZ (C) COPYRIGHT = NONE
   * LICENSED MATERIALS - PROPERTY OF IBM
   */
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v 1.10.1.1 90/03/31 02:57:27 probe Exp $ */
  /* $ACIS:main.c 9.0$ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/vfsck43/RCS/main.c,v 1.10.1.1 90/03/31 02:57:27 probe Exp $";
  #endif
  
  /*
***************
*** 555,561 ****
  		    errexit("Couldn't create %s to force full salvage!\n", fname);
  		close(fd);
  /* temporary hack so we get right mount call; will change on official IBM release */
! #if defined(AFS_VFS_ENV) && !defined(AFS_IBM_ENV) && !defined(AFS_GFS_ENV)
  		unmount(pname);
  #else AFS_VFS_ENV
  		umount(devname);
--- 555,561 ----
  		    errexit("Couldn't create %s to force full salvage!\n", fname);
  		close(fd);
  /* temporary hack so we get right mount call; will change on official IBM release */
! #if defined(AFS_VFS_ENV) && !defined(AFS_GFS_ENV)
  		unmount(pname);
  #else AFS_VFS_ENV
  		umount(devname);


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./viced/RCS/Makefile,v
retrieving revision 1.26
diff -c -r1.26 ./viced/Makefile
*** /tmp/,RCSt1009802	Sat Mar 31 03:41:56 1990
--- ./viced/Makefile	Mon Mar 26 19:40:53 1990
***************
*** 1,4 ****
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/Makefile,v 1.26 89/12/29 15:39:09 vasilis Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/Makefile,v $ 
  
  #
--- 1,4 ----
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/Makefile,v 1.26.1.2 90/03/26 19:40:42 probe Exp $ 
  # $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/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
  LDFLAGS = ${DEBUG}
  
--- 11,17 ----
  DESTDIR = /usr/andy/
  INSTALL = ${SRCDIR}bin/install
  
! DEBUG = -O 
  CFLAGS = -DNINTERFACE ${DEBUG} -I. -I${SRCDIR}include/afs -I${SRCDIR}include
  LDFLAGS = ${DEBUG}
  
***************
*** 62,68 ****
  ${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
--- 62,68 ----
  ${objects}:${headers}
  
  fileserver: viced.o ${objects} ${headers} ${LIBS}
! 	${CC} ${LDFLAGS} -o fileserver ${objects} ${LIBS} -lkrb
  
  lint:
  	lint -uvn  -I${SRCDIR}include viced.c afsfileprocs.c host.c physio.c callback.c profile.c ${SRCDIR}lib/afs/llib-lutil.ln


There are inconsistent definitions of AFS_ATHENA_STDENV.  In
pts/ptprocs.c, it is coded as supporting both Kerberos authentication
and kaserver authentication.  Though the primary Athena cell does not
run a kaserver, many of the other cells here do.  Our coding supports
both Kerberos and kaserver authentication.  Patches included...

RCS file: ./viced/RCS/host.c,v
retrieving revision 1.34
diff -c -r1.34 ./viced/host.c
*** /tmp/,RCSt1009809	Sat Mar 31 03:42:10 1990
--- ./viced/host.c	Mon Mar 26 19:51:00 1990
***************
*** 1,8 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v 1.34 89/12/29 15:40:05 vasilis Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v 1.34 89/12/29 15:40:05 vasilis Exp $";
  #endif
  
  /*
--- 1,8 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v 1.34.1.2 90/03/26 19:50:20 probe Exp $ */
  /* $Source: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v $ */
  
  #ifndef lint
! static char *rcsid = "$Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/viced/RCS/host.c,v 1.34.1.2 90/03/26 19:50:20 probe Exp $";
  #endif
  
  /*
***************
*** 31,36 ****
--- 31,39 ----
  #include <afs/vnode.h>
  #include <afs/volume.h>
  #include <errno.h>
+ #ifdef AFS_ATHENA_STDENV
+ #include <krb.h>
+ #endif
  #include <afs/acl.h>
  #include <afs/ptclient.h>
  #include <afs/prs_fs.h>
***************
*** 467,473 ****
  #ifdef AFS_ATHENA_STDENV
  	if (krb_get_lrealm(local_realm, 0) != KSUCCESS)
  	    strncpy(local_realm, localcellname, REALM_SZ);
! 	if (strcasecmp(local_realm, acell))
  #else
  	if (strcasecmp(localcellname, acell))
  #endif
--- 470,477 ----
  #ifdef AFS_ATHENA_STDENV
  	if (krb_get_lrealm(local_realm, 0) != KSUCCESS)
  	    strncpy(local_realm, localcellname, REALM_SZ);
! 	if (strcasecmp(local_realm, acell) &&
! 	    strcasecmp(localcellname, acell))
  #else
  	if (strcasecmp(localcellname, acell))
  #endif


This is a hack that we did locally and is used on only two of our cells.
Since DECorum will supposedly offer features similar to this, and better
implemented, we are just posting this for your information as to what we
required of our "source" (rel-eng.athena.mit.edu) cell.

RCS file: ./viced/RCS/afsfileprocs.c,v
retrieving revision 1.56
diff -c -r1.56 ./viced/afsfileprocs.c
*** /tmp/,RCSt1009819	Sat Mar 31 03:42:29 1990
--- ./viced/afsfileprocs.c	Mon Mar 26 19:56:46 1990
***************
*** 90,95 ****
--- 90,100 ----
  #define	OWNERREAD	0400
  #define	OWNERWRITE	0200
  
+ #ifdef USE_GROUP_PERMS
+ #define GROUPREAD	0040
+ #define GROUPWRITE	0020
+ #endif
+ 
  #define	NOTACTIVECALL	0
  #define	ACTIVECALL	1
  
***************
*** 3104,3110 ****
--- 3109,3126 ----
  		    return(EACCES);
  	    }
  	    if (CallingRoutine == CHK_FETCHDATA && targetptr->disk.type == vFile)
+ #ifdef USE_GROUP_PERMS
+ 		if ((client->ViceId != targetptr->disk.owner) &&
+ 		    !acl_IsAMember(targetptr->disk.owner, &client->CPS)) {
+ 		    errorCode = ((GROUPREAD & targetptr->disk.modeBits)
+ 				 ? 0 : EACCES);
+ 		} else {
+ 		    errorCode = ((OWNERREAD & targetptr->disk.modeBits)
+ 				 ? 0 : EACCES);
+ 		}
+ #else
  		errorCode = CheckReadMode(targetptr);
+ #endif
  	}
      } else {	/* a store operation */
  	if ((client->ViceId == targetptr->disk.owner) && (rights & PRSFS_INSERT) && (CallingRoutine != CHK_STOREACL) && (targetptr->disk.type == vFile)) {
***************
*** 3140,3145 ****
--- 3156,3177 ----
  			   the owner" path above, but here we check the bit.  However,
  			   if you're a system administrator, we ignore the 0200 bit
  			   anyway, since you may have fchowned the file, too */
+ #ifdef USE_GROUP_PERMS
+ 			if ((targetptr->disk.type == vFile)
+ 			    && VanillaUser(client)) {
+ 			    if ((client->ViceId != targetptr->disk.owner) &&
+ 				!acl_IsAMember(targetptr->disk.owner,
+ 					       &client->CPS)) {
+ 				errorCode =
+ 				    ((GROUPWRITE & targetptr->disk.modeBits)
+ 				     ? 0 : EACCES);
+ 			    } else {
+ 				errorCode =
+ 				    ((OWNERWRITE & targetptr->disk.modeBits)
+ 				     ? 0 : EACCES);
+ 			    }
+ 			} else
+ #endif
  			if ((targetptr->disk.type != vDirectory)
  			    && (!(targetptr->disk.modeBits & OWNERWRITE))
  			    && VanillaUser(client))


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./vlserver/RCS/Makefile,v
retrieving revision 1.15
diff -c -r1.15 ./vlserver/Makefile
*** /tmp/,RCSt1009827	Sat Mar 31 03:43:10 1990
--- ./vlserver/Makefile	Tue Mar 27 02:12:53 1990
***************
*** 5,11 ****
  INSTALL=${SRCDIR}bin/install
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! CFLAGS = -g -I. -I.. -I${SRCDIR}include
  INCLS=${SRCDIR}include/ubik.h \
               ${SRCDIR}include/lwp.h \
               ${SRCDIR}include/lock.h  \
--- 5,11 ----
  INSTALL=${SRCDIR}bin/install
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! CFLAGS = -O -I. -I.. -I${SRCDIR}include
  INCLS=${SRCDIR}include/ubik.h \
               ${SRCDIR}include/lwp.h \
               ${SRCDIR}include/lock.h  \
***************
*** 30,36 ****
  	rm -f *.o vlserver vlclient vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h afsvlint.cs.c afsvlint.ss.c afsvlint.xdr.c afsvlint.h core *.a *.otl vlserver.h vl_errors.c
  
  vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
! 	cc ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o  $(LIBS)
  
  vlserver.o: vlserver.c ${INCLS}
  vlutils.o: vlutils.c ${INCLS}
--- 30,36 ----
  	rm -f *.o vlserver vlclient vldbint.cs.c vldbint.ss.c vldbint.xdr.c vldbint.h afsvlint.cs.c afsvlint.ss.c afsvlint.xdr.c afsvlint.h core *.a *.otl vlserver.h vl_errors.c
  
  vlserver: vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS)
! 	cc ${CFLAGS} -o vlserver vlserver.o vlutils.o vlprocs.o vldbint.ss.o vldbint.xdr.o $(LIBS) -lkrb
  
  vlserver.o: vlserver.c ${INCLS}
  vlutils.o: vlutils.c ${INCLS}


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./volser/RCS/Makefile,v
retrieving revision 1.23
diff -c -r1.23 ./volser/Makefile
*** /tmp/,RCSt1009837	Sat Mar 31 03:43:33 1990
--- ./volser/Makefile	Mon Mar 26 19:31:17 1990
***************
*** 4,10 ****
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=${SRCDIR}bin/compile_et
! CFLAGS=-g -I${SRCDIR}include
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
--- 4,10 ----
  INSTALL=${SRCDIR}bin/install
  
  COMPILE_ET=${SRCDIR}bin/compile_et
! CFLAGS=-O -I${SRCDIR}include
  
  INCDIRS= -I${SRCDIR}include/afs -I${SRCDIR}include
  INCLIBS=-L${SRCDIR}lib/afs -L${SRCDIR}lib
***************
*** 37,43 ****
  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
--- 37,43 ----
  all: volserver libvolser.a vos
  
  vos: vos.o ${VSOBJS} libvolser.a ${LIBS}
! 	cc -O -o vos vos.o $(VSOBJS) libvolser.a  ${LIBS} -lkrb
  
  libvolser.a: volint.cs.o  $(VSOBJS) volint.ss.o 
  	-rm -f libvolser.a
***************
*** 66,72 ****
  volint.xdr.o: volint.xdr.c ${INTINCLS}
  
  volserver: $(SOBJS) $(LIBS) $(HACKS)
! 	cc -g -o volserver $(SOBJS) $(HACKS) $(LIBS)
  
  system: install
  install: all
--- 66,72 ----
  volint.xdr.o: volint.xdr.c ${INTINCLS}
  
  volserver: $(SOBJS) $(LIBS) $(HACKS)
! 	cc -O -o volserver $(SOBJS) $(HACKS) $(LIBS) -lkrb
  
  system: install
  install: all


There is no point in making a full copy of a volume to make a read-only
site on the same partition as the read-write site.  Enclosed is a patch
that makes the temporary clone the real readonly volume if there is a
readonly site on the same partition as the read-write site.  This patch
was supplied previously, and I believe it was thought a good idea, but
it never was included in the Beta releases.

RCS file: ./volser/RCS/vsprocs.c,v
retrieving revision 1.73
diff -c -r1.73 ./volser/vsprocs.c
*** /tmp/,RCSt1009842	Sat Mar 31 03:43:46 1990
--- ./volser/vsprocs.c	Thu Mar 29 18:11:24 1990
***************
*** 1365,1370 ****
--- 1365,1377 ----
      long error;
      int islocked;
      struct restoreCookie cookie;
+     int cloneisreadonly;		/* True if one of the readonly
+ 					 * volumes is on the same partition
+ 					 * as the read/write volume.  In this
+ 					 * case, we make the readonly volume
+ 					 * on the same partition a clone
+ 					 * instead of a complete copy.
+ 					 */
  
      bzero(&cookie,sizeof(cookie));
      islocked = 0;
***************
*** 1404,1409 ****
--- 1411,1419 ----
  	goto rfail;
      }
  
+     cloneisreadonly = 0;
+     if (Lp_NewMatch(afromserver, afrompart, &entry)) cloneisreadonly++;
+     
      rerelease = 0;
      for(i = 0; i < entry.nServers ; i ++)
  	if(entry.serverFlags[i] & NEW_REPSITE)
***************
*** 1436,1470 ****
  		    entry.serverFlags[i] &= ~NEW_REPSITE;/* mark this old */
  	}
  	/*make a new clone */
! 	code = AFSVolTransCreate(fromconn, afromvol, afrompart, ITBusy, &fromtid);
! 	if (code){
! 	    fprintf(STDERR,"Failed to start a transaction on the volume %u\n",afromvol); 
! 	    error = code;
! 	    goto rfail;
  	}
- 	newVol = 0;
- 	vcode = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 1, &newVol);
- 	if(vcode) {
- 	    fprintf(STDERR,"Could not allocate an Id for the clone of the volume from the VLDB\n",vcode);
- 	    error = vcode;
- 	    goto rfail;
- 	}
- 	strcpy(vname, "readonly-clone-temp");
- 	/* make a readonly clone of the volume to be released */
- 	code = AFSVolClone(fromconn, fromtid, 0,readonlyVolume, vname, &newVol);
- 	if (code){
- 	    fprintf(STDERR,"Failed to clone the rw volume %u\n",afromvol); 
- 	    error = code;
- 	    goto rfail;
- 	}
- 	code = AFSVolEndTrans(fromconn, fromtid, &rcode);
- 	fromtid = 0;
- 	if (!code) code = rcode;
- 	if (code){
- 	    fprintf(STDERR,"Failed to end the transaction on the rw volume  %u\n",afromvol);
- 	    error = code;
- 	    goto rfail;
- 	}
  	/* record the clone id and intent to release*/
  	entry.cloneId = newVol;
  	MapNetworkToHost(&entry,&storeEntry);
--- 1446,1579 ----
  		    entry.serverFlags[i] &= ~NEW_REPSITE;/* mark this old */
  	}
  	/*make a new clone */
! 	if (cloneisreadonly) {
! 	    /* Need to delete the old clone and make a new one */
! 	    if (verbose)
! 		fprintf(STDERR,"Readonly volume on same partition as read/write volume, just cloning it.\n");
! 	    code = AFSVolTransCreate(fromconn, entry.volumeId[ROVOL],
! 				     afrompart, ITOffline, &fromtid);
! 	    if (!code) {		/* It really was there */
! 		code = AFSVolDeleteVolume(fromconn, fromtid);
! 		if (code) {
! 		    fprintf(STDERR, "Failed to delete existing ro volume on the partition with the rw volume\n");
! 		    error = code;
! 		    goto rfail;
! 		}
! 		code = AFSVolEndTrans(fromconn, fromtid, &rcode);
! 		if (code) {
! 		    fprintf(STDERR,"Failed to end the transaction on the ro volume  %u\n",afromvol);
! 		    error = code;
! 		    fromtid = 0;
! 		    goto rfail;
! 		}
! 	    }
! 
! 	    code = AFSVolTransCreate(fromconn, afromvol, afrompart, ITBusy,
! 				     &fromtid);
! 	    if (code){
! 		fprintf(STDERR,
! 			"Failed to start a transaction on the volume %u\n",
! 			afromvol); 
! 		error = code;
! 		goto rfail;
! 	    }
! 	    
! 	    newVol = entry.volumeId[ROVOL];
! 	    if (newVol == INVALID_BID) {
! 		/* need to get a new id */
! 		vcode = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 1, &newVol);
! 		if(vcode) {
! 		    fprintf(STDERR,"Could not allocate an Id for the readonly volume of %s\n", entry.name);
! 		    error = vcode;
! 		    goto rfail;
! 		}
! 		/* now store it in the vldb */
! 		entry.volumeId[ROVOL] = newVol;
! 		MapNetworkToHost(&entry, &storeEntry);
! 		vcode = ubik_Call(VL_ReplaceEntry, cstruct, 0, afromvol,
! 				  RWVOL, &storeEntry, 0);
! 		if (vcode) {
! 		    fprintf(STDERR, "Could not update vldb entry for %u\n",
! 			    afromvol);
! 		    error = vcode;
! 		    goto rfail;
! 		}
! 	    }
! 	    strcpy(vname,entry.name);
! 	    strcat(vname,".readonly");
! 	    
! 	    code = AFSVolClone(fromconn, fromtid, 0, readonlyVolume, vname,
! 			       &newVol);
! 	    if (code){
! 		fprintf(STDERR,"Failed to clone the rw volume %u\n",
! 			afromvol); 
! 		error = code;
! 		goto rfail;
! 	    }
! 	    
! 	    code = AFSVolEndTrans(fromconn, fromtid, &rcode);
! 	    fromtid = 0;
! 	    if (!code) code = rcode;
! 	    if (code){
! 		fprintf(STDERR,"Failed to end the transaction on the rw volume  %u\n",afromvol);
! 		error = code;
! 		goto rfail;
! 	    }
! 
! 	    code = AFSVolTransCreate(fromconn, newVol, afrompart,
! 				     ITOffline, &fromtid);
! 	    if (code){
! 		fprintf(STDERR,"Failed to start a transaction on the volume %u\n", newVol);
! 		error = code;
! 		goto rfail;
! 	    }
! 
! 	    code = AFSVolSetFlags(fromconn, fromtid, 0);
! 	    if (code) {
! 		fprintf(STDERR,"Could not bring volume %u on line\n", newVol);
! 		error = code;
! 		goto rfail;
! 	    }
! 
! 	    code = AFSVolEndTrans(fromconn, fromtid, &rcode);
! 	    fromtid = 0;
! 	    if (!code) code = rcode;
! 	    if (code){
! 		fprintf(STDERR,"Failed to end the transaction on the rw volume  %u\n",afromvol);
! 		error = code;
! 		goto rfail;
! 	    }
! 	} else {	/* no ro volume on same partition as rw volume */
! 	    code = AFSVolTransCreate(fromconn, afromvol, afrompart, ITBusy, &fromtid);
! 	    if (code){
! 		fprintf(STDERR,"Failed to start a transaction on the volume %u\n",afromvol); 
! 		error = code;
! 		goto rfail;
! 	    }
! 	    newVol = 0;
! 	    vcode = ubik_Call(VL_GetNewVolumeId,cstruct, 0, 1, &newVol);
! 	    if(vcode) {
! 		fprintf(STDERR,"Could not allocate an Id for the clone of the volume from the VLDB\n",vcode);
! 		error = vcode;
! 		goto rfail;
! 	    }
! 	    strcpy(vname, "readonly-clone-temp");
! 	    /* make a readonly clone of the volume to be released */
! 	    code = AFSVolClone(fromconn, fromtid, 0,readonlyVolume, vname, &newVol);
! 	    if (code){
! 		fprintf(STDERR,"Failed to clone the rw volume %u\n",afromvol); 
! 		error = code;
! 		goto rfail;
! 	    }
! 	    code = AFSVolEndTrans(fromconn, fromtid, &rcode);
! 	    fromtid = 0;
! 	    if (!code) code = rcode;
! 	    if (code){
! 		fprintf(STDERR,"Failed to end the transaction on the rw volume  %u\n",afromvol);
! 		error = code;
! 		goto rfail;
! 	    }
  	}
  	/* record the clone id and intent to release*/
  	entry.cloneId = newVol;
  	MapNetworkToHost(&entry,&storeEntry);
***************
*** 1524,1529 ****
--- 1633,1655 ----
  	    /* for every site which has the old release do */
  	    toserver = entry.serverNumber[i];
  	    topart = entry.serverPartition[i];
+ 
+ 	    if ((toserver == afromserver) && (topart == afrompart)) {
+ 		/* This case already handled by the clone itself */
+ 		entry.serverFlags[i] |= NEW_REPSITE;
+ 		entry.flags |= RO_EXISTS;
+ 		MapNetworkToHost(&entry, &storeEntry);
+ 		vcode = ubik_Call(VL_ReplaceEntry, cstruct, 0, afromvol,
+ 				  RWVOL, &storeEntry, 0);
+ 		if(vcode) {
+ 		    fprintf(STDERR," Could not update entry for volume %u \n",
+ 			    afromvol);
+ 		    error = vcode;
+ 		    goto rfail;
+ 		}
+ 		continue;
+ 	    }
+ 				  
  	    /* get connection to the replication site */
  	    toconn =  UV_Bind(toserver,AFSCONF_VOLUMEPORT);
  	    if (toconn == NULL){ /*server is down */
***************
*** 1712,1718 ****
  	}
  	error = VOLSERBADRELEASE;
      }
!     else {/* all the steps in release so far were successful */
  	/* delete the release clone */
  	
  	if(verbose) 
--- 1838,1844 ----
  	}
  	error = VOLSERBADRELEASE;
      }
!     else if (!cloneisreadonly) {	/* all the steps were successful */
  	/* delete the release clone */
  	
  	if(verbose) 
***************
*** 1734,1740 ****
  	fromtid = 0;
  	if(!code) code = rcode;
  	if(code){
! 	    fprintf(STDERR,"Could not transaction on the releaseClone %u\n",newVol);
  	    error = code;
  	    goto rfail;
  	}
--- 1860,1866 ----
  	fromtid = 0;
  	if(!code) code = rcode;
  	if(code){
! 	    fprintf(STDERR,"Could not end transaction on the releaseClone %u\n",newVol);
  	    error = code;
  	    goto rfail;
  	}


I don't know how to do this one cleanly... We have a BSD 4.3 kernel with
modifications from U. of Wisconsin to support NFS.  Adding NFS gave us
an include file structure similar to Sun's.  I have not yet checked the
NFS manuals, but I believe their integrations with 4.3 yield a similar
include file structure.  Anyway, we are just demonstrating with this
patch that a problem does exist and that a solution may need to be
found.  We are not suggesting you take this patch wholesale...

RCS file: ./login/RCS/login.c,v
retrieving revision 1.10
diff -c -r1.10 ./login/login.c
*** /tmp/,RCSt1009857	Sat Mar 31 03:44:39 1990
--- ./login/login.c	Thu Mar 29 20:15:31 1990
***************
*** 1,4 ****
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/login/RCS/login.c,v 1.10 90/01/25 18:43:59 hines Exp $ */
  
  /*
   * Notes:
--- 1,4 ----
! /* $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/login/RCS/login.c,v 1.10.1.1 90/03/29 20:14:57 probe Exp $ */
  
  /*
   * Notes:
***************
*** 57,63 ****
  #include <afs/param.h>
  #include <sys/param.h>
  #ifndef AIX
! #ifdef sun
  #include <ufs/quota.h>
  #else
  #include <sys/quota.h>
--- 57,63 ----
  #include <afs/param.h>
  #include <sys/param.h>
  #ifndef AIX
! #if defined(sun) || (defined(AFS_ATHENA_STDENV) && !defined(ultrix))
  #include <ufs/quota.h>
  #else
  #include <sys/quota.h>


-lkrb is needed if AFS_ATHENA_STDENV is defined.  I don't know a clean
way to do this one.

RCS file: ./ptserver/RCS/Makefile,v
retrieving revision 1.28
diff -c -r1.28 ./ptserver/Makefile
*** /tmp/,RCSt1009883	Sat Mar 31 03:45:31 1990
--- ./ptserver/Makefile	Tue Mar 27 02:12:09 1990
***************
*** 1,4 ****
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/ptserver/RCS/Makefile,v 1.28 90/02/14 13:21:59 hines Exp $ 
  
  #/* Copyright (C) 1989 Transarc Corporation - All rights reserved */
  #
--- 1,4 ----
! # $Header: /afs/athena.mit.edu/astaff/project/afsdev/sandbox/bld.beta2/src/ptserver/RCS/Makefile,v 1.28.1.3 90/03/27 02:11:49 probe Exp $ 
  
  #/* Copyright (C) 1989 Transarc Corporation - All rights reserved */
  #
***************
*** 21,27 ****
  RXGEN=${SRCDIR}bin/rxgen
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! OPTFLAG = -g
  CFLAGS = $(OPTFLAG) -I${SRCDIR}include
  INCLS=${SRCDIR}include/ubik.h \
  	${SRCDIR}include/lock.h  \
--- 21,27 ----
  RXGEN=${SRCDIR}bin/rxgen
  COMPILE_ET = ${SRCDIR}bin/compile_et
  
! OPTFLAG = -O
  CFLAGS = $(OPTFLAG) -I${SRCDIR}include
  INCLS=${SRCDIR}include/ubik.h \
  	${SRCDIR}include/lock.h  \
***************
*** 54,60 ****
  	rm -f pts readgroup readpwd db_verify testpt pterror.h pterror.c core 
  
  ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS)
! 	cc ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o  ptint.ss.o ptint.xdr.o utils.o $(LIBS)
  
  ptserver.o: ptserver.c ${INCLS}
  
--- 54,60 ----
  	rm -f pts readgroup readpwd db_verify testpt pterror.h pterror.c core 
  
  ptserver: ptserver.o ptutils.o ptprocs.o ptint.ss.o ptint.xdr.o utils.o $(LIBS)
! 	cc ${CFLAGS} -o ptserver ptserver.o ptutils.o ptprocs.o  ptint.ss.o ptint.xdr.o utils.o $(LIBS) -lkrb
  
  ptserver.o: ptserver.c ${INCLS}
  


Changed a reference of /usr/andy/ to ${SRCDIR}.  (Needed to have this
compile).

RCS file: inetd/RCS/Makefile,v
retrieving revision 1.6
diff -c -r1.6 inetd/Makefile
*** /tmp/,RCSt1010501	Sat Mar 31 06:13:05 1990
--- inetd/Makefile	Sat Mar 31 06:00:59 1990
***************
*** 1,6 ****
- INCLUDES = -I/usr/andy/include
  DEFINES = ${INCLUDES} 
  DESTDIR = /usr/andy/
  LIBDIR = ${DESTDIR}lib/
  AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a\
  		   ${LIBDIR}afs/libauth.a ${LIBDIR}afs/libsys.a \
--- 1,7 ----
  DEFINES = ${INCLUDES} 
  DESTDIR = /usr/andy/
+ SRCDIR = /usr/andy/
+ INCLUDES = -I${SRCDIR}include
  LIBDIR = ${DESTDIR}lib/
  AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a\
  		   ${LIBDIR}afs/libauth.a ${LIBDIR}afs/libsys.a \
***************
*** 10,16 ****
  LIBRES = 
  LIBS = ${AFSLIBS} ${LIBRES}
  OBJS = inetd.o setenv.o getenv.o
! CFLAGS = ${DEFINES} -g
  
  all : inetd ta-rauth.o
  
--- 11,17 ----
  LIBRES = 
  LIBS = ${AFSLIBS} ${LIBRES}
  OBJS = inetd.o setenv.o getenv.o
! CFLAGS = ${DEFINES} -O
  
  all : inetd ta-rauth.o
  



RCS file: rsh/RCS/Makefile,v
retrieving revision 1.9
diff -c -r1.9 rsh/Makefile
*** /tmp/,RCSt1010506	Sat Mar 31 06:13:10 1990
--- rsh/Makefile	Sat Mar 31 06:03:49 1990
***************
*** 17,30 ****
  # @(#)Makefile	5.1 (Berkeley) 9/20/88
  #
  
- INCLUDES= -I/usr/andy/include
- CFLAGS=	-g ${INCLUDES}
  LIBC=	/lib/libc.a
  SRCS=	rsh.c rcmd.c ../inetd/ta-rauth.c herror.c
  OBJS=   rsh.o rcmd.o ../inetd/ta-rauth.o herror.o
  MAN=	
  DESTDIR = /usr/andy/
  LIBDIR = ${DESTDIR}lib/
  AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a\
             ${LIBDIR}afs/libauth.a ${LIBDIR}afs/libsys.a \
             ${LIBDIR}librx.a ${LIBDIR}liblwp.a ${LIBDIR}librxkad.a\
--- 17,31 ----
  # @(#)Makefile	5.1 (Berkeley) 9/20/88
  #
  
  LIBC=	/lib/libc.a
  SRCS=	rsh.c rcmd.c ../inetd/ta-rauth.c herror.c
  OBJS=   rsh.o rcmd.o ../inetd/ta-rauth.o herror.o
  MAN=	
  DESTDIR = /usr/andy/
+ SRCDIR = /usr/andy/
  LIBDIR = ${DESTDIR}lib/
+ INCLUDES= -I${SRCDIR}include
+ CFLAGS=	-O ${INCLUDES}
  AFSLIBS =  ${LIBDIR}afs/libkauth.a ${LIBDIR}libubik.a\
             ${LIBDIR}afs/libauth.a ${LIBDIR}afs/libsys.a \
             ${LIBDIR}librx.a ${LIBDIR}liblwp.a ${LIBDIR}librxkad.a\
--[0163]--


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