Subject: kinit not asking for password, revisited
To: None <port-i386@NetBSD.ORG>
From: George <george@snork.org>
List: port-i386
Date: 04/23/1998 22:26:37
I've not yet resolved this problem with kinit, but my debugging
skills are getting more sophisticated :-)
Problem:
porter% kinit glc5
NetBSD Kerberos (porter)
Kerberos Initialization for "glc5"
kinit: Password incorrect
I checked with tcpdump, and kinit is happily chatting with the remote
kerberos server. So, I ktraced the above command. The interesting bit
is:
15290 kinit NAMI "/dev/tty"
15290 kinit RET open 3
15290 kinit CALL ioctl(0x3,TIOCGETP,0xefbfbba8)
15290 kinit RET ioctl -1 errno 25 Inappropriate ioctl for device
So, I looked up error 25 in errno.h, and it's ENOTTY.
man ioctl shows:
[ENOTTY] d is not associated with a character special device.
[ENOTTY] The specified request does not apply to the kind of object
that the descriptor d references.
The first case is right out, as /dev/tty is a character device. (Yes, I've
tried MAKEDEV'ing it. I even echoed some text to /dev/tty to make sure
that it works, and it does.). So that leaves the second error. Grepping
for TIOCGETP shows up in ioctl_compat.h, and that's where my comprehension
of things stops. The only salient line is:
#define TIOCGETP _IOR('t', 8,struct sgttyb)/* get parameters -- gtty */
Can anyone tell me what's going on ? :-)
Oh yeah, this is on vanilla 1.3.
--
George L. Coulouris - http://www.tc.cornell.edu/~glc5/
NetBSD 1.3 - free, multiplatform unix. http://www.netbsd.org/