+Sat Mar 23 15:24:38 1996 Sam Hartman <hartmans@tertius.mit.edu>
+
+ * configure.in : Remove shadow passwords check because nothing in
+ libpty cares about the result; remove use of libkrb5, libkrb4,
+ libkadm; Check for _getpty
+
+ * getpty.c (pty_getpty): Support _getpty for Irix; Irix has
+ /dev/ptmx, but it doesn't work correctly at all. Also, Irix,
+ tends to create device nodes on the fly.
+
+ * pty-int.h: No need to include sys/socket.h
+
Sat Feb 24 21:34:58 1996 Theodore Y. Ts'o <tytso@dcl>
* vhangup.c (ptyint_vhangup): Don't do call vhangup() if system
AC_PROG_INSTALL
AC_PROG_ARCHIVE
AC_PROG_RANLIB
-AC_CHECK_FUNCS(fchmod fchown revoke vhangup killpg)
-dnl dbm libs for use of an_to_ln
+AC_CHECK_FUNCS(fchmod fchown revoke vhangup killpg _getpty)
+dnl
LOGINLIBS=
dnl
dnl Make our operating system-specific security checks and definitions for
fi
dnl
dnl
-AC_MSG_CHECKING([shadow password support])
-AC_CACHE_VAL(krb5_cv_shadow_pwd,
-[AC_TRY_LINK(
-[#include <sys/types.h>
-#include <pwd.h>
-#include <shadow.h>],
-[struct spwd *sp = getspnam("root")],
-krb5_cv_shadow_pwd=yes, krb5_cv_shadow_pwd=no)])
-AC_MSG_RESULT($krb5_cv_shadow_pwd)
-if test $krb5_cv_shadow_pwd = yes; then
-AC_DEFINE(HAVE_SHADOW)
-fi
-dnl
dnl
ADD_DEF(-DKERBEROS)
AC_CONST
-USE_KADM_LIBRARY
-USE_KRB4_LIBRARY
-KRB5_LIBRARIES
V5_USE_SHARED_LIB
SubdirLibraryRule([$(LIBOBJS)])
V5_AC_OUTPUT_MAKEFILE
/*
* pty_getpty: open a PTY master.
*
- * Copyright 1995 by the Massachusetts Institute of Technology.
+ * Copyright 1995, 1996 by the Massachusetts Institute of Technology.
*
*
* Permission to use, copy, modify, and distribute this software and
int i,ptynum;
struct stat stb;
char slavebuf[1024];
-
+#ifdef HAVE__GETPTY
+char *slaveret; /*Temporary to hold pointer to slave*/
+#endif /*HAVE__GETPTY*/
#ifdef HAVE_OPENPTY
int slavefd;
(struct winsize *) 0)) return 1;
close(slavefd);
return 0;
-#else
-
- *fd = open("/dev/ptmx", O_RDWR|O_NDELAY); /* Solaris, IRIX */
+#else /*HAVE_OPENPTY*/
+#ifdef HAVE__GETPTY
+ /* This code is included for Irix; as of version 5.3, Irix has /dev/ptmx,
+ * but it fails to work properly; even cafter calling unlockpt,
+ * root gets permission denied opening the pty.
+ * The code to support _getpty should be removed if Irix gets working
+ * streams ptys in favor of maintaining the least needed code
+ * paths.
+ */
+ if ((slaveret = _getpty(fd, O_RDWR|O_NDELAY, 0600, 0)) == 0) {
+ *fd = -1;
+ return PTY_GETPTY_NOPTY;
+ }
+ if (strlen(slaveret) > slavelength) {
+ close(*fd);
+ *fd = -1;
+ return PTY_GETPTY_SLAVE_TOOLONG;
+ }
+ else strcpy(slave, slaveret);
+ return 0;
+#else /*HAVE__GETPTY*/
+
+ *fd = open("/dev/ptmx", O_RDWR|O_NDELAY); /* Solaris*/
if (*fd < 0) *fd = open("/dev/ptc", O_RDWR|O_NDELAY); /* AIX */
if (*fd < 0) *fd = open("/dev/pty", O_RDWR|O_NDELAY); /* sysvimp */
}
return PTY_GETPTY_NOPTY;
}
+#endif /*HAVE__GETPTY*/
#endif /* HAVE_OPENPTY */
}