Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 31 Mar 1998 14:48:40 -0500
From:      Howard Goldstein <hgoldste@bbs.mpcs.com>
To:        freebsd-questions@FreeBSD.ORG, freebsd-isp@FreeBSD.ORG
Cc:        dwhite@resnet.uoregon.edu
Subject:   Re: SLIP - stupid TIOCSCTTY question
Message-ID:  <199803311948.OAA11862@bbs.mpcs.com>
In-Reply-To: <Pine.BSF.3.96.980331112743.5583S-100000@gdi.uoregon.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Doug White <white@resnet.uoregon.edu> wrote:
 : 
 : On Tue, 31 Mar 1998, Howard Goldstein wrote:
 : 
 : > In attempting to put a wooden stake through the heart of an aged
 : > linux server that serves up ppp and slip customers we've nailed
 : > ppp but slattach is whining about ioctl(TIOCSCTTY): Operation not permitted
 : 
 : ``Operation not permitted'' is the magic phrase that says ``You must be
 : root to do this.''


That's what my colleague who lives at the modem bank (free air
conditioning?) thought too, but it seems /sys/kern/tty.c is looking
for some other stuff.

FWIW,

test:~# ls -l /sbin/slattach 
-r-xr-xr-x  1 bin  bin  61440 Oct 21 10:17 /sbin/slattach
test:~# tty
/dev/ttyp0
test:~# id
uid=0(root) gid=0(wheel) groups=0(wheel), 2(kmem), 3(sys), 4(tty), 5(operator), 20(staff), 31(guest), 77(adminlst)
test:~# /sbin/slattach ttyp0
/var/run/slattach.ttyp0.pid
test:~# tail -1 /var/log/messages
Mar 31 14:34:58 test slattach[25716]: ioctl(TIOCSCTTY): Operation not permitted
test:~#


GRRRR turns out the problem is a conflict with owning processes.  Fix
is to make sure there isn't a shell that thinks it owns it.  Unlike
for ex pppd, slattach reasonably wants to be the one in charge of the
device.

test:~# slattach cuaa9
/var/run/slattach.ttyp0.pid
test:~# tail -1 /var/log/messages 
Mar 31 14:45:39 test slattach[25731]: sl0 connected to /dev//cuaa9 at 9600 baud

Thanks Doug



To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-isp" in the body of the message



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199803311948.OAA11862>