[5447] in Athena Bugs

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

patches for attach for A/UX

daemon@ATHENA.MIT.EDU (vrt@ATHENA.MIT.EDU)
Sun Jul 8 16:10:58 1990

From: vrt@ATHENA.MIT.EDU
Date: Sun, 8 Jul 90 13:09:36 PDT
To: jfc@ATHENA.MIT.EDU, rel-eng@ATHENA.MIT.EDU, bugs@ATHENA.MIT.EDU

diff -rc /source/athena/bin.athena/attach/afs.c src/afs.c
*** /source/athena/bin.athena/attach/afs.c	Mon Nov 27 10:39:55 1989
--- src/afs.c	Sat Jun  9 18:08:26 1990
***************
*** 16,21
  #include <sys/wait.h>
  #include <sys/file.h>
  
  /*
   * Attach an afs filesystem (make a symlink)
   */

--- 16,24 -----
  #include <sys/wait.h>
  #include <sys/file.h>
  
+ #ifdef _AUX_SOURCE
+ #define vfork fork
+ #endif 
  /*
   * Attach an afs filesystem (make a symlink)
   */
diff -rc /source/athena/bin.athena/attach/attach.h src/attach.h
*** /source/athena/bin.athena/attach/attach.h	Wed Nov 15 22:41:14 1989
--- src/attach.h	Wed Jun  6 17:37:28 1990
***************
*** 22,27
  #ifdef NeXT
  #include <nfs/nfs_mount.h>	/* Newer versions of NFS (?) */
  #endif /* NeXT */
  #else /* !NFS */
  #include <netinet/in.h>
  #endif /* NFS */

--- 22,30 -----
  #ifdef NeXT
  #include <nfs/nfs_mount.h>	/* Newer versions of NFS (?) */
  #endif /* NeXT */
+ #ifdef _AUX_SOURCE
+ #include <nfs/mount.h>
+ #endif /* AUX */
  #else /* !NFS */
  #include <netinet/in.h>
  #endif /* NFS */
diff -rc /source/athena/bin.athena/attach/config.c src/config.c
*** /source/athena/bin.athena/attach/config.c	Wed Nov 15 22:41:52 1989
--- src/config.c	Fri Jun 29 14:28:25 1990
***************
*** 349,354
  
  char *re_comp();
  
  int nosetuid_filsys(name, type)
  	register char	*name;
  	int	type;

--- 349,382 -----
  
  char *re_comp();
  
+ #ifdef _AUX_SOURCE
+ static char *re = (char *) 0;
+ 
+ char *re_comp(s)
+ 	char *s;
+ {
+ 	if (!s) return ((char *)0);
+ 
+ 	if (re) free(re);
+ 
+ 	re = regcmp(s, (char *)0);
+ 	if (!re) return ("Bad argument to re_comp.");
+ 
+ 	return (0); /* Success! */
+ }
+ 
+ int re_exec(s)
+ 	char *s;
+ {
+ 	char *result = regex(re, s);
+ 
+ 	if (!result) return (0);
+ 
+ 	return (1);
+ }
+ #endif
+ 
+ 
  int nosetuid_filsys(name, type)
  	register char	*name;
  	int	type;
diff -rc /source/athena/bin.athena/attach/config.h src/config.h
*** /source/athena/bin.athena/attach/config.h	Thu Nov 16 08:03:10 1989
--- src/config.h	Fri Jun 15 21:07:48 1990
***************
*** 23,32
   * kerberos libraries.
   */
  #define NFS
! #define RVD
! #define AFS
! #define UFS
! #define ZEPHYR
  #define HESIOD
  #define KERBEROS
  /* #define OLD_KERBEROS */

--- 23,32 -----
   * kerberos libraries.
   */
  #define NFS
! /* #define RVD */
! #define AFS 
! #define UFS 
! #define ZEPHYR 
  #define HESIOD
  #define KERBEROS
  /* #define OLD_KERBEROS */
diff -rc /source/athena/bin.athena/attach/main.c src/main.c
*** /source/athena/bin.athena/attach/main.c	Thu Nov 16 00:05:54 1989
--- src/main.c	Wed Jun  6 17:34:44 1990
***************
*** 284,289
  	    continue;
  	}
  	gotname++;
  	if (cell_sw) {
  		afs_auth(argv[i], argv[i], AFSAUTH_DOAUTH | AFSAUTH_CELL);
  	} else if (filsysp) {

--- 283,289 -----
  	    continue;
  	}
  	gotname++;
+ #ifdef AFS
  	if (cell_sw) {
  		afs_auth(argv[i], argv[i], AFSAUTH_DOAUTH | AFSAUTH_CELL);
  	} else 
***************
*** 286,292
  	gotname++;
  	if (cell_sw) {
  		afs_auth(argv[i], argv[i], AFSAUTH_DOAUTH | AFSAUTH_CELL);
! 	} else if (filsysp) {
  	    /*
  	     * Lookup the specified filsys name and perform an nfsid
  	     * on the host associated with it.

--- 286,294 -----
  #ifdef AFS
  	if (cell_sw) {
  		afs_auth(argv[i], argv[i], AFSAUTH_DOAUTH | AFSAUTH_CELL);
! 	} else 
! #endif
! 	if (filsysp) {
  	    /*
  	     * Lookup the specified filsys name and perform an nfsid
  	     * on the host associated with it.
diff -rc /source/athena/bin.athena/attach/mount.c src/mount.c
*** /source/athena/bin.athena/attach/mount.c	Fri Jul 28 03:53:35 1989
--- src/mount.c	Thu Jun 21 13:34:20 1990
***************
*** 23,28
  #include <mntent.h>
  #endif
  #include <rpcsvc/mount.h>
  
  extern int sys_nerr;
  extern char *sys_errlist[];

--- 23,31 -----
  #include <mntent.h>
  #endif
  #include <rpcsvc/mount.h>
+ #ifdef _AUX_SOURCE
+ #define mount fsmount
+ #endif
  
  extern int sys_nerr;
  extern char *sys_errlist[];
***************
*** 141,146
  		return (FAILURE);
  	}
      
  	client->cl_auth = spoofunix_create_default(spoofhost);
  
  	timeout.tv_usec = 0;

--- 144,150 -----
  		return (FAILURE);
  	}
      
+ 	setreuid(geteuid(),getuid());
  	client->cl_auth = spoofunix_create_default(spoofhost);
  	setreuid(geteuid(),getuid());
  
***************
*** 142,147
  	}
      
  	client->cl_auth = spoofunix_create_default(spoofhost);
  
  	timeout.tv_usec = 0;
  	timeout.tv_sec = 20;

--- 146,152 -----
      
  	setreuid(geteuid(),getuid());
  	client->cl_auth = spoofunix_create_default(spoofhost);
+ 	setreuid(geteuid(),getuid());
  
  	timeout.tv_usec = 0;
  	timeout.tv_sec = 20;
diff -rc /source/athena/bin.athena/attach/ufs.c src/ufs.c
*** /source/athena/bin.athena/attach/ufs.c	Mon Jul 31 02:31:20 1989
--- src/ufs.c	Wed Jun  6 17:59:16 1990
***************
*** 15,20
  #include <sys/wait.h>
  #include <sys/file.h>
  
  #ifdef UFS
  /*
   * Attach an Unix filesystem

--- 15,24 -----
  #include <sys/wait.h>
  #include <sys/file.h>
  
+ #ifdef _AUX_SOURCE
+ #define vfork fork
+ #endif
+ 
  #ifdef UFS
  /*
   * Attach an Unix filesystem
Only in src: ufs.o
Only in src: unmount.o
diff -rc /source/athena/bin.athena/attach/util.c src/util.c
*** /source/athena/bin.athena/attach/util.c	Thu Nov 16 00:22:25 1989
--- src/util.c	Tue Jun 19 16:19:04 1990
***************
*** 28,34
  
  char exp_hesline[BUFSIZ];	/* Place to store explicit */
  char *exp_hesptr[2];		/* ``hesiod'' entry */
! char *abort_msg = "Operation aborted\n";
  
  static missarg();
  

--- 28,34 -----
  
  char exp_hesline[BUFSIZ];	/* Place to store explicit */
  char *exp_hesptr[2];		/* ``hesiod'' entry */
! /* char *abort_msg = "Operation aborted\n"; */
  
  static missarg();
  

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