*BSD News Article 31982


Return to BSD News archive

Newsgroups: comp.os.386bsd.misc
Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!spool.mu.edu!howland.reston.ans.net!pipex!sunic!EU.net!uunet!psinntp!halon!sybase!jeffa
From: jeffa@sybase.com (Jeff Anuszczyk)
Subject: FreeBSD 1.1-RELEASE: Trouble with slip/ppp/suid
Message-ID: <CrrAMo.6JL@sybase.com>
Sender: usenet@sybase.com
Organization: Sybase, Inc.
Date: Tue, 21 Jun 1994 16:47:10 GMT
Lines: 81

I've recently been trying to upgrade from 1.0.2 to 1.1-RELEASE via the
FTP binary distribution (and system source distribution).  After doing this
I have run into the following problems:

	1) Installation of kermit with SUID/GUID doesn't seem to do anything.
	   I do this so that kermit can gain access to the /dev/cua* type
	   ports.  Basically I give ownership of the devices and kermit to
	   uucp/dialer and set the appropriate bits (6555) via chmod.  This
	   works just fine in 1.0.2 but doesn't seem to work at all in 1.1-R.  
	   Am I doing something wrong?

	2) My 1.0.2 scripts that I use to fire off a ppp and a slip session
	   don't work anymore.  Basically, for pppd, I have a chat script
	   that gets fired off by the connect statement as follows:

		pppd connect "$HOME/bin/ppp.chat" crtscts netmask 0xffffff00 \
			/dev/cua01 57600 0.0.0.0:

	   Worked fine in 1.0.2 (after alot of tinkering).  For 1.1-R, 
	   everything just sits there.  There is some initial activity (DTR 
	   comes on, TX/RX flicker a bit) and then nothing.  I tried 
	   converting it to a kermit script.  This script works just great
	   if I manually start kermit with the "-y" option and provide the
	   scriptname (it dials, connects, logs in and starts up ppp at the
	   remote end).  When I change the pppd to use this, everything hangs.
	   Eventually kermit exits becuase none of the script succeeds and 
	   pppd exists with a could not connect message.  The pppd command 
	   I'm using is something like (I don't remember the exact placement 
	   of the speed but I'm pretty sure it's okay):

		pppd connect "kermit -y $HOME/bin/ppp.kermrc \> /tmp/kermit.log"
			/dev/cua01 57600 0.0.0.0:

	   This won't even dial the modem... just sits there until kermit
	   exits.  Nothing in the kermit.log.  Ignore the quoting of the
	   kermit line, I've use both single and double quotes... I usually
	   use double becuase I actually use environment variables to indicate
	   which script to use (multiple sites being connected to).  Remember 
	   this works just fine if I do kermit from the command line.  Oh yea, 
	   I do a comcontrol bidir in rc.local.

	   For slip things are a bit better, both the chat script and the
	   kermit script will dialup, login and start slip (started up as
	   follows:)

		slattach -h -z -e "$HOME/bin/slip.chat" ...
		slattach -h -z -e "kermit -y $HOME/bin/slip.kermrc \> /tmp/...

	   Sorry about not providing all of the options, etc.  I can't exactly
	   remember them (easily provided if anyone wants them).  I'm pretty
	   sure that I have everything okay (I don't specify the "-l" option).

	   In any case, when I use these methods of starting slip, the modem 
	   will hang up as soon as the "dialer" program (kermit, chat) exit.
	   Slattach then indicates it got a SIGHUP from the modem and
	   relaunches the dialer program.  Doesn't the slattach program have
	   the device open?  If so why is the port DTR being toggled causing
	   the modem to hang up?

	   Now, I won't claim the above slip stuff works in 1.0.2.  It doesn't.
	   The only way I can convince slip to connect it to 1) start kermit 
	   in the background to grab the device (doesn't dial or anything, just
	   does a set line /dev/cua..), 2) start a chat script using 
	   redirection to affect the proper device and 3) start slip once chat 
	   finishes.  I believe the kermit prevents the port from toggling DTR 
	   and causing the modem to hangup (someone in the group need to have 
	   the device open at all times to stop this... the transition from 
	   chat to slattach will otherwise case the open count to go to 0 
	   making the modem hangup).

	   In any case, this really ugly script doesn't work in 1.1-R.  So
	   I've been trying to do this the "proper" way (which I didn't do
	   before because I couldn't get it to work).  Any ideas?

Thanks for any light anyone can shed on this,
   - Jeff
-- 
------------------------------------------------------------------------------
Jeffrey Anuszczyk     | email: jeffa@sybase.com  | All things being relative,
Sybase, Inc.	      | vmail: (617)238-6429     | I'd rather be moving fast.
77 So. Bedford St.    | Fax  : (617)238-6330     |