[1013] in Kerberos-V5-bugs

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

Current changes to appl/bsd/krlogind.c break

daemon@ATHENA.MIT.EDU (epeisach@MIT.EDU)
Thu Dec 29 00:26:53 1994

From: epeisach@MIT.EDU
Date: Thu, 29 Dec 1994 00:26:49 -0500
To: krb5-bugs@MIT.EDU
Cc: probe@MIT.EDU


Essentially, HAVE_STREAMS caused lossage on the Alpha OSF/1....

Based on the man page of pty, it suggested that openpty be used to hide
the name of the devices - so it will work in future releases... This
sounded good and was easy to implement....

If you look on the tty man page for the SGI, they suggest a proper
routine for their system.... getpty I think.... Perhaphs that should be
coded as well.

configure.in:
	Test for openpty

krlogind.c:
	Don't declare malloc on a machine that defines STDC_HEADERS from
configure... Malloc should be in there already... (something along the
way must have changed - probably the streams) that caused this to be
noticed.

	Use openpty.
===================================================================
RCS file: /mit/krb5/.cvsroot/src/appl/bsd/configure.in,v
retrieving revision 5.38
diff -c -r5.38 configure.in
*** 5.38	1994/12/28 21:57:02
--- configure.in	1994/12/29 05:10:35
***************
*** 36,41 ****
--- 36,42 ----
  AC_FUNC_CHECK(setsid,AC_DEFINE(HAVE_SETSID))
  AC_FUNC_CHECK(line_push,AC_DEFINE(HAVE_LINE_PUSH))
  AC_FUNC_CHECK(ptsname,AC_DEFINE(HAVE_PTSNAME))
+ AC_FUNC_CHECK(openpty,AC_DEFINE(HAVE_OPENPTY))
  AC_HAVE_HEADERS(sys/filio.h sys/sockio.h unistd.h stdlib.h sys/label.h sys/tty.h ttyent.h lastlog.h sys/select.h sys/ptyvar.h)
  AC_REPLACE_FUNCS(getdtablesize)
  CHECK_SIGNALS
===================================================================
RCS file: /mit/krb5/.cvsroot/src/appl/bsd/krlogind.c,v
retrieving revision 5.35
diff -c -r5.35 krlogind.c
*** 5.35	1994/12/28 23:30:29
--- krlogind.c	1994/12/29 05:16:30
***************
*** 280,286 ****
  
  extern	int errno;
  int	reapchild();
! #if (!defined(__STDC__) && !defined(ultrix))
  char	*malloc();
  #endif
  char 	*progname;
--- 280,286 ----
  
  extern	int errno;
  int	reapchild();
! #if (!defined(__STDC__) && !defined(ultrix) && !defined(STDC_HEADERS))
  char	*malloc();
  #endif
  char 	*progname;
***************
*** 1381,1386 ****
--- 1381,1396 ----
  
  #ifdef HAVE_STREAMS
  
+ #ifdef HAVE_OPENPTY
+ 
+     int slavefd;
+ 
+     if(openpty(fd, &slavefd, slave, (struct termios *) 0,
+ 	       (struct winsize *) 0)) return 1;
+     return 0;
+ #else /* HAVE_OPENPTY */
+ 
+ 
  #ifdef sun
  #define PTY_MASTER "/dev/ptmx"
  #endif
***************
*** 1416,1422 ****
      ptynum = (int)(stb.st_rdev&0xFF);
      sprintf(slave, "/dev/ttyp%x", ptynum);
      return 0;
!     
  #else /* NOT STREAMS */
  
      for (c = 'p'; c <= 's'; c++) {
--- 1426,1432 ----
      ptynum = (int)(stb.st_rdev&0xFF);
      sprintf(slave, "/dev/ttyp%x", ptynum);
      return 0;
! #endif /* HAVE_OPENPTY */    
  #else /* NOT STREAMS */
  
      for (c = 'p'; c <= 's'; c++) {

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