Subject: Getty: inapproopriate ioctl (a diversion)
To: None <jaywon!!>
From: David Gilbert <pci!jaywon!>
List: current-users
Date: 01/16/1996 22:38:22
	While I'm working on the deivce drivers for my big serial
card, I have also been working on getting hylafax's faxgetty and
related stuff working with my uucp setup.  I have hit a snag.

	Is anyone out there using Hylafax and use that same modem to
accept inbound data calls?

	When Hylafax receives a data call, it calls /usr/libexec/getty
to handle the login.  However, getty dies immediately with "/dev/ttya:
Inappropriate ioctl for device." ....

	Now, I've tracked this down by inserting numbers in the calls
to syslog... (IMHO, each call to syslog in a program should be
distinct) and came up with the following bit of code as the problem:

	/* Start with default tty settings */
	if (tcgetattr(0, &tmode) < 0) {
		syslog(LOG_ERR, "%s:2 %m", ttyn);

	In my version of libexec/getty/main.c, this occurs at line
125.  I have tried setting the getty program suid (since faxgetty may
not run it as root, I don't think).  Curiously, when getty is run
against the port by itself (from init), there isn't any problem.



|David Gilbert, PCI, Richmond Hill, Ontario.  | Two things can only be     |
|Mail:                |  equal if and only if they |
|               |   are precisely opposite.  |