Technical article 110523

Users cannot 'cu' to the modem port when /etc/getty is enabled for incoming faxes.

OpenServer 5.0.0OpenServer 5.0.2OpenServer 5.0.4OpenServer 5.0.5OpenServer 5.0.6

Written · Last revised

Problem

When a serial port is enabled, and getty has been instructed to listen for fax transmissions with the '-f' option, users are not able to use 'cu' on that same port even when the modem is idle.

Cause

Under these circumstances, /etc/getty will never release
the lock file on the modem port.  /etc/getty cannot release
the port for non-root users to be able to 'cu' to the modem port
and/or place outgoing calls.

Solution

The /etc/getty process for the port needs to be sent a SIGUSR1 signal to suspend itself, allowing non-root users access to the port.

If it is absolutely necessary to obtain this functionality, a
'wrapper script' compiled into an executable program with owner
set to root, and the SETUID bit set, would allow non-root users
to gain access to the port for outgoing calls.  The program would
send a SIGUSR1 to the appropriate getty process, then immediately
call the 'cu' program.

Care should be taken to switch the process back to the real UID after the signal, otherwise non-root users may be able to place files in unwanted directories.

See also

Manual pages signal(S), setuid(S), gettyacts(F), getty(M), dial(S), atdialer(C)

From the Xinuos technical article database, record 110523. Reproduced with permission. The original is at www.sco.com/ta/110523, which is reachable but blocked from search engines. Xinuos marks this article against a retired product line. That refers to the product’s lifecycle, not to whether the advice still works — plenty of it still applies to running systems.

Next step

Need this fixed rather than explained?

Tell us the release, what the system runs and what it is doing. We will reply by email with what we would do next.

  • You deal with the people who do the work
  • No obligation, and no upgrade required before we will help
  • We tell you plainly if something is not worth doing

Send an enquiry

We reply by email. If a server is down, say so in the first line. You can also write to help@scoexpert.com.