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)