[1982] in Kerberos-V5-bugs
PTY Problems on HPUX 10.10
daemon@ATHENA.MIT.EDU (Doug Engert)
Tue Jun 11 11:40:46 1996
Date: Tue, 11 Jun 1996 10:40:39 -0500
From: Doug Engert <DEEngert@anl.gov>
To: krb5-bugs@MIT.EDU
HP has added a utmpx.h and a setutxent routine in the HPUX 10.10
release which was not in the HPUX 10.01 release.
Output of configure from K5.6 on HPUX 10.10 (hp800 series)
+216 checking for utmpx.h... yes
+217 checking for utmp.h... yes
+242 checking for setutent... yes
+243 checking for setutxent... yes
+244 checking for updwtmp... no
+245 checking for updwtmpx... no
Output of configure from January snapshot on HPUX 10.01
+194 checking for utmpx.h... no
+195 checking for utmp.h... yes
+219 checking for setutent... yes
+220 checking for setutxent... no
+221 checking for updwtmp... no
+222 checking for updwtmpx... no
But they did not add a updwtmpx routine. If they did it is not in the
standard libraries.
This causes compile problems in src/util/pty/update_utmp.c and
update_wtmp.c, and src/appl/telnet/telnetd/sys_term.c
In telnetd gives the following errors:
.../telnetd/sys_term.c:901: conflicting types for `wtmp'
.../telnetd/sys_term.c:65: previous declarationof `wtmp'
.../telnetd/sys_term.c:901: storage size of `wtmp' isn't known
Thats from :
+63 # ifdef UTMPX
+64 # include <utmpx.h>
+65 struct utmpx wtmp;
+66 # else
+900 # ifndef NEWINIT
+901 extern struct utmp wtmp;
+902 extern char wtmpf[];
So since UTMPX is defined and NEWINIT is not, wtmp is defined twice.
As a temp solution to the telnetd, I will try undefining UTMPX in the
telnetd make file. It compiles at least.
For the util/pty, the following seams to work:
*** ,update_utmp.c Tue Apr 16 21:11:19 1996
--- update_utmp.c Mon Jun 10 16:45:49 1996
***************
*** 124,129 ****
--- 124,130 ----
pututline(&ent);
endutent();
+ #ifdef HAVE_UPDWTMPX
#ifdef HAVE_SETUTXENT
setutxent();
getutmpx(&ent, &utx);
***************
*** 134,139 ****
--- 135,141 ----
pututxline(&utx);
endutxent();
#endif /* HAVE_SETUTXENT */
+ #endif
#else /* HAVE_SETUTENT */
if (flags&PTY_TTYSLOT_USABLE)
*** ,update_wtmp.c Tue Apr 16 21:11:22 1996
--- update_wtmp.c Tue Jun 11 07:17:30 1996
***************
*** 40,45 ****
--- 40,46 ----
struct utmp ut;
struct stat statb;
int fd;
+ #ifdef HAVE_UPDWTMPX
#ifdef HAVE_SETUTXENT
struct utmpx utx;
***************
*** 51,56 ****
--- 52,58 ----
if (user)
strncpy(utx.ut_user, user, sizeof(utx.ut_user));
updwtmpx(WTMPX_FILE, &utx);
+ #endif
#endif
#ifdef HAVE_UPDWTMP
----------------------------------------------------------
I ran into another problem on the HP when using the krlogind. The
output did not have a NL/CR and would not line up correctly. The
output of stty -a showed -onlcr.
I did not have this problem with the January snapshot. The difference
appears to come from util/pty/getpty.c, where a
*fd = open(" /dev/ptym/clone", O_RDWR|O_NDELAY); /* HPUX*/
was added.
The HP appears to have both a non-streams and a streams driver. The use
of the "/dev/ptym/clone" gets the none streams driver, as shown by the
device name of "ttyp1".
With the January snapshot, the open was done with:
*fd = open("/dev/ptmx", O_RDWR|O_NDELAY);
which would get a streams version of the driver. (it used "pts/0")
It looks like the default settings of the c_oflag with the two drivers
is different, i.e. the opost and onlcr are not set in the non-streams
driver, where as they appear to be in the streams driver.
With the krlogind.c I have defined DO_NOT_USE_K_LOGIN and USE_LOGIN_F
as I am using the vendors login, which does not set these either. So
as a test I added
"new_termio.c_oflag |= (OPOST|ONLCR);"
This appears to work.
The question then is which is the preferred driver to use, the streams
or none streams driver?
I would prefer to see the streams driver, and the streams driver does
work, as shown by the January snapshot. Which does not need the
c_oflag to be set in krlogind.c. Maybe switching the order of the
opens in getpty.c would be all that is needed.
(I now have K5.6 running (the clients with rlogin/krlogind) in AIX
4.1.4 and HPUX 10.10 using the HP DCE security server as the KDC, and
can forward tickets to get a DCE context on the HPUX. AIX has a DCE
problem so that part is not done yet. I also have it built on SunOS
4.1.2 and Solaris 2.4 but not tested.)
Douglas E. Engert <DEEngert@anl.gov>
Argonne National Laboratory
9700 South Cass Avenue
Argonne, Illinois 60439
(708) 252-5444
PGP Key fingerprint = 20 2B 0C 78 43 8A 9C A6 29 F7 A3 6D 5E 30 A6 7F
i