Subject: Re: Trying to talk to tty01 with cu...
To: William R. Dickson <wrd@awenet.com>
From: R. C. Dowdeswell <elric@mabelode.imrryr.org>
List: port-macppc
Date: 09/02/1999 12:02:04
On 936232389 seconds since the Beginning of the UNIX epoch
"William R. Dickson" wrote:
>
>On Wed, 1 Sep 1999, Bill Studenmund wrote:
>
>> Do you have read/write access on /dev/tty01? where's the "permission
>> denied" comming from?
>
>I've got a couple other guys who know more than I do (Jon Lennox and Bill
>Paul) looking at it, too.  They had me try:
>
>ktrace cu -l /dev/tty01 -s 9600
>
>...after turning off the getty on the port.  kdump produced this:
>
>5178 cu       CALL  open(0x186f008,0x6,0xb)
>5178 cu       NAMI  "/dev/tty01"
>5178 cu       RET   open -1 errno 13 Permission denied
>
>I do have read/write permission (I'm running it as root, I assume I should
>be able to read/write anything I want).

cu doesn't run as root, though.  cu is setuid uucp, and it really
wants the ttys to be owned by uucp.  The "locking" that it talks
about is pretty simple.

>> cu has always given me problems. Try tip instead.
>
>I added the following to /etc/remote (not quite sure I understand this
>part yet):
>
>     tty01|direct connection to printer port:\
>           :dv=/dev/tty01:dc:
>
>and then I did:
>
>     tip tty01
>
>...and got:
>
>     /dev/tty01: Permission denied
>     link down
>
>Does this inspire any more ideas?
>
>-Bill

Same thing.  Tip is setuid uucp and can't open the files if they aren't
owned by uucp.

 == Roland Dowdeswell                      http://www.Imrryr.ORG/~elric/  ==
 == The Unofficial NetBSD Web Pages        http://www.Imrryr.ORG/NetBSD/  ==
 == The NetBSD Project                            http://www.NetBSD.ORG/  ==