[1622] in Kerberos-V5-bugs

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

[Wayne Schroeder: Kerberos Mods from SDSC (2 of 2)]

daemon@ATHENA.MIT.EDU (Theodore Ts'o)
Sat Sep 9 00:04:21 1995

Date: Sat, 9 Sep 1995 00:03:58 -0400
From: Theodore Ts'o <tytso@MIT.EDU>
To: krb5-bugs@MIT.EDU



------- Forwarded Message

00632; Thu, 7 Sep 1995 16:43:51 -0700
From: Wayne Schroeder <schroede@SDSC.EDU>
Date: Thu, 7 Sep 95 16:43:50 PDT
To: tytso@MIT.EDU
Cc: schroede@franklin.sdsc.edu
Subject: Kerberos Mods from SDSC (2 of 2)

===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/krcp.c,v
retrieving revision 1.1
diff -c -r1.1 krcp.c
*** 1.1	1995/01/14 00:24:06
--- krcp.c	1995/07/18 20:18:10
***************
*** 77,83 ****
  #ifdef BUFSIZ
  #undef BUFSIZ
  #endif
! #define BUFSIZ 4096
       
  int sock;
  struct sockaddr_in foreign;	   /* set up by kcmd used by send_auth */
--- 77,88 ----
  #ifdef BUFSIZ
  #undef BUFSIZ
  #endif
! 
! /* BUFSIZ was increased to 16K since the roundup of fstat st_blksize for
!    the file system can be large (which is used for dynamic allocation).
!    st_blksize for some file systems is 8 or 16K.
!    I.e. des_inbuf is only 2*BUFSIZ but bp->buf can be about 16K  */
! #define BUFSIZ 16384
       
  int sock;
  struct sockaddr_in foreign;	   /* set up by kcmd used by send_auth */
***************
*** 97,103 ****
--- 102,112 ----
  void	send_auth(), answer_auth();
  int	encryptflag = 0;
  
+ #ifdef sgi
+ #define	UCB_RCP	"/usr/bsd/rcp"
+ #else
  #define	UCB_RCP	"/bin/rcp"
+ #endif
  
  #ifdef CRAY
  #ifndef BITS64
***************
*** 1106,1112 ****
  
  
  
! #ifdef unicos61
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
--- 1115,1121 ----
  
  
  
! #ifdef _UNICOS
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
***************
*** 1264,1272 ****
      krb5_error_code status;
      extern krb5_flags krb5_kdc_default_options;
      
-     
      memset ((char*)&creds, 0, sizeof(creds));
!     
      if (status = krb5_read_message((krb5_pointer) &rem, &pname_data)) {
  	exit(1);
      }
--- 1273,1280 ----
      krb5_error_code status;
      extern krb5_flags krb5_kdc_default_options;
      
      memset ((char*)&creds, 0, sizeof(creds));
! 
      if (status = krb5_read_message((krb5_pointer) &rem, &pname_data)) {
  	exit(1);
      }
***************
*** 1312,1318 ****
--- 1320,1331 ----
  	krb5_cc_close(cc);
  	exit(1);
      }
+ /*
+ Commented out, SDSC, 5/22, 
+ Why would one want to remove the ticket file, especially when nothing
+ goes wrong?  
      krb5_cc_destroy(cc);
+ */
      krb5_cc_close(cc);
      status = krb5_write_message((krb5_pointer) &rem, &msg);
      krb5_xfree(msg.data);
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/krlogin.c,v
retrieving revision 1.1
diff -c -r1.1 krlogin.c
*** 1.1	1995/01/14 00:24:07
--- krlogin.c	1995/07/18 20:18:45
***************
*** 119,127 ****
  
  
  #ifdef POSIX_TERMIOS
- #ifdef CRAY
- #include <sys/ttold.h>
- #endif
  #else /* !POSIX_TERMIOS */
  #include <sgtty.h>
  #endif /* POSIX_TERMIOS */
--- 123,128 ----
***************
*** 216,228 ****
      unsigned short ws_xpixel, ws_ypixel;
  };
  #endif /* NO_WINSIZE */
  struct	winsize winsize;
  krb5_sigtype	sigwinch(), oob();
  char	*host=0;			/* external, so it can be
  					   reached from confirm_death() */
  
- 
- 
  /*
   * The following routine provides compatibility (such as it is)
   * between 4.2BSD Suns and others.  Suns have only a `ttysize',
--- 217,238 ----
      unsigned short ws_xpixel, ws_ypixel;
  };
  #endif /* NO_WINSIZE */
+ 
+ #ifdef CRAY
+ /* window size structure as it is transfered on the network */
+ struct net_winsize {
+     unsigned ws_row:16;
+     unsigned ws_col:16;
+     unsigned ws_xpixel:16;
+     unsigned ws_ypixel:16;
+   };
+ #endif
+ 
  struct	winsize winsize;
  krb5_sigtype	sigwinch(), oob();
  char	*host=0;			/* external, so it can be
  					   reached from confirm_death() */
  
  /*
   * The following routine provides compatibility (such as it is)
   * between 4.2BSD Suns and others.  Suns have only a `ttysize',
***************
*** 525,531 ****
      sigprocmask(SIG_BLOCK, &urgmask, oldmask);
  #else
  #ifdef sgi
!     oldmask = sigignore(sigmask(SIGURG) | sigmask(SIGUSR1));
  #else
      oldmask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1));
  #endif
--- 535,542 ----
      sigprocmask(SIG_BLOCK, &urgmask, oldmask);
  #else
  #ifdef sgi
! /*  oldmask = sigignore(sigmask(SIGURG) | sigmask(SIGUSR1)); */
!     oldmask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1));
  #else
      oldmask = sigblock(sigmask(SIGURG) | sigmask(SIGUSR1));
  #endif
***************
*** 777,782 ****
--- 788,802 ----
       * the reader.  Set a trap that simply copies such signals to
       * the child.
       */
+ #if defined(HAVE_SETOWN) && defined(sgi)
+ /*
+   don't know why I can't get the child to receive the SIGURG signals
+   directly but with this added call I can get the window size (OOB data)
+   to at least work.
+ */
+     (void) fcntl(rem, F_SETOWN, getpid());  /* necessary on SGIs */
+ #endif
+ 
      (void) signal(SIGURG, copytochild);
      (void) signal(SIGUSR1, writeroob);
  
***************
*** 1093,1101 ****
   */
  sendwindow()
  {
      char obuf[4 + sizeof (struct winsize)];
      struct winsize *wp = (struct winsize *)(obuf+4);
!     
      obuf[0] = 0377;
      obuf[1] = 0377;
      obuf[2] = 's';
--- 1113,1136 ----
   */
  sendwindow()
  {
+ #ifdef CRAY
+     char obuf[4 + sizeof (struct net_winsize)];
+     struct net_winsize wp;
+ 
+     obuf[0] = 0377;
+     obuf[1] = 0377;
+     obuf[2] = 's';
+     obuf[3] = 's';
+     wp.ws_row = htons(winsize.ws_row);
+     wp.ws_col = htons(winsize.ws_col);
+     wp.ws_xpixel = htons(winsize.ws_xpixel);
+     wp.ws_ypixel = htons(winsize.ws_ypixel);
+     bcopy((char *)&wp, (char *)&obuf[4], sizeof(wp));
+     (void) des_write(rem, obuf, sizeof(obuf));
+ #else
      char obuf[4 + sizeof (struct winsize)];
      struct winsize *wp = (struct winsize *)(obuf+4);
! 
      obuf[0] = 0377;
      obuf[1] = 0377;
      obuf[2] = 's';
***************
*** 1105,1110 ****
--- 1140,1147 ----
      wp->ws_xpixel = htons(winsize.ws_xpixel);
      wp->ws_ypixel = htons(winsize.ws_ypixel);
      (void) des_write(rem, obuf, sizeof(obuf));
+ #endif
+     
  }
  
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/krlogind.c,v
retrieving revision 1.1
diff -c -r1.1 krlogind.c
*** 1.1	1995/01/14 00:24:07
--- krlogind.c	1995/07/18 20:19:47
***************
*** 97,102 ****
--- 97,104 ----
   *
   * #define KERBEROS
   */
+ #define LOG_ALL_LOGINS
+ #define LOG_OTHER_USERS
  #define LOG_REMOTE_REALM
  #define CRYPT
  
***************
*** 159,164 ****
--- 161,175 ----
  #include <string.h>
  #include <sys/param.h>
  #include <utmp.h>
+ 
+ #ifdef CRAY
+ #include <initreq.h>
+ char *gen_id = "fe";   /* generic id to use in inittab */
+ int npty;
+ void utmp_sig_reset();
+   /* definitions for cleaning up TMPDIR directory: */
+ #include <tmpdir.h>  
+ #endif
       
  #ifdef HAVE_SYS_TTY_H
  #include <sys/tty.h>
***************
*** 193,199 ****
      unsigned short ws_xpixel, ws_ypixel;
  };
  #endif /* NO_WINSIZE */
!      
  #ifndef roundup
  #define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
  #endif
--- 204,210 ----
      unsigned short ws_xpixel, ws_ypixel;
  };
  #endif /* NO_WINSIZE */
! 
  #ifndef roundup
  #define roundup(x,y) ((((x)+(y)-1)/(y))*(y))
  #endif
***************
*** 304,309 ****
--- 315,329 ----
  int must_pass_rhosts = 0, must_pass_k5 = 0, must_pass_one = 0;
  int do_encrypt = 0, passwd_if_fail = 0, passwd_req = 0;
  
+ 
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+ #define DEBUG_MARK(tag1,tag2) syslog(	LOG_ERR,			\
+ 					"DEBUG %s:%d %s%s",		\
+ 					__FILE__, __LINE__, tag1, tag2)
+ #else /* +__DEBUG- */
+ #define DEBUG_MARK(tag1,tag2)
+ #endif	/* -__DEBUG. */
+ 
  main(argc, argv)
       int argc;
       char **argv;
***************
*** 317,328 ****
      int fd;
      
      progname = *argv;
!     
  #ifdef KERBEROS
      
  #ifndef LOG_NDELAY
  #define LOG_NDELAY 0
  #endif
      
      
  #ifndef LOG_AUTH /* 4.2 syslog */
--- 337,359 ----
      int fd;
      
      progname = *argv;
! 
  #ifdef KERBEROS
      
  #ifndef LOG_NDELAY
  #define LOG_NDELAY 0
  #endif
+ 
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+     {
+         struct stat st;
+ 
+         if ( stat( "/tmp/debug_krlogind", &st ) == 0 ) {
+             DEBUG_MARK("Sleeping awaiting attach by debugger","");
+ 	    sleep(60);
+         }
+     }
+ #endif	/* +__DEBUG. */
      
      
  #ifndef LOG_AUTH /* 4.2 syslog */
***************
*** 478,486 ****
  #endif
  
  int	child;
! int	cleanup();
  int	netf;
  char	line[MAXPATHLEN];
  extern	char	*inet_ntoa();
  
  #ifdef TIOCSWINSZ
--- 509,520 ----
  #endif
  
  int	child;
! RETSIGTYPE cleanup();
  int	netf;
  char	line[MAXPATHLEN];
+ #ifdef sgi
+ char *linex;
+ #endif
  extern	char	*inet_ntoa();
  
  #ifdef TIOCSWINSZ
***************
*** 498,503 ****
--- 532,547 ----
      char c;
      char buferror[255];
      struct passwd *pwd;
+ 
+ #if defined(CRAY)  /* CRI based code */
+     struct termio b;
+     char wtmpf[] = "/etc/wtmp";
+ #endif
+ 
+ #if defined(sgi) 
+     struct termio b;
+     char wtmpf[] = "/usr/adm/wtmp";
+ #endif
      
      netf = -1;
      alarm(60);
***************
*** 556,568 ****
  #endif
      
      write(f, "", 1);
      if (getpty(&p,line))
        fatal(f, "Out of ptys");
      Pfd = p;
  #ifdef TIOCSWINSZ
      (void) ioctl(p, TIOCSWINSZ, &win);
  #endif
!     
  #ifndef sysvimp  /* IMP has a problem with opening and closing
  		    it's stream pty by the parent process */
      
--- 600,618 ----
  #endif
      
      write(f, "", 1);
+ #ifndef sgi
      if (getpty(&p,line))
        fatal(f, "Out of ptys");
+ #else
+     if (! (linex = _getpty(&p, O_RDWR, 0600, 0)) )
+     fatal(f, "Out of ptys");
+     strcpy(line,linex);
+ #endif
      Pfd = p;
  #ifdef TIOCSWINSZ
      (void) ioctl(p, TIOCSWINSZ, &win);
  #endif
! 
  #ifndef sysvimp  /* IMP has a problem with opening and closing
  		    it's stream pty by the parent process */
      
***************
*** 590,600 ****
      }
  #endif 
  #endif /* VHANG_FIRST */
! #if defined (sun) || defined (POSIX)
      setsid();
  #endif
  
      t = open(line, O_RDWR);
  #ifdef VHANG_FIRST
  #ifndef VHANG_NO_CLOSE
  	(void) close(vfd);
--- 640,653 ----
      }
  #endif 
  #endif /* VHANG_FIRST */
! #if defined (sun) || defined (POSIX) || defined (sgi)
      setsid();
  #endif
  
      t = open(line, O_RDWR);
+ 
+     DEBUG_MARK("opened tty, line=", line );
+ 
  #ifdef VHANG_FIRST
  #ifndef VHANG_NO_CLOSE
  	(void) close(vfd);
***************
*** 688,693 ****
--- 741,751 ----
  	    /* new_termio.c_oflag = 0; */
  	    new_termio.c_cc[VMIN] = 1;
  	    new_termio.c_cc[VTIME] = 0;
+ #ifdef CRAY
+             new_termio.c_cc[VEOF] = CEOF;  
+                /* Cray needs EOF char set to default ^d
+                 (otherwise it is ^a for some reason) */
+ #endif
  	    tcsetattr(t,TCSANOW,&new_termio);
  #else
  	    (void)ioctl(t, TIOCGETP, &b);
***************
*** 716,721 ****
--- 774,791 ----
  	    (void) write(t, &c, 1);
  	    
  	}
+ #ifdef CRAY
+ /* 
+   this code (slightly modified) was copied from the kerberos telnetd
+   sys_term.c login_tty routine.  Seems to be needed on the Cray
+   when not using 'init' to start up login. 
+ */
+         if (setsid() < 0) {
+                         fatalperror(f, "setsid()");
+         }
+         if (ioctl(t, TCSETCTTY, (char *)0) < 0)
+                 fatalperror(f, "ioctl(sctty)");
+ #endif
  	close(f), close(p);
  	dup2(t, 0), dup2(t, 1), dup2(t, 2);
  	if (t > 2)
***************
*** 767,772 ****
--- 837,851 ----
  #ifdef DO_NOT_USE_K_LOGIN
  	execl(LOGIN_PROGRAM, "login", "-r", rhost_name, 0);
  #else
+ 
+ 	DEBUG_MARK("execl(u,v,w,x,y,z) u=", LOGIN_PROGRAM );
+ 	DEBUG_MARK("execl(u,v,w,x,y,z) v=", "login" );
+ 	DEBUG_MARK("execl(u,v,w,x,y,z) w=", "-h" );
+ 	DEBUG_MARK("execl(u,v,w,x,y,z) x=", rhost_name );
+ 	if (!passwd_req)DEBUG_MARK("execl(u,v,w,x,y,z) y=", "-e" );
+ 	else		DEBUG_MARK("execl(u,v,w,x,y,z) y=", "" );
+ 	DEBUG_MARK("execl(u,v,w,x,y,z) z=", lusername );
+ 
  	if (passwd_req)
  	  execl(LOGIN_PROGRAM, "login","-h", rhost_name, lusername, 0);
  	else
***************
*** 776,781 ****
--- 855,900 ----
  	fatalperror(2, LOGIN_PROGRAM, errno);
  	/*NOTREACHED*/
      }
+ #if defined(CRAY) || defined(sgi)
+ /* on the Cray and SGIs, need to write UTMP. 
+    This code is a modified version from telnetd's sys_term.c */
+ #define SCPYN(a, b)     (void) strncpy(a, b, sizeof(a))
+                 /*
+                  * Cray parent will create utmp entry for child and send
+                  * signal to child to tell when done.  Child waits for signal
+                  * before doing anything important.
+                  */
+                 setpgrp(0,0);
+ #ifdef CRAY
+                 utmp_sig_reset();               /* reset handler to default */
+ #endif
+                 /*
+                  * Create utmp entry for child
+                  */
+                 (void) time(&wtmp.ut_time);
+                 wtmp.ut_type = LOGIN_PROCESS;
+                 wtmp.ut_pid = pid;
+                 SCPYN(wtmp.ut_user, "LOGIN");
+ #ifndef NO_UT_HOST
+                 SCPYN(wtmp.ut_host, rhost_name);
+ #endif
+                 SCPYN(wtmp.ut_line, line + sizeof("/dev/") - 1);
+ #ifndef __hpux
+                 SCPYN(wtmp.ut_id, wtmp.ut_line+3);
+ #else
+                 SCPYN(wtmp.ut_id, wtmp.ut_line+7);
+ #endif
+                 pututline(&wtmp);
+                 endutent();
+                 if ((i = open(wtmpf, O_WRONLY|O_APPEND)) >= 0) {
+                         (void) write(i, (char *)&wtmp, sizeof(struct utmp));
+                         (void) close(i);
+                 }
+ 
+ #endif  /* CRAY */
      /*
       **      wait for child to start ... read one byte
       **      -- see the child, who writes one byte after
***************
*** 789,795 ****
  	sprintf(buferror, "Cannot read slave pty %s ",line);
  	fatalperror(p,buferror,errno);
      }
!     
  #if defined(KERBEROS) 
      if (do_encrypt) {
  	if (((*des_write)(f, SECURE_MESSAGE, sizeof(SECURE_MESSAGE))) < 0){
--- 908,914 ----
  	sprintf(buferror, "Cannot read slave pty %s ",line);
  	fatalperror(p,buferror,errno);
      }
! 
  #if defined(KERBEROS) 
      if (do_encrypt) {
  	if (((*des_write)(f, SECURE_MESSAGE, sizeof(SECURE_MESSAGE))) < 0){
***************
*** 864,869 ****
--- 983,1014 ----
      struct winsize w;
      int pgrp;
      
+ #ifdef _UNICOS  /* CRI based code */
+ /*  convert the byte stream to Cray format values */
+     struct {
+             unsigned ws_row:16;
+             unsigned ws_col:16;
+             unsigned ws_xpixel:16;
+             unsigned ws_ypixel:16;
+     } wn;
+  
+     if (n < 4+sizeof (wn) || cp[2] != 's' || cp[3] != 's')
+             return (0);
+ #ifdef TIOCSWINSZ
+     /*
+      * If we don't support window sizes in the kernel, then
+      * we will recognize, but ignore, window size changes.
+      */
+     oobdata[0] &= ~TIOCPKT_WINDOW;  /* we know he heard */
+     bcopy(cp+4, (char *)&wn, sizeof(wn));
+     w.ws_row = ntohs(wn.ws_row);
+     w.ws_col = ntohs(wn.ws_col);
+     w.ws_xpixel = ntohs(wn.ws_xpixel);
+     w.ws_ypixel = ntohs(wn.ws_ypixel);
+     (void)ioctl(pty, TIOCSWINSZ, &w);
+ #endif
+     return (4+sizeof (wn));
+ #else 
      if (n < 4+sizeof (w) || cp[2] != 's' || cp[3] != 's')
        return (0);
  #ifdef TIOCSWINSZ
***************
*** 878,883 ****
--- 1023,1029 ----
        (void) killpg(pgrp, SIGWINCH);
  #endif
      return (4+sizeof (w));
+ #endif
  }
  
  
***************
*** 953,960 ****
  		
  	      top:
  		for (cp = fibuf; cp < fibuf+fcc-1; cp++)
! 		  if (cp[0] == magic[0] &&
! 		      cp[1] == magic[1]) {
  		      left = fcc - (cp-fibuf);
  		      n = control(p, cp, left);
  		      if (n) {
--- 1099,1106 ----
  		
  	      top:
  		for (cp = fibuf; cp < fibuf+fcc-1; cp++)
! 		  if ( (unsigned char) cp[0] == magic[0] &&
! 		       (unsigned char) cp[1] == magic[1]) {
  		      left = fcc - (cp-fibuf);
  		      n = control(p, cp, left);
  		      if (n) {
***************
*** 1012,1029 ****
  
  
  
! int cleanup()
  {
      char *p;
!     
      /* 
        I dont know why P starts with the character '/', but apparently it
        has to do with the way login set line when the initial entry for this
        line is made.
        */
      p = line + sizeof("/dev/") -1 ;
      if (!logout(p)) {
! #ifdef SYSV
  	logwtmp(p, "", "", 0, 0);
  #else
  	logwtmp(p, "", "", 0);
--- 1158,1182 ----
  
  
  
! RETSIGTYPE cleanup()
  {
      char *p;
! #ifdef CRAY
!     char tpath[TPATHSIZ];
! #endif
      /* 
        I dont know why P starts with the character '/', but apparently it
        has to do with the way login set line when the initial entry for this
        line is made.
        */
      p = line + sizeof("/dev/") -1 ;
+ #ifdef CRAY
+     tpath[0]='\0';
+     if (!logout(p,tpath)) {
+ #else
      if (!logout(p)) {
! #endif
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  	logwtmp(p, "", "", 0, 0);
  #else
  	logwtmp(p, "", "", 0);
***************
*** 1045,1050 ****
--- 1198,1209 ----
      vhangup();
  #endif
      shutdown(netf, 2);
+ #ifdef CRAY
+   /* exec cleantmp to remove the TMPDIR directory.  In CRI's rlogin system,
+     this in done by init, whith rlogind communicates with. */
+     if (tpath[0]!='\0')
+       execl(CLEANTMPCMD, CLEANTMPCMD, lusername, tpath, 0);
+ #endif
      exit(1);
  }
  
***************
*** 1351,1356 ****
--- 1510,1521 ----
      char c;
      int i,ptynum;
      struct stat stb;
+ #ifdef CRAY  /* CRI based code */
+     int lowpty = 0, highpty;           /* ptys to try and open */
+     int p;
+     struct stat sb;
+     char myline[MAXPATHLEN];
+ #endif
  #ifdef STREAMS
  #ifdef sysvimp
      *fd = open("/dev/pty", O_RDWR|O_NDELAY);
***************
*** 1372,1377 ****
--- 1537,1544 ----
      return (0);
      
  #else /* NOT STREAMS */
+ 
+ #ifndef CRAY
      for (c = 'p'; c <= 's'; c++) {
  	sprintf(slave,"/dev/ptyXX");
  	slave[strlen("/dev/pty")] = c;
***************
*** 1385,1390 ****
--- 1552,1591 ----
  	      goto gotpty;
  	}
      }
+ #else  /* CRI based code */
+         highpty = getnpty();  /* in CRI version, this was done earlier and
+                                  adjustable via arguments */
+         for (npty=lowpty; npty<=highpty; npty++) {
+                 sprintf(myline,"/dev/pty/%03d", npty);
+                 *fd = open(myline, 2);
+                 if (*fd < 0)
+                         continue;
+                 sprintf(line, "/dev/ttyp%03d", npty);
+                 /*
+                  * Here are some shenanigans to make sure that there
+                  * are no listeners lurking on the line.
+                  */
+                 if (stat(line, &sb) < 0) {
+                         (void)close(*fd);
+                         continue;
+                 }
+                 if(sb.st_uid || sb.st_gid || sb.st_mode != 0600) {
+                         chown(line, 0, 0);
+                         chmod(line, 0600);
+                         (void)close(*fd);
+                         *fd = open(myline, 2);
+                         if (*fd < 0)
+                                 continue;
+                 }
+                 /*
+                  * Now it should be safe...check for accessability.
+                  */
+                 if (access(line, 6) == 0)
+                         goto gotpty;
+                 /* no tty side to pty so skip it */
+                 close(*fd);
+         }
+ #endif
      return(1);
    gotpty:
      slave[strlen("/dev/")] = 't';
***************
*** 1475,1481 ****
  	exit(1);
      }
  
! #ifdef unicos61
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
--- 1676,1682 ----
  	exit(1);
      }
  
! #ifdef _UNICOS
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
***************
*** 1726,1728 ****
--- 1927,1974 ----
  
  #endif /* KRB5_KRB4_COMPAT */
  #endif /* KERBEROS */
+ 
+ #ifdef  CRAY  /* CRI based code */
+ #include <sys/unistd.h>;
+  
+ /*
+  * getnpty()
+  *
+  * Return the number of pty's configured into the system.
+  */
+ getnpty()
+ {
+ #ifdef _SC_CRAY_NPTY
+         int     numptys;
+  
+         if ((numptys = sysconf(_SC_CRAY_NPTY)) != -1)
+                 return numptys;
+         else
+ #endif /* _SC_CRAY_NPTY */
+                 return 100;
+ }
+ 
+ void
+ utmp_sig_reset()
+ {
+ /*        (void) signal(SIGUSR1, func);   /* reset handler to default */
+ }
+ 
+ static int gotsigjob = 0;
+  
+         void
+ sigjob(sig)
+         int sig;
+ {
+         register int jid;
+         register struct jobtemp *jp;
+  
+         while ((jid = waitjob(NULL)) != -1) {
+                 if (jid == 0) {
+                         return;
+                 }
+                 gotsigjob++;
+         }
+ }
+ 
+ #endif /* CRAY */
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/krshd.c,v
retrieving revision 1.1
diff -c -r1.1 krshd.c
*** 1.1	1995/01/14 00:24:08
--- krshd.c	1995/06/12 21:20:45
***************
*** 84,89 ****
--- 84,97 ----
  #define LOG_REMOTE_REALM
  #define LOG_CMD
       
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+ #define DEBUG_MARK(tag1,tag2) syslog(	LOG_ERR,			\
+ 					"DEBUG %s:%d %s%s",		\
+ 					__FILE__, __LINE__, tag1, tag2)
+ #else	/* +__DEBUG- */
+ #define DEBUG_MARK(tag1,tag2)
+ #endif	/* -__DEBUG. */
+ 
  #include <sys/types.h>
  #include <sys/ioctl.h>
  #include <sys/param.h>
***************
*** 145,151 ****
  #include <sys/category.h>
  #include <netinet/ip.h>
  #include <sys/tfm.h>
! #include <sys/nal.h>
  #include <sys/secparm.h>
  #include <sys/usrv.h>
  #include <sys/utsname.h>
--- 153,159 ----
  #include <sys/category.h>
  #include <netinet/ip.h>
  #include <sys/tfm.h>
! #include <net/nal.h>
  #include <sys/secparm.h>
  #include <sys/usrv.h>
  #include <sys/utsname.h>
***************
*** 228,234 ****
--- 236,247 ----
      struct sockaddr_in from;
      extern int opterr, optind;
      extern char *optarg;
+ #if defined(_IBMR2)
+     char *options;
+     int ch;
+ #else
      char *options, ch;
+ #endif
      int i;
      int fd;
      int debug_port = 0;
***************
*** 236,242 ****
  #ifdef CRAY
      secflag = sysconf(_SC_CRAY_SECURE_SYS);
  #endif
!     
      progname = *argv;
      
  #ifndef LOG_ODELAY /* 4.2 syslog */
--- 249,255 ----
  #ifdef CRAY
      secflag = sysconf(_SC_CRAY_SECURE_SYS);
  #endif
! 
      progname = *argv;
      
  #ifndef LOG_ODELAY /* 4.2 syslog */
***************
*** 250,255 ****
--- 263,269 ----
      
      if (argc == 1) { /* Get parameters from program name. */
  	if (strlen(progname) > MAX_PROG_NAME) {
+ 	    DEBUG_MARK("Calling usage()", "");
  	    usage();
  	    exit(1);
  	}
***************
*** 265,270 ****
--- 279,285 ----
  	      break;
  	  }
  	if (options[0] == '\0') {
+ 	    DEBUG_MARK("Calling usage()", "");
  	    usage();
  	    exit(1);
  	}
***************
*** 272,278 ****
--- 287,297 ----
      
      /* Analyse parameters. */
      opterr = 0;
+ #if defined(CRAY) || defined(sgi)
+     while ((ch = getopt(argc, argv, ARGSTR)) != 0xff)
+ #else
      while ((ch = getopt(argc, argv, ARGSTR)) != EOF)
+ #endif
        switch (ch) {
  	case 'r':         
  	  must_pass_one = 1; /* If just 'r', any one check must succeed */
***************
*** 297,302 ****
--- 316,322 ----
  	  break;
  	case '?':
  	default:
+ 	  DEBUG_MARK("unknown command line option, Calling usage(), ch=", argv[optind]);
  	  usage();
  	  exit(1);
  	  break;
***************
*** 330,336 ****
--- 350,360 ----
  	    exit(2);
  	}
  	
+ #ifdef _UNICOS
+ 	if ((fd = accept(s, (struct sockaddr *) &from, &fromlen)) < 0) {
+ #else
  	if ((fd = accept(s, &from, &fromlen)) < 0) {
+ #endif
  	    fprintf(stderr, "Error in accept: %s\n", strerror(errno));
  	    exit(2);
  	}
***************
*** 381,387 ****
  #define TZENV   4
  #define TMPDIRENV 5
  char    *getenv();
- extern
  #else
  {homedir, shell, path, username, term, 0};
  #endif /* CRAY */
--- 405,410 ----
***************
*** 392,398 ****
  #define TZENV   4
  #define TMPDIRENV 5
  char    *getenv();
- extern
  #else
  {homedir, shell, path, username, term, 0};
  #endif /* CRAY */
--- 415,420 ----
***************
*** 465,471 ****
--- 487,498 ----
      static int      jid;
      int error();
      int paddr;
+ /* this was:
      struct  nal nal;
+  but to get it to compile, I changed it to the following, don't
+ know if this is correct but is OK for SDSC since we do not run
+ secure mode */
+     struct  nal_v1 nal;
      int     nal_error;
      struct usrv usrv;
      struct  sysv sysv;
***************
*** 549,555 ****
  	    syslog(LOG_ERR, "cannot get ip packet level\n");
  	    exit(1);
  	}
! 	if(secflag == TFM_UDB_5) {
  	    if(setucmp(packet_compart, C_PROC) != 0) {
  		error("Unable to setucmp.\n");
  		exit(1);
--- 576,586 ----
  	    syslog(LOG_ERR, "cannot get ip packet level\n");
  	    exit(1);
  	}
! /* The following check use to be on TFM_UDB_5 which no longer exists,
!    I believe that checking on TFM_UDB_6 is correct but since
!    SDSC is not running Secure Unicos, I am not sure (and it
!    doesn't matter to us).  Wayne Schroeder */
! 	if(secflag == TFM_UDB_6) {
  	    if(setucmp(packet_compart, C_PROC) != 0) {
  		error("Unable to setucmp.\n");
  		exit(1);
***************
*** 625,630 ****
--- 656,662 ----
      peeraddr.length = SIZEOF_INADDR;
      peeraddr.contents = (krb5_octet *)&fromp->sin_addr;
  
+     DEBUG_MARK("reached this point (1)", "");
  
  #ifdef KERBEROS
      if (status = recvauth(f, fromaddr, peeraddr)) {
***************
*** 643,648 ****
--- 675,683 ----
  	/*
  	 *      check network authorization list
  	 */
+ /*  Can't find this routine (probably old), so commenting out;
+     not needed at SDSC */
+ #ifdef NOT_DEFINED 
  	if (fetchnal(paddr,&nal) < 0) {
  	    /*
  	     *      NAL file inaccessible, abort connection.
***************
*** 650,658 ****
--- 685,695 ----
  	    error("Permission denied.\n");
  	    exit(1);
  	}
+ #endif
      }
  #endif /* CRAY */
      
+     DEBUG_MARK("reached this point (2)", "");
      pwd = getpwnam(locuser);
      if (pwd == (struct passwd *) 0 ) {
  	syslog(LOG_ERR ,
***************
*** 753,759 ****
      if (port) {
  	/* Place entry into wtmp */
  	sprintf(ttyn,"krsh%1d",getpid());
! #ifdef SYSV
  	logwtmp(ttyn,locuser,hostname,1,1); /*Leave wtmp open*/
  #else
  	logwtmp(ttyn,locuser,hostname,1);  /*Leave wtmp open*/
--- 790,796 ----
      if (port) {
  	/* Place entry into wtmp */
  	sprintf(ttyn,"krsh%1d",getpid());
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  	logwtmp(ttyn,locuser,hostname,1,1); /*Leave wtmp open*/
  #else
  	logwtmp(ttyn,locuser,hostname,1);  /*Leave wtmp open*/
***************
*** 764,770 ****
  	    Syslog should have the information as to what was exec'd */
      else {
  	sprintf(ttyn,"kexe%1d",getpid());
! #ifdef SYSV
  	logwtmp(ttyn,locuser,hostname,1,1);  /* Leave open wtmp */
  #else
  	logwtmp(ttyn,locuser,hostname,1);       /* Leave open wtmp */
--- 801,807 ----
  	    Syslog should have the information as to what was exec'd */
      else {
  	sprintf(ttyn,"kexe%1d",getpid());
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  	logwtmp(ttyn,locuser,hostname,1,1);  /* Leave open wtmp */
  #else
  	logwtmp(ttyn,locuser,hostname,1);       /* Leave open wtmp */
***************
*** 870,876 ****
  	       *      true, then even an unclassified user is
  	       *      not allowed.
  	       */
! 	      if (!EXEMPT_NAL)
  		nal_error++;
  	      else {
  		  usrv.sv_minlvl = 0;
--- 907,920 ----
  	       *      true, then even an unclassified user is
  	       *      not allowed.
  	       */
! /*	      if (!EXEMPT_NAL) */
! 	      if (TRUE)  /* Again, for SDSC just to get it to compile;
!                             EXEMPT_NAL is not defined under UNICOS 8.0
!                             don't know what current check should be;
!                             not used at SDSC; setting to error as
!                             the safest choice for secure sites who might
!                             use this.
!                          */
  		nal_error++;
  	      else {
  		  usrv.sv_minlvl = 0;
***************
*** 888,894 ****
  #undef  MIN
  #undef  MAX
  	/* Before the setusrv is done then do a sethost for paddr */
! 	sethost(paddr);
  	
  	if (setusrv(&usrv) == -1) {
  	    loglogin(hostname, SLG_LVERR, ue->ue_logfails,ue);
--- 932,938 ----
  #undef  MIN
  #undef  MAX
  	/* Before the setusrv is done then do a sethost for paddr */
! /*	sethost(paddr);  Can't find this routine, so commenting out, SDSC */
  	
  	if (setusrv(&usrv) == -1) {
  	    loglogin(hostname, SLG_LVERR, ue->ue_logfails,ue);
***************
*** 1073,1079 ****
  		   "Shell process completed.");
  #endif
  	    /* Finish session in wmtp */
! #ifdef SYSV
  	    logwtmp(ttyn,"","",0,0); /* Close wtmp */
  #else
  	    logwtmp(ttyn,"","",0);   /* Close wtmp */
--- 1117,1123 ----
  		   "Shell process completed.");
  #endif
  	    /* Finish session in wmtp */
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  	    logwtmp(ttyn,"","",0,0); /* Close wtmp */
  #else
  	    logwtmp(ttyn,"","",0);   /* Close wtmp */
***************
*** 1090,1096 ****
  	    as kexe(pid), then finish out the session right after that.
  	    Syslog should have the information as to what was exec'd */
      else {
! #ifdef SYSV
  	logwtmp(ttyn,"","",0,0);		/* Close wtmp */
  #else
  	logwtmp(ttyn,"","",0);	 /* Close wtmp */
--- 1134,1140 ----
  	    as kexe(pid), then finish out the session right after that.
  	    Syslog should have the information as to what was exec'd */
      else {
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  	logwtmp(ttyn,"","",0,0);		/* Close wtmp */
  #else
  	logwtmp(ttyn,"","",0);	 /* Close wtmp */
***************
*** 1118,1130 ****
      else
        cp = pwd->pw_shell;
      
      execl(pwd->pw_shell, cp, "-c", cmdbuf, 0);
      perror(pwd->pw_shell);
      perror(cp);
      exit(1);
      
    signout_please:
! #ifdef SYSV
      logwtmp(ttyn,"","",0,0);                /* Close wtmp */
  #else
      logwtmp(ttyn,"","",0);   /* Close wtmp */
--- 1162,1179 ----
      else
        cp = pwd->pw_shell;
      
+     DEBUG_MARK("execl(w,x,y,z) w=", pwd->pw_shell);
+     DEBUG_MARK("execl(w,x,y,z) x=", cp);
+     DEBUG_MARK("execl(w,x,y,z) y=", "-c");
+     DEBUG_MARK("execl(w,x,y,z) z=", cmdbuf);
+ 
      execl(pwd->pw_shell, cp, "-c", cmdbuf, 0);
      perror(pwd->pw_shell);
      perror(cp);
      exit(1);
      
    signout_please:
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
      logwtmp(ttyn,"","",0,0);                /* Close wtmp */
  #else
      logwtmp(ttyn,"","",0);   /* Close wtmp */
***************
*** 1182,1188 ****
      killpg(pid, SIGTERM);
      wait(0);
      
! #ifdef SYSV
      logwtmp(ttyn,"","",0,0); /* Close wtmp */
  #else
      logwtmp(ttyn,"","",0);   /* Close wtmp */
--- 1231,1237 ----
      killpg(pid, SIGTERM);
      wait(0);
      
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
      logwtmp(ttyn,"","",0,0); /* Close wtmp */
  #else
      logwtmp(ttyn,"","",0);   /* Close wtmp */
***************
*** 1435,1441 ****
  	    exit(1);
      }
  	
! #ifdef unicos61
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
--- 1484,1492 ----
  	    exit(1);
      }
  	
!     DEBUG_MARK("reached this point (3)", "");
! 
! #ifdef _UNICOS
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
***************
*** 1448,1453 ****
--- 1499,1506 ----
  	    exit(1);
      }
  
+     DEBUG_MARK("reached this point (4)", "");
+ 
      strcpy(v4_instance, "*");
  
      status = krb5_compat_recvauth(&netf,
***************
*** 1477,1482 ****
--- 1530,1537 ----
  				  
  				  &v4_kdata, 0, v4_version);
  
+     DEBUG_MARK("reached this point (5)", "");
+ 
      if (status) {
  	if (auth_sys == KRB5_RECVAUTH_V5) {
  	    /*
***************
*** 1489,1494 ****
--- 1544,1551 ----
  	return status;
      }
  
+     DEBUG_MARK("reached this point (6)", "");
+ 
      getstr(netf, locuser, sizeof(locuser), "locuser");
      getstr(netf, cmdbuf, sizeof(cmdbuf), "command");
  
***************
*** 1509,1514 ****
--- 1566,1573 ----
  	return 0;
      }
  
+     DEBUG_MARK("reached this point (7)", "");
+ 
      /* Must be V5  */
  	
      getstr(netf, remuser, sizeof(locuser), "remuser");
***************
*** 1522,1527 ****
--- 1581,1588 ----
  	exit(1);
      }
  
+     DEBUG_MARK("reached this point (8)", "");
+ 
      if (inbuf.length) { /* Forwarding being done, read creds */
  	if (status = rd_and_store_for_creds(&inbuf, ticket, locuser)) {
  	    error("Can't get forwarded credentials: %s\n",
***************
*** 1530,1535 ****
--- 1591,1599 ----
  	}
      }
      krb5_free_ticket(ticket);
+ 
+     DEBUG_MARK("reached this point (9)", "");
+ 
      return 0;
  }
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/login.c,v
retrieving revision 1.1
diff -c -r1.1 login.c
*** 1.1	1995/01/14 00:24:08
--- login.c	1995/05/10 20:36:57
***************
*** 167,172 ****
--- 167,176 ----
  
  #define MAXENVIRON	32
  
+ #ifndef MAXPATHLEN
+ #define MAXPATHLEN 1024
+ #endif
+ 
  /*
   * This bounds the time given to login.  Not a define so it can
   * be patched on machines where it's too small.
***************
*** 218,223 ****
--- 222,235 ----
  typedef int sigtype;
  #endif /* POSIX */
  
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+ #define DEBUG_MARK(tag1,tag2) syslog(	LOG_ERR,			\
+ 					"DEBUG %s:%d %s%s",		\
+ 					__FILE__, __LINE__, tag1, tag2)
+ #else	/* +__DEBUG- */
+ #define DEBUG_MARK(tag1,tag2)
+ #endif	/* -__DEBUG. */
+ 
  #define EXCL_AUTH_TEST if (rflag || kflag || Kflag || eflag || fflag || Fflag ) { \
  				fprintf(stderr, \
  				    "login: only one of -r, -k, -K, -e, -F, and -f allowed.\n"); \
***************
*** 252,257 ****
--- 264,280 ----
  	struct termios tc;
  #endif
  
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+ 	{
+             struct stat st;
+ 
+             if ( stat( "/tmp/debug_login.krb5", &st ) == 0 ) {
+                 DEBUG_MARK("Sleeping awaiting attach by debugger","");
+ 	        sleep(60);
+             }
+         }
+ #endif	/* +__DEBUG. */
+ 
  	(void)signal(SIGALRM, timedout);
  	(void)alarm((u_int)timeout);
  	(void)signal(SIGQUIT, SIG_IGN);
***************
*** 263,268 ****
--- 286,306 ----
  	(void)quota(Q_SETUID, 0, 0, 0);
  #endif
  
+ #if defined(__DEBUG)	/* .__DEBUG+ */
+ syslog( LOG_ERR, "DEBUG %s: %s %s %s %s %s %s %s %s %s %s",
+ 			__FILE__,
+ 			argv[0] != NULL ? argv[0] : "",
+ 			argv[1] != NULL ? argv[1] : "",
+ 			argv[2] != NULL ? argv[2] : "",
+ 			argv[3] != NULL ? argv[3] : "",
+ 			argv[4] != NULL ? argv[4] : "",
+ 			argv[5] != NULL ? argv[5] : "",
+ 			argv[6] != NULL ? argv[6] : "",
+ 			argv[7] != NULL ? argv[7] : "",
+ 			argv[8] != NULL ? argv[8] : "",
+ 			argv[9] != NULL ? argv[9] : "");
+ #endif 	/* +__DEBUG. */
+ 
  	/*
  	 * -p is used by getty to tell login not to destroy the environment
  	 * -r is used by rlogind to cause the autologin protocol;
***************
*** 374,379 ****
--- 412,419 ----
  	if (*argv)
  		username = *argv;
  
+ 	DEBUG_MARK("reached this point (1)","");
+ 
  #if !defined(_AIX)
  	ioctlval = 0;
  #ifdef TIOCLSET
***************
*** 393,398 ****
--- 433,440 ----
  	 * If talking to an rlogin process, propagate the terminal type and
  	 * baud rate across the network.
  	 */
+         DEBUG_MARK("reached this point. (2)","");
+ 
  	if (eflag)
  	    	lgetstr(term, sizeof(term), "Terminal type");
  #ifdef POSIX_TERMIOS
***************
*** 451,463 ****
--- 493,522 ----
  	(void)ioctl(0, TIOCSETP, (char *)&sgttyb);
  #endif
  
+         DEBUG_MARK("reached this point. (3)","");
+ 
+ #if defined(_IBMR2)
+ 	for (cnt = (getdtablesize()-1); cnt > 2; cnt--)
+ #else
  	for (cnt = getdtablesize(); cnt > 2; cnt--)
+ #endif
  		(void) close(cnt);
  
+         DEBUG_MARK("reached this point. (3.1)","");
+ 
  	ttyn = ttyname(0);
+ 
+         DEBUG_MARK("ttyname(0)=", ttyname(0));
+         DEBUG_MARK("ttyname(1)=", ttyname(1));
+         DEBUG_MARK("ttyname(2)=", ttyname(2));
+ 
+         DEBUG_MARK("reached this point. (3.1.1)","");
+ 
  	if (ttyn == NULL || *ttyn == '\0')
  		ttyn = "/dev/tty??";
  
+         DEBUG_MARK("reached this point. (3.2)","");
+ 
  	/* This allows for tty names of the form /dev/pts/4 as well */
  	if ((tty = strchr(ttyn, '/')) && (tty = strchr(tty+1, '/')))
  		++tty;
***************
*** 470,475 ****
--- 529,536 ----
  	else
  		ktty = tty;
  
+         DEBUG_MARK("reached this point. (3.3)","");
+ 
  #ifndef LOG_ODELAY /* 4.2 syslog ... */                      
  	openlog("login", 0);
  #else
***************
*** 489,499 ****
--- 550,566 ----
  #endif
  		int read_long_pw_string();
  #endif /* KRB4 */
+ 
+                 DEBUG_MARK("reached this point. (3.4)","");
+ 
  #if !defined(_IBMR2)
  		ioctlval = 0;
  		(void)ioctl(0, TIOCSETD, (char *)&ioctlval);
  #endif
  
+                 DEBUG_MARK("reached this point. (4) username=", 
+ 			username == NULL ?"":username );
+ 
  		if (username == NULL) {
  			fflag = Fflag = 0;
  			getloginname();
***************
*** 524,534 ****
--- 591,605 ----
  		 * If not invoked by root, disallow if the uid's differ.
  		 */
  
+                 DEBUG_MARK("reached this point. (5)","");
+ 
  		if (Fflag && pwd) {
  			int uid = (int) getuid();
  			passwd_req = uid && uid != pwd->pw_uid;
  		}
  
+                 DEBUG_MARK("reached this point. (5.1)","");
+ 
  		/*
  		 * If no remote login authentication and a password exists
  		 * for this user, prompt for one and verify it.
***************
*** 536,541 ****
--- 607,614 ----
  		if (!passwd_req || pwd && !*pwd->pw_passwd)
  			break;
  
+                 DEBUG_MARK("reached this point. (6)","");
+ 
  #ifdef KRB4
  		kpass_ok = 0;
  		lpass_ok = 0;
***************
*** 647,655 ****
--- 720,734 ----
  		if (krbflag)
  		    dest_tkt();		/* clean up tickets if login fails */
  #else /* !KRB4 */
+ 
+                 DEBUG_MARK("reached this point. (7)","");
+ 
  #ifdef HAVE_SETPRIORITY
  		(void) setpriority(PRIO_PROCESS, 0, -4 + PRIO_OFFSET);
  #endif
+ 
+                 DEBUG_MARK("reached this point. (8)","");
+ 
  		p = crypt(getpass("password:"), salt);
  #ifdef HAVE_SETPRIORITY
  		(void) setpriority(PRIO_PROCESS, 0, 0 + PRIO_OFFSET);
***************
*** 658,663 ****
--- 737,744 ----
  			break;
  #endif /* KRB4 */
  
+                 DEBUG_MARK("reached this point. (9)","");
+ 
  		printf("Login incorrect\n");
  		if (++cnt >= 5) {
  			if (hostname)
***************
*** 684,689 ****
--- 765,772 ----
  		}
  	}
  
+         DEBUG_MARK("reached this point. (10)","");
+ 
  	/* committed to login -- turn off timeout */
  	(void)alarm((u_int)0);
  
***************
*** 708,713 ****
--- 791,798 ----
  		sleepexit(1);
  	}
  
+         DEBUG_MARK("reached this point. (11)","");
+ 
  #ifdef OQUOTA
  	if (quota(Q_SETUID, pwd->pw_uid, 0, 0) < 0 && errno != EINVAL) {
  		switch(errno) {
***************
*** 726,731 ****
--- 811,818 ----
  	}
  #endif
  
+         DEBUG_MARK("reached this point. (12)","");
+ 
  	if (chdir(pwd->pw_dir) < 0) {
  		printf("No directory %s!\n", pwd->pw_dir);
  		if (chdir("/"))
***************
*** 734,739 ****
--- 821,828 ----
  		printf("Logging in with home = \"/\".\n");
  	}
  
+         DEBUG_MARK("reached this point. (13)","");
+ 
  	/* nothing else left to fail -- really log in */
  	{
  		struct utmp utmp;
***************
*** 824,833 ****
--- 913,927 ----
  
  	i = 0;
  
+         DEBUG_MARK("reached this point. (14)","");
+ 
  #if defined(_AIX) && defined(_IBMR2)
  	{
  	    FILE *fp;
  	    if ((fp = fopen("/etc/environment", "r")) != NULL) {
+ 
+                 DEBUG_MARK("reached this point. (14.1)","");
+ 
  		while(fgets(tbuf, sizeof(tbuf), fp)) {
  		    if ((tbuf[0] == '#') || (strchr(tbuf, '=') == 0))
  			continue;
***************
*** 837,847 ****
--- 931,945 ----
  			    break;
  			}
  		    envinit[i++] = strsave(tbuf);
+ 
+                     DEBUG_MARK("reached this point. (14.2)","");
  		}
  		fclose(fp);
  	    }
  	}
  #endif
+         DEBUG_MARK("reached this point. (14.3)","");
+ 
  	sprintf(tbuf,"LOGNAME=%s",pwd->pw_name);
  	envinit[i++] = strsave(tbuf);
  	sprintf(tbuf,"LOGIN=%s",pwd->pw_name);
***************
*** 868,873 ****
--- 966,972 ----
  	mktemp(wgfile);
  	setenv("WGFILE", wgfile, 0);
  #endif
+         DEBUG_MARK("reached this point. (14.4)","");
  
  	if (tty[sizeof("tty")-1] == 'd')
  		syslog(LOG_INFO, "DIALUP %s, %s", tty, pwd->pw_name);
***************
*** 918,923 ****
--- 1017,1024 ----
  	if (!quietlog) {
  		struct stat st;
  
+         DEBUG_MARK("reached this point. (14.5)","");
+ 
  #ifdef KRB4
  		if (!krbflag)
  		    printf("\nWarning: No Kerberos tickets obtained.\n\n");
***************
*** 937,948 ****
--- 1038,1063 ----
  	(void)signal(SIGINT, SIG_DFL);
  	(void)signal(SIGTSTP, SIG_IGN);
  
+         DEBUG_MARK("reached this point. (14.6)","");
+ 
  	tbuf[0] = '-';
  	(void) strcpy(tbuf + 1, (p = strrchr(pwd->pw_shell, '/')) ?
  	    p + 1 : pwd->pw_shell);
+ 
+         DEBUG_MARK("reached this point. (14.7)","");
+ 
+         DEBUG_MARK("execlp(x,y) (14.8) x=", pwd->pw_shell);
+         DEBUG_MARK("execlp(x,y) (14.8) y=", tbuf);
+ 
  	execlp(pwd->pw_shell, tbuf, 0);
+ 
+         DEBUG_MARK("reached this point. (14.9)","");
+ 
  	fprintf(stderr, "login: no shell: ");
  	perror(pwd->pw_shell);
+ 
+         DEBUG_MARK("reached this point. (15)","");
+ 
  	exit(0);
  }
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/loginpaths.h,v
retrieving revision 1.1
diff -c -r1.1 loginpaths.h
*** 1.1	1995/01/14 00:24:08
--- loginpaths.h	1995/02/20 22:24:41
***************
*** 27,32 ****
--- 27,37 ----
  #define RPATH "/bin:/usr/ucb:/usr/bin:"
  #endif
  
+ #ifdef _UNICOS
+ #define LPATH ":/usr/ucb:/bin:/usr/bin:/usr/local/bin"
+ #define RPATH "/bin:/usr/ucb:/usr/bin:"
+ #endif
+ 
  #ifdef _IBMR2
  /* 3.2.0 */ 
  #define LPATH "/usr/bin:/etc:/usr/sbin:/usr/ucb:/usr/bin/X11:/sbin"
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/bsd/logutil.c,v
retrieving revision 1.1
diff -c -r1.1 logutil.c
*** 1.1	1995/01/14 00:24:09
--- logutil.c	1995/07/18 20:14:01
***************
*** 56,63 ****
      if (!ut->ut_pid)
         ut->ut_pid = getppid();
      ut->ut_type = USER_PROCESS;
      (void) strncpy(ut->ut_id, ut->ut_line, sizeof(ut->ut_id));
! 
      (void) setutent();
      (void) memset((char *)&utmp, 0, sizeof(utmp));
      (void) strncpy(utmp.ut_id, ut->ut_id, sizeof(utmp.ut_id));
--- 56,66 ----
      if (!ut->ut_pid)
         ut->ut_pid = getppid();
      ut->ut_type = USER_PROCESS;
+ #ifdef sgi
+     (void) strncpy(ut->ut_id, (char *)ut->ut_line + 3, sizeof(ut->ut_id));
+ #else
      (void) strncpy(ut->ut_id, ut->ut_line, sizeof(ut->ut_id));
! #endif
      (void) setutent();
      (void) memset((char *)&utmp, 0, sizeof(utmp));
      (void) strncpy(utmp.ut_id, ut->ut_id, sizeof(utmp.ut_id));
***************
*** 80,87 ****
--- 83,97 ----
      }
  }
  
+ #ifdef CRAY
+ logout(line,tpath)
+ #else
  logout(line)
+ #endif
      register char *line;
+ #ifdef CRAY
+     char *tpath;
+ #endif
  {
      register FILE *fp;
      struct utmp ut;
***************
*** 94,99 ****
--- 104,113 ----
  	if (!ut.ut_name[0] ||
  	    strncmp(ut.ut_line, line, sizeof(ut.ut_line)))
  	    continue;
+ #ifdef CRAY
+ 	/* return tpath string to caller (krlogind) */
+ 	(void)strncpy(tpath,ut.ut_tpath,TPATHSIZ);
+ #endif
  	memset(ut.ut_name,0, sizeof(ut.ut_name));
  #ifndef  NO_UT_HOST
  	memset(ut.ut_host,0, sizeof(ut.ut_host));
***************
*** 118,131 ****
  
  static int fd = -1;
  
! #ifndef SYSV
! logwtmp(line, name, host, keep_open)
! #else
  logwtmp(line, name, host, keep_open, logingin)
  #endif
       char *line, *name, *host;
       int keep_open;
! #ifdef  SYSV
       int logingin;
  #endif
  {
--- 132,145 ----
  
  static int fd = -1;
  
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
  logwtmp(line, name, host, keep_open, logingin)
+ #else
+ logwtmp(line, name, host, keep_open)
  #endif
       char *line, *name, *host;
       int keep_open;
! #if defined(SYSV) || defined(CRAY) || defined(sgi)
       int logingin;
  #endif
  {
***************
*** 135,154 ****
      
      if (fd < 0 && (fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0)
        return;
      if (!fstat(fd, &buf)) {
  	(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
  	(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
  #ifndef  NO_UT_HOST
  	(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
  #endif 
! #ifdef  SYSV
  	(void)strncpy(ut.ut_id, (char *)ut.ut_line + 4,
  		      sizeof(ut.ut_id));
  	ut.ut_type = logingin ? USER_PROCESS : DEAD_PROCESS;
  	ut.ut_pid = getpid();
- #endif
  	(void)time(&ut.ut_time);
! #if defined(HAVE_GETUTENT) && !defined(NO_UT_PID)
  	if (*name) {
  	    if (!ut.ut_pid)
  		ut.ut_pid = getpid();
--- 149,176 ----
      
      if (fd < 0 && (fd = open(WTMP_FILE, O_WRONLY|O_APPEND, 0)) < 0)
        return;
+     (void) memset((char *)&ut, 0, sizeof(ut));
      if (!fstat(fd, &buf)) {
+ #ifdef CRAY
+         bzero((char *)&ut, sizeof(ut));
+ #endif
  	(void)strncpy(ut.ut_line, line, sizeof(ut.ut_line));
  	(void)strncpy(ut.ut_name, name, sizeof(ut.ut_name));
  #ifndef  NO_UT_HOST
  	(void)strncpy(ut.ut_host, host, sizeof(ut.ut_host));
  #endif 
! #if defined(SYSV) || defined(CRAY)
  	(void)strncpy(ut.ut_id, (char *)ut.ut_line + 4,
  		      sizeof(ut.ut_id));
+ #endif
+ #ifdef sgi
+ 	(void)strncpy(ut.ut_id, (char *)ut.ut_line + 3,
+ 		      sizeof(ut.ut_id));
+ #endif
  	ut.ut_type = logingin ? USER_PROCESS : DEAD_PROCESS;
  	ut.ut_pid = getpid();
  	(void)time(&ut.ut_time);
! #if defined(HAVE_GETUTENT) && !defined(NO_UT_PID) && !defined(sgi)
  	if (*name) {
  	    if (!ut.ut_pid)
  		ut.ut_pid = getpid();
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/telnet/telnet/commands.c,v
retrieving revision 1.1
diff -c -r1.1 commands.c
*** 1.1	1995/01/14 00:24:37
--- commands.c	1995/05/24 16:50:55
***************
*** 1358,1364 ****
  
      /*VARARGS*/
      int
! suspend()
  {
  #ifdef	SIGTSTP
      setcommandmode();
--- 1358,1364 ----
  
      /*VARARGS*/
      int
! zsuspend()
  {
  #ifdef	SIGTSTP
      setcommandmode();
***************
*** 2353,2359 ****
  	}
      } else {
  	if (sp == 0) {
! 	    sp = getservbyname("telnet", "tcp");
  	    if (sp == 0) {
  		fprintf(stderr, "telnet: tcp/telnet: unknown service\n");
  	        setuid(getuid());
--- 2353,2359 ----
  	}
      } else {
  	if (sp == 0) {
! 	    sp = getservbyname("ktelnet", "tcp");
  	    if (sp == 0) {
  		fprintf(stderr, "telnet: tcp/telnet: unknown service\n");
  	        setuid(getuid());
***************
*** 2501,2507 ****
  	{ "encrypt",	encrypthelp,	encrypt_cmd,	0 },
  #endif	/* ENCRYPTION */
  #if	defined(unix)
! 	{ "z",		zhelp,		suspend,	0 },
  #endif	/* defined(unix) */
  #if	defined(TN3270)
  	{ "!",		shellhelp,	shell,		1 },
--- 2501,2507 ----
  	{ "encrypt",	encrypthelp,	encrypt_cmd,	0 },
  #endif	/* ENCRYPTION */
  #if	defined(unix)
! 	{ "z",		zhelp,		zsuspend,	0 },
  #endif	/* defined(unix) */
  #if	defined(TN3270)
  	{ "!",		shellhelp,	shell,		1 },
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/telnet/telnet/main.c,v
retrieving revision 1.1
diff -c -r1.1 main.c
*** 1.1	1995/01/14 00:24:38
--- main.c	1995/05/24 16:50:10
***************
*** 135,141 ****
  	user = NULL;
  
  	rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE;
! 	autologin = -1;
  
  	while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != EOF) {
  		switch(ch) {
--- 135,141 ----
  	user = NULL;
  
  	rlogin = (strncmp(prompt, "rlog", 4) == 0) ? '~' : _POSIX_VDISABLE;
! 	autologin = 1; /* SDSC,changed from -1 to 1 so autologin is default */
  
  	while ((ch = getopt(argc, argv, "8EKLS:X:acde:fFk:l:n:rt:x")) != EOF) {
  		switch(ch) {
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/telnet/telnetd/sys_term.c,v
retrieving revision 1.1
diff -c -r1.1 sys_term.c
*** 1.1	1995/01/14 00:24:45
--- sys_term.c	1995/06/13 22:33:55
***************
*** 52,57 ****
--- 52,61 ----
  # define PARENT_DOES_UTMP
  #endif
  
+ #if defined(CRAY)
+ #include <errno.h>
+ #endif
+ 
  #ifdef	NEWINIT
  #include <initreq.h>
  int	utmp_len = MAXHOSTNAMELEN;	/* sizeof(init_request.host) */
***************
*** 109,116 ****
--- 113,125 ----
  #include <sys/proc.h>
  #endif
  #ifndef linux
+ #ifndef sgi
  #include <sys/tty.h>
  #else
+ /* for SC_WILDC def */
+ #include <sac.h>
+ #endif
+ #else
  #include <linux/tty.h>
  #endif
  #ifdef	t_erase
***************
*** 186,192 ****
  # endif
  #endif	/* USE_TERMIO */
  
! #ifndef SETPGRP_TWOARG
  #define setpgrp(a,b) setpgrp()
  #endif
  
--- 195,201 ----
  # endif
  #endif	/* USE_TERMIO */
  
! #if !defined(SETPGRP_TWOARG) && !defined(_UNICOS)
  #define setpgrp(a,b) setpgrp()
  #endif
  
***************
*** 1352,1358 ****
--- 1361,1371 ----
  	char *autoname;
  {
  	register int i;
+ #if defined(__alpha)
+ 	int time();
+ #else
  	long time();
+ #endif
  #ifdef	NEWINIT
  	extern char *ptyip;
  	struct init_request request;
***************
*** 1386,1392 ****
  		 */
  		register int pid = i;
  		void sigjob P((int));
- 
  		setpgrp();
  		utmp_sig_reset();		/* reset handler to default */
  		/*
--- 1399,1404 ----
***************
*** 1769,1776 ****
--- 1781,1790 ----
  	char *p;
  
  	p = line + sizeof("/dev/") - 1;
+ #if !defined (__alpha)
  	if (logout(p))
  		logwtmp(p, "", "");
+ #endif
  	(void)chmod(line, 0666);
  	(void)chown(line, 0, 0);
  	*p = 'p';
***************
*** 1947,1953 ****
--- 1961,1972 ----
  	if (first == 0) {
  		omask = sigblock(mask);
  		while (gotsigjob == 0)
+ 		{
  			sigpause(omask);
+ /* the following line is a hack as a test; it avoids a
+    run away telnetd problem on the Cray  */
+ 			if (errno == EINVAL) return(1);
+ 		}
  		return(1);
  	}
  	first = 0;
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/appl/telnet/telnetd/telnetd.c,v
retrieving revision 1.1
diff -c -r1.1 telnetd.c
*** 1.1	1995/01/14 00:24:46
--- telnetd.c	1995/06/13 22:38:36
***************
*** 494,500 ****
--- 494,504 ----
  	}
  #endif	/* _SC_CRAY_SECURE_SYS */
  
+ #ifndef sgi
  	openlog("telnetd", LOG_PID | LOG_ODELAY, LOG_DAEMON);
+ #else
+ 	openlog("telnetd", LOG_PID | LOG_NDELAY, LOG_AUTH);
+ #endif
  	fromlen = sizeof (from);
  	if (getpeername(0, (struct sockaddr *)&from, &fromlen) < 0) {
  		fprintf(stderr, "%s: ", progname);
***************
*** 793,801 ****
--- 797,812 ----
  	 * Find an available pty to use.
  	 */
  #ifndef	convex
+ #ifndef sgi
  	pty = getpty(&ptynum);
  	if (pty < 0)
  		fatal(net, "All network ports in use");
+ #else
+         line = _getpty(&ptynum, O_RDWR|O_NDELAY, 0600, 0);
+ 	if (!line)
+ 		fatal(net, "All network ports in use");
+ 	pty = ptynum;
+ #endif
  #else
  	for (;;) {
  		char *lp;
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/include/krb5/adm_defs.h,v
retrieving revision 1.1
diff -c -r1.1 adm_defs.h
*** 1.1	1995/01/14 00:25:08
--- adm_defs.h	1995/02/20 22:37:06
***************
*** 51,57 ****
  
  #define MAXCPWBUFSIZE 4096
  
! #ifdef unicos61
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
--- 51,57 ----
  
  #define MAXCPWBUFSIZE 4096
  
! #ifdef _UNICOS
  #define SIZEOF_INADDR  SIZEOF_in_addr
  #else
  #define SIZEOF_INADDR sizeof(struct in_addr)
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/include/krb5/dbm.h,v
retrieving revision 1.1
diff -c -r1.1 dbm.h
*** 1.1	1995/01/14 00:25:09
--- dbm.h	1995/02/20 22:37:08
***************
*** 33,39 ****
  #ifndef ODBM
  #include <ndbm.h>
  #else /* ODBM */
! #ifdef unicos61
  #include <rpcsvc/dbm.h>
  #else
  #include <dbm.h>
--- 33,39 ----
  #ifndef ODBM
  #include <ndbm.h>
  #else /* ODBM */
! #ifdef _UNICOS
  #include <rpcsvc/dbm.h>
  #else
  #include <dbm.h>
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/include/krb5/krb5.h,v
retrieving revision 1.1
diff -c -r1.1 krb5.h
*** 1.1	1995/01/14 00:25:12
--- krb5.h	1995/02/20 22:37:10
***************
*** 24,29 ****
--- 24,33 ----
   * General definitions for Kerberos version 5.
   */
  
+ #ifdef _UNICOS
+ #define MAXPATHLEN PATH_MAX
+ #endif
+ 
  #ifndef KRB5_GENERAL__
  #define KRB5_GENERAL__
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/kadmin/client/kadmin.c,v
retrieving revision 1.1
diff -c -r1.1 kadmin.c
*** 1.1	1995/01/14 00:26:09
--- kadmin.c	1995/02/20 21:58:41
***************
*** 193,204 ****
  	exit(1);
      } 
  
- #ifdef unicos61
- #define SIZEOF_INADDR  SIZEOF_in_addr
- #else
- #define SIZEOF_INADDR sizeof(struct in_addr)
- #endif
- 
  /* V4 kpasswd Protocol Hack
   *	Necessary for ALL kadmind clients
   */
--- 193,198 ----
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/kadmin/kpasswd/kpasswd.c,v
retrieving revision 1.1
diff -c -r1.1 kpasswd.c
*** 1.1	1995/01/14 00:26:11
--- kpasswd.c	1995/02/20 22:38:50
***************
*** 286,297 ****
  	goto finish;
      } 
  
- #ifdef unicos61
- #define SIZEOF_INADDR  SIZEOF_in_addr
- #else
- #define SIZEOF_INADDR sizeof(struct in_addr)
- #endif
- 
  	/* V4 kpasswd Protocol Hack */
   {
      int msg_length = 0;
--- 286,291 ----
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/crypto/des/f_ecb.c,v
retrieving revision 1.1
diff -c -r1.1 f_ecb.c
*** 1.1	1995/01/14 00:27:51
--- f_ecb.c	1995/01/14 03:06:36
***************
*** 65,71 ****
--- 65,75 ----
  		/*
  		 * Point kp past end of schedule
  		 */
+ #if defined(__alpha) || defined(_UNICOS)
+ 		kp = ((unsigned KRB_INT32 *)schedule) + 16;;
+ #else
  		kp = ((unsigned KRB_INT32 *)schedule) + (2 * 16);;
+ #endif
  		for (i = 0; i < 8; i++) {
  			DES_SP_DECRYPT_ROUND(left, right, temp, kp);
  			DES_SP_DECRYPT_ROUND(right, left, temp, kp);
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/crypto/des/f_sched.c,v
retrieving revision 1.1
diff -c -r1.1 f_sched.c
*** 1.1	1995/01/14 00:27:52
--- f_sched.c	1995/01/14 03:06:38
***************
*** 284,296 ****
  			 * Do the rotation.  One bit and two bit rotations
  			 * are done separately.  Note C and D are 28 bits.
  			 */
! 			if (two_bit_shifts & 0x1) {
! 				c = ((c << 2) & 0xffffffc) | (c >> 26);
! 				d = ((d << 2) & 0xffffffc) | (d >> 26);
! 			} else {
! 				c = ((c << 1) & 0xffffffe) | (c >> 27);
! 				d = ((d << 1) & 0xffffffe) | (d >> 27);
! 			}
  			two_bit_shifts >>= 1;
  
  			/*
--- 284,296 ----
  			 * Do the rotation.  One bit and two bit rotations
  			 * are done separately.  Note C and D are 28 bits.
  			 */
!   			if (two_bit_shifts & 0x1) {
!  				c = ((c << 2) & 0xffffffc) | ((c >> 26)&0x3);
!  				d = ((d << 2) & 0xffffffc) | ((d >> 26)&0x3);
!  			} else {
!  				c = ((c << 1) & 0xffffffe) | ((c >> 27)&0x1);
!  				d = ((d << 1) & 0xffffffe) | ((d >> 27)&0x1);
!   			}
  			two_bit_shifts >>= 1;
  
  			/*
***************
*** 329,336 ****
--- 329,341 ----
  			 * hold bytes 7135 (high to low order) while the
  			 * second holds bytes 4682.
  			 */
+ #if defined(__alpha) || defined(_UNICOS)
+  			*k++ = ((ltmp & 0x00ffff00) | (rtmp & 0xff0000ff))<<32|
+  			        (ltmp & 0xff0000ff) | (rtmp & 0x00ffff00);
+ #else
  			*k++ = (ltmp & 0x00ffff00) | (rtmp & 0xff0000ff);
  			*k++ = (ltmp & 0xff0000ff) | (rtmp & 0x00ffff00);
+ #endif
  		}
  	}
  	return (0);
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/crypto/des/f_tables.h,v
retrieving revision 1.1
diff -c -r1.1 f_tables.h
*** 1.1	1995/01/14 00:27:52
--- f_tables.h	1995/01/14 03:06:40
***************
*** 79,84 ****
--- 79,113 ----
   * a time and swapping left and right in the code we can avoid the
   * swaps altogether.
   */
+ #if defined (__alpha) || defined(_UNICOS)
+ #define	DES_SP_ENCRYPT_ROUND(left, right, temp, kp) \
+  	(temp) = ((((right)>>11)&0x1fffff)|(((right)<<21)&0xffe00000))^ \
+  		 (((*kp)>>32)&0xffffffff); \
+ 	(left) ^= SP[0][((temp) >> 24) & 0x3f] \
+ 		| SP[1][((temp) >> 16) & 0x3f] \
+ 		| SP[2][((temp) >>  8) & 0x3f] \
+ 		| SP[3][((temp)      ) & 0x3f]; \
+  	(temp) = ((((right)>>23)&0x1ff)|(((right)<<9)&0xfffffe00))^ \
+  		 ((*kp)&0xffffffff); kp++; \
+ 	(left) ^= SP[4][((temp) >> 24) & 0x3f] \
+ 		| SP[5][((temp) >> 16) & 0x3f] \
+ 		| SP[6][((temp) >>  8) & 0x3f] \
+ 		| SP[7][((temp)      ) & 0x3f]
+ 
+ #define	DES_SP_DECRYPT_ROUND(left, right, temp, kp) \
+  	(temp) = ((((right)>>23)&0x1ff)|(((right)<<9)&0xfffffe00))^ \
+  		 ((*(--(kp)))&0xffffffff); \
+ 	(left) ^= SP[7][((temp)      ) & 0x3f] \
+ 		| SP[6][((temp) >>  8) & 0x3f] \
+ 		| SP[5][((temp) >> 16) & 0x3f] \
+ 		| SP[4][((temp) >> 24) & 0x3f]; \
+  	(temp) = ((((right)>>11)&0x1fffff)|(((right)<<21)&0xffe00000))^ \
+  		 (((*kp)>>32)&0xffffffff); \
+ 	(left) ^= SP[3][((temp)      ) & 0x3f] \
+ 		| SP[2][((temp) >>  8) & 0x3f] \
+ 		| SP[1][((temp) >> 16) & 0x3f] \
+ 		| SP[0][((temp) >> 24) & 0x3f]
+ #else
  #define	DES_SP_ENCRYPT_ROUND(left, right, temp, kp) \
  	(temp) = (((right) >> 11) | ((right) << 21)) ^ *(kp)++; \
  	(left) ^= SP[0][((temp) >> 24) & 0x3f] \
***************
*** 103,108 ****
--- 132,139 ----
  		| SP[1][((temp) >> 16) & 0x3f] \
  		| SP[0][((temp) >> 24) & 0x3f]
  
+ #endif
+ 
  /*
   * Macros to help deal with the initial permutation table.  Note
   * the IP table only deals with 32 bits at a time, allowing us to
***************
*** 186,191 ****
--- 217,247 ----
   * You can probably do better than these by rewriting for particular
   * situations.  These aren't bad, though.
   */
+ #if defined(__alpha) || defined(_UNICOS)
+ #define	DES_DO_ENCRYPT(left, right, temp, kp) \
+ 	do { \
+ 		register int i; \
+ 		DES_INITIAL_PERM((left), (right), (temp)); \
+ 		for (i = 0; i < 8; i++) { \
+ 			DES_SP_ENCRYPT_ROUND((left), (right), (temp), (kp)); \
+ 			DES_SP_ENCRYPT_ROUND((right), (left), (temp), (kp)); \
+ 		} \
+ 		DES_FINAL_PERM((left), (right), (temp)); \
+ 		(kp) -=  16; \
+ 	} while (0)
+ 
+ #define	DES_DO_DECRYPT(left, right, temp, kp) \
+ 	do { \
+ 		register int i; \
+ 		DES_INITIAL_PERM((left), (right), (temp)); \
+ 		(kp) += 16; \
+ 		for (i = 0; i < 8; i++) { \
+ 			DES_SP_DECRYPT_ROUND((left), (right), (temp), (kp)); \
+ 			DES_SP_DECRYPT_ROUND((right), (left), (temp), (kp)); \
+ 		} \
+ 		DES_FINAL_PERM((left), (right), (temp)); \
+ 	} while (0)
+ #else
  #define	DES_DO_ENCRYPT(left, right, temp, kp) \
  	do { \
  		register int i; \
***************
*** 210,215 ****
--- 266,272 ----
  		DES_FINAL_PERM((left), (right), (temp)); \
  	} while (0)
  
+ #endif
  /*
   * These are handy dandy utility thingies for straightening out bytes.
   * Included here because they're used a couple of places.
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/crypto/des/verify.c,v
retrieving revision 1.1
diff -c -r1.1 verify.c
*** 1.1	1995/01/14 00:27:54
--- verify.c	1995/01/14 03:06:41
***************
*** 115,125 ****
  
      progname=argv[0];		/* salt away invoking program */
  
-     /* Assume a long is four bytes */
-     if (sizeof(long) != 4) {
- 	printf("\nERROR,  size of long is %d",sizeof(long));
- 	exit(-1);
-     }
  
      while (--argc > 0 && (*++argv)[0] == '-')
  	for (i=1; argv[0][i] != '\0'; i++) {
--- 115,120 ----
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/crypto/md4/md4.c,v
retrieving revision 1.1
diff -c -r1.1 md4.c
*** 1.1	1995/01/14 00:27:56
--- md4.c	1995/03/24 17:49:08
***************
*** 62,68 ****
--- 62,72 ----
  #define H(x, y, z) ((x) ^ (y) ^ (z))
  
  /* ROTATE_LEFT rotates x left n bits */
+ #ifdef CRAY
+ #define ROTATE_LEFT(x, n) (((x) << (n)) | (((x) & 0xffffffff) >> (32-(n))))
+ #else
  #define ROTATE_LEFT(x, n) (((x) << (n)) | ((x) >> (32-(n))))
+ #endif
  
  /* FF, GG and HH are MD4 transformations for rounds 1, 2 and 3 */
  /* Rotation is separate from addition to prevent recomputation */
***************
*** 102,108 ****
--- 106,116 ----
    mdi = (int)((mdContext->i[0] >> 3) & 0x3F);
  
    /* update number of bits */
+ #ifdef CRAY
+   if (((mdContext->i[0] + ((krb5_ui_4)inLen << 3)) & 0xffffffff) < mdContext->i[0])
+ #else
    if ((mdContext->i[0] + ((krb5_ui_4)inLen << 3)) < mdContext->i[0])
+ #endif
      mdContext->i[1]++;
    mdContext->i[0] += ((krb5_ui_4)inLen << 3);
    mdContext->i[1] += ((krb5_ui_4)inLen >> 29);
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/keytab/file/ktf_util.c,v
retrieving revision 1.1
diff -c -r1.1 ktf_util.c
*** 1.1	1995/01/14 00:27:27
--- ktf_util.c	1995/03/06 21:20:58
***************
*** 99,105 ****
--- 99,109 ----
  static char *fopen_mode_rb = "r";
  #endif
  
+ #ifdef _UNICOS
+ #include <errno.h>
+ #else
  extern int errno;
+ #endif
  
  static krb5_error_code
  krb5_ktfileint_open(id, mode)
***************
*** 145,151 ****
--- 149,161 ----
  	}
      } else {
  	/* gotta verify it instead... */
+ #ifdef CRAY
+         /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+         kt_vno = 0;
+         if (!xfread((&kt_vno)+6,  2, 1, KTFILEP(id))) {
+ #else
  	if (!xfread(&kt_vno, sizeof(kt_vno), 1, KTFILEP(id))) {
+ #endif
  	    kerror = errno;
  	    (void) krb5_unlock_file(KTFILEP(id), KTFILENAME(id));
  	    (void) fclose(KTFILEP(id));
***************
*** 202,208 ****
--- 212,224 ----
      if (fseek(KTFILEP(id), delete_point, SEEK_SET)) {
          return errno;
      }
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     size=0;
+     if (!xfread((&size)+4, 4, 1, KTFILEP(id))) {
+ #else
      if (!xfread(&size, sizeof(size), 1, KTFILEP(id))) {
+ #endif
          return KRB5_KT_END;
      }
      if (KTVERSION(id) != KRB5_KT_VNO_1)
***************
*** 268,274 ****
--- 284,296 ----
  
      do {
          *delete_point = ftell(KTFILEP(id));
+ #ifdef CRAY
+         /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+         size = 0;
+         if (!xfread(&(size)+4, 4, 1, KTFILEP(id))) {
+ #else
          if (!xfread(&size, sizeof(size), 1, KTFILEP(id))) {
+ #endif
              return KRB5_KT_END;
          }
  	if (KTVERSION(id) != KRB5_KT_VNO_1)
***************
*** 290,296 ****
--- 312,324 ----
      /* deal with guts of parsing... */
  
      /* first, int16 with #princ components */
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     count=0;
+     if (!xfread(&(count)+6, 2, 1, KTFILEP(id)))
+ #else
      if (!xfread(&count, sizeof(count), 1, KTFILEP(id)))
+ #endif
  	return KRB5_KT_END;
      if (KTVERSION(id) == KRB5_KT_VNO_1) {
  	    count -= 1;		/* V1 includes the realm in the count */
***************
*** 312,318 ****
--- 340,352 ----
      }
  
      /* Now, get the realm data */
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     princ_size=0;
+     if (!xfread(&(princ_size)+6, 2, 1, KTFILEP(id))) {
+ #else
      if (!xfread(&princ_size, sizeof(princ_size), 1, KTFILEP(id))) {
+ #endif
  	    error = KRB5_KT_END;
  	    goto fail;
      }
***************
*** 340,346 ****
--- 374,386 ----
      
      for (i = 0; i < count; i++) {
  	princ = krb5_princ_component(ret_entry->principal, i);
+ #ifdef CRAY
+         /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+         princ_size=0;
+         if (!xfread(&(princ_size)+6, 2, 1, KTFILEP(id))) {
+ #else
  	if (!xfread(&princ_size, sizeof(princ_size), 1, KTFILEP(id))) {
+ #endif
  	    error = KRB5_KT_END;
  	    goto fail;
          }
***************
*** 366,373 ****
--- 406,420 ----
  
      /* read in the principal type, if we can get it */
      if (KTVERSION(id) != KRB5_KT_VNO_1) {
+ #ifdef CRAY
+             /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+             ret_entry->principal->type=0;
+ 	    if (!xfread(&(ret_entry->principal->type)+4,
+ 			4, 1, KTFILEP(id))) {
+ #else
  	    if (!xfread(&ret_entry->principal->type,
  			sizeof(ret_entry->principal->type), 1, KTFILEP(id))) {
+ #endif
  		    error = KRB5_KT_END;
  		    goto fail;
  	    }
***************
*** 375,381 ****
--- 422,434 ----
      }
      
      /* read in the timestamp */
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     ret_entry->timestamp=0;
+     if (!xfread(&(ret_entry->timestamp)+4, 4, 1, KTFILEP(id))) {
+ #else
      if (!xfread(&ret_entry->timestamp, sizeof(ret_entry->timestamp), 1, KTFILEP(id))) {
+ #endif
  	error = KRB5_KT_END;
  	goto fail;
      }
***************
*** 389,396 ****
--- 442,456 ----
      }
      
      /* key type */
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     ret_entry->key.keytype=0;
+     if (!xfread(&(ret_entry->key.keytype)+6, 2, 1,
+ 		KTFILEP(id))) {
+ #else
      if (!xfread(&ret_entry->key.keytype, sizeof(ret_entry->key.keytype), 1,
  		KTFILEP(id))) {
+ #endif
  	error = KRB5_KT_END;
  	goto fail;
      }
***************
*** 398,404 ****
--- 458,470 ----
  	ret_entry->key.keytype = ntohs(ret_entry->key.keytype);
      
      /* key contents */
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     count=0;
+     if (!xfread(&(count)+6, 2, 1, KTFILEP(id))) {
+ #else
      if (!xfread(&count, sizeof(count), 1, KTFILEP(id))) {
+ #endif
  	error = KRB5_KT_END;
  	goto fail;
      }
***************
*** 653,665 ****
--- 719,743 ----
      if (fseek(KTFILEP(id), 0, SEEK_SET)) {
          return errno;
      }
+ #ifdef CRAY
+     /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+     kt_vno = 0;
+     if (!xfread((&kt_vno)+6,  2, 1, KTFILEP(id))) {
+ #else
      if (!xfread(&kt_vno, sizeof(kt_vno), 1, KTFILEP(id))) {
+ #endif
          return KRB5_KT_IOERR;
      }
  
      while (!found) {
          *commit_point = ftell(KTFILEP(id));
+ #ifdef CRAY
+         /* shorts, ints, and longs are all full words on Cray: 8 bytes */
+         size = 0;
+         if (!xfread((&size)+4,  4, 1, KTFILEP(id))) {
+ #else
          if (!xfread(&size, sizeof(size), 1, KTFILEP(id))) {
+ #endif
              /*
               * Hit the end of file, reserve this slot.
               */
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/krb/compat_recv.c,v
retrieving revision 1.1
diff -c -r1.1 compat_recv.c
*** 1.1	1995/01/14 00:27:29
--- compat_recv.c	1995/03/29 22:35:30
***************
*** 105,111 ****
--- 105,116 ----
  	KTEXT		v4_ticket;	 /* storage for client's ticket */
  #endif
  		
+ #ifdef CRAY
+         /* On a Cray, vers.vers is allocated a full word: 8 bytes */
+ 	if ((retval = krb5_net_read(fd, vers.vers+4, 4)) != 4)
+ #else
  	if ((retval = krb5_net_read(fd, vers.vers, 4)) != 4)
+ #endif
  		return((retval < 0) ? errno : ECONNABORTED);
  
  #ifdef KRB5_KRB4_COMPAT
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/os/localaddr.c,v
retrieving revision 1.1
diff -c -r1.1 localaddr.c
*** 1.1	1995/01/14 00:27:40
--- localaddr.c	1995/02/20 22:43:21
***************
*** 29,34 ****
--- 29,37 ----
  
  #include <krb5/krb5.h>
  #include <krb5/osconf.h>
+ #ifdef _UNICOS
+ #include <krb5/adm_defs.h>
+ #endif
  
  #include <krb5/ext-proto.h>
  
***************
*** 147,153 ****
--- 150,160 ----
  		    malloc (sizeof(krb5_address));
  		if (address) {
  		    address->addrtype = ADDRTYPE_INET;
+ #ifdef _UNICOS
+ 		    address->length = SIZEOF_INADDR;
+ #else
  		    address->length = sizeof(struct in_addr);
+ #endif
  		    address->contents = (unsigned char *)malloc(address->length);
  		    if (!address->contents) {
  			krb5_xfree(address);
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/os/net_read.c,v
retrieving revision 1.1
diff -c -r1.1 net_read.c
*** 1.1	1995/01/14 00:27:40
--- net_read.c	1995/03/29 18:24:53
***************
*** 46,51 ****
--- 46,56 ----
  
      do {
  	cc = read(fd, buf, len);
+ 	/*
+ 	 * Restart the read if interrupted by a signal
+ 	 * such as SIGWINCH or SIGURG...
+ 	 */
+ 	if (( cc < 0 ) && (errno == EINTR)) continue;
  	if (cc < 0)
  	    return(cc);		 /* errno is already set */
  	else if (cc == 0) {
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/os/read_msg.c,v
retrieving revision 1.1
diff -c -r1.1 read_msg.c
*** 1.1	1995/01/14 00:27:41
--- read_msg.c	1995/02/20 22:43:23
***************
*** 40,50 ****
  	krb5_pointer fdp;
  	krb5_data	*inbuf;
  {
! 	krb5_int32	len, len2;
  	char		*buf = NULL;
  	int		fd = *( (int *) fdp);
  	
  	if ((len2 = krb5_net_read(fd, (char *)&len, 4)) != 4)
  		return((len2 < 0) ? errno : ECONNABORTED);
  	inbuf->length = len = ntohl(len);
  	if (len) {
--- 40,54 ----
  	krb5_pointer fdp;
  	krb5_data	*inbuf;
  {
! 	krb5_int32	len=0, len2;
  	char		*buf = NULL;
  	int		fd = *( (int *) fdp);
  	
+ #ifdef _UNICOS
+ 	if ((len2 = krb5_net_read(fd, (char *)&len + 4, 4)) != 4)
+ #else
  	if ((len2 = krb5_net_read(fd, (char *)&len, 4)) != 4)
+ #endif
  		return((len2 < 0) ? errno : ECONNABORTED);
  	inbuf->length = len = ntohl(len);
  	if (len) {
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/lib/krb5/os/write_msg.c,v
retrieving revision 1.1
diff -c -r1.1 write_msg.c
*** 1.1	1995/01/14 00:27:42
--- write_msg.c	1995/02/20 22:43:24
***************
*** 43,49 ****
--- 43,53 ----
  	int		fd = *( (int *) fdp);
  
  	len = htonl(outbuf->length);
+ #ifdef _UNICOS
+ 	if (krb5_net_write(fd, (char *)&len + 4, 4) < 0) {
+ #else
  	if (krb5_net_write(fd, (char *)&len, 4) < 0) {
+ #endif
  		return(errno);
  	}
  	if (len && (krb5_net_write(fd, outbuf->data, outbuf->length) < 0)) {
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/autoconf/autoconf.info,v
retrieving revision 1.1
diff -c -r1.1 autoconf.info
*** 1.1	1995/01/14 00:28:14
--- autoconf.info	1995/01/14 00:28:15
***************
*** 1222,1228 ****
  
       For example, this line in `configure.in':
  
!           AC_REVISION($Revision: 1.1 $)dnl
  
       produces this in `configure':
  
--- 1222,1228 ----
  
       For example, this line in `configure.in':
  
!           AC_REVISION($Revision: 1.1.1.1 $)dnl
  
       produces this in `configure':
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/autoconf/texinfo.tex,v
retrieving revision 1.1
diff -c -r1.1 texinfo.tex
*** 1.1	1995/01/14 00:28:18
--- texinfo.tex	1995/01/14 00:28:19
***************
*** 24,30 ****
  
  % This automatically updates the version number based on RCS.
  \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
! \deftexinfoversion$Revision: 1.1 $
  \message{Loading texinfo package [Version \texinfoversion]:}
  
  % Print the version number if in a .fmt file.
--- 24,30 ----
  
  % This automatically updates the version number based on RCS.
  \def\deftexinfoversion$#1: #2 ${\def\texinfoversion{#2}}
! \deftexinfoversion$Revision: 1.1.1.1 $
  \message{Loading texinfo package [Version \texinfoversion]:}
  
  % Print the version number if in a .fmt file.
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/et/Makefile.in,v
retrieving revision 1.1
diff -c -r1.1 Makefile.in
*** 1.1	1995/01/14 00:28:20
--- Makefile.in	1995/07/18 20:44:05
***************
*** 80,85 ****
--- 80,86 ----
  all:: libcom_err.a
  
  libcom_err.a: $(LIBOBJS)
+ 	$(RM) -f libcom_err.a
  	$(ARCHIVE) $@ $(LIBOBJS)
  	$(RANLIB) $@
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/Makefile.in,v
retrieving revision 1.1
diff -c -r1.1 Makefile.in
*** 1.1	1995/01/14 00:28:28
--- Makefile.in	1995/07/18 19:59:55
***************
*** 105,110 ****
--- 105,111 ----
  all:: libss.a
  
  libss.a: $(OBJS)
+ 	$(RM) -f libss.a
  	$(ARCHIVE) $@ $(OBJS)
  	$(RANLIB) $@
  
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/configure,v
retrieving revision 1.1
diff -c -r1.1 configure
*** 1.1	1995/01/14 00:28:28
--- configure	1995/07/18 20:33:20
***************
*** 555,560 ****
--- 555,597 ----
    fi
    rm -f conftest.out
  
+ test -n "$silent" || echo "checking for return type of signal handlers"
+ cat > conftest.${ac_ext} <<EOF
+ #include "confdefs.h"
+ #include <sys/types.h>
+ #include <signal.h>
+ #ifdef signal
+ #undef signal
+ #endif
+ extern void (*signal ()) ();
+ int main() { return 0; }
+ int t() { int i;; return 0; }
+ EOF
+ if eval $ac_compile; then
+   rm -rf conftest*
+   
+ {
+ test -n "$verbose" && \
+ echo "	defining" RETSIGTYPE to be "void"
+ echo "#define" RETSIGTYPE "void" >> confdefs.h
+ DEFS="$DEFS -DRETSIGTYPE=void"
+ }
+ 
+ 
+ else
+   rm -rf conftest*
+   
+ {
+ test -n "$verbose" && \
+ echo "	defining" RETSIGTYPE to be "int"
+ echo "#define" RETSIGTYPE "int" >> confdefs.h
+ DEFS="$DEFS -DRETSIGTYPE=int"
+ }
+ 
+ fi
+ rm -f conftest*
+ 
+ 
  test -n "$silent" || echo "checking for strdup"
  cat > conftest.${ac_ext} <<EOF
  #include "confdefs.h"
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/configure.in,v
retrieving revision 1.1
diff -c -r1.1 configure.in
*** 1.1	1995/01/14 00:28:29
--- configure.in	1995/07/18 20:02:11
***************
*** 8,13 ****
--- 8,14 ----
  AC_PROG_ARCHIVE
  AC_PROG_RANLIB
  HAVE_YYLINENO
+ AC_RETSIGTYPE
  AC_FUNC_CHECK(strdup,AC_DEFINE(HAS_STRDUP))
  ET_RULES
  SS_RULES
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/list_rqs.c,v
retrieving revision 1.1
diff -c -r1.1 list_rqs.c
*** 1.1	1995/01/14 00:28:30
--- list_rqs.c	1995/07/18 20:02:39
***************
*** 34,40 ****
      FILE *output;
      int fd;
      int mask;
!     int (*func)();
  #ifndef WAIT_USES_INT
      union wait waitb;
  #else
--- 34,40 ----
      FILE *output;
      int fd;
      int mask;
!     RETSIGTYPE (*func)();
  #ifndef WAIT_USES_INT
      union wait waitb;
  #else
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/listen.c,v
retrieving revision 1.1
diff -c -r1.1 listen.c
*** 1.1	1995/01/14 00:28:31
--- listen.c	1995/07/18 20:03:21
***************
*** 21,27 ****
  static ss_data *current_info;
  static jmp_buf listen_jmpb;
  
! static int print_prompt()
  {
  #ifdef BSD
      /* put input into a reasonable mode */
--- 21,28 ----
  static ss_data *current_info;
  static jmp_buf listen_jmpb;
  
! RETSIGTYPE print_prompt()
! 
  {
  #ifdef BSD
      /* put input into a reasonable mode */
***************
*** 37,43 ****
      (void) fflush(stdout);
  }
  
! static int listen_int_handler()
  {
      putc('\n', stdout);
      longjmp(listen_jmpb, 1);
--- 38,44 ----
      (void) fflush(stdout);
  }
  
! RETSIGTYPE listen_int_handler()
  {
      putc('\n', stdout);
      longjmp(listen_jmpb, 1);
***************
*** 47,55 ****
      int sci_idx;
  {
      register char *cp;
!     register int (*sig_cont)();
      register ss_data *info;
!     int (*sig_int)(), (*old_sig_cont)();
      char input[BUFSIZ];
      char buffer[BUFSIZ];
      char *end = buffer;
--- 48,56 ----
      int sci_idx;
  {
      register char *cp;
!     register RETSIGTYPE (*sig_cont)();
      register ss_data *info;
!     void (*sig_int)(), (*old_sig_cont)();
      char input[BUFSIZ];
      char buffer[BUFSIZ];
      char *end = buffer;
***************
*** 59,65 ****
      ss_data *old_info = current_info;
      
      current_info = info = ss_info(sci_idx);
!     sig_cont = (int (*)())0;
      info->abort = 0;
      mask = sigblock(sigmask(SIGINT));
      memcpy(old_jmpb, listen_jmpb, sizeof(jmp_buf));
--- 60,66 ----
      ss_data *old_info = current_info;
      
      current_info = info = ss_info(sci_idx);
!     sig_cont = (RETSIGTYPE (*)())0;
      info->abort = 0;
      mask = sigblock(sigmask(SIGINT));
      memcpy(old_jmpb, listen_jmpb, sizeof(jmp_buf));
===================================================================
RCS file: /projects/security/kerberos/krb5B4-3/Master/krb5B4/util/ss/ss_internal.h,v
retrieving revision 1.1
diff -c -r1.1 ss_internal.h
*** 1.1	1995/01/14 00:28:32
--- ss_internal.h	1995/02/20 22:45:45
***************
*** 4,9 ****
--- 4,13 ----
   * For copyright information, see copyright.h.
   */
  
+ #ifdef _UNICOS
+ #define MAXPATHLEN PATH_MAX
+ #endif
+ 
  #ifndef _ss_ss_internal_h
  #define _ss_ss_internal_h __FILE__
  #include <stdio.h>


------- End Forwarded Message

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