*BSD News Article 34573


Return to BSD News archive

Path: sserve!newshost.anu.edu.au!harbinger.cc.monash.edu.au!bunyip.cc.uq.oz.au!munnari.oz.au!ihnp4.ucsd.edu!agate!howland.reston.ans.net!news.cac.psu.edu!news.umi.com!jbrown!jbrown
From: jbrown@umi.com (Jim Brown)
Newsgroups: comp.os.386bsd.questions
Subject: Re: Does 'route flush' work?
Date: Thu, 18 Aug 1994 13:47:38
Organization: University Microfilms Inc.
Lines: 38
Message-ID: <jbrown.70.000DCBAF@umi.com>
References: <CuqIwJ.7MM@usenet.ucs.indiana.edu>
NNTP-Posting-Host: someone.umi.com
X-Newsreader: Trumpet for Windows [Version 1.0 Rev A]

In article <CuqIwJ.7MM@usenet.ucs.indiana.edu> pitts@mimosa.astro.indiana.edu (Jim Pitts) writes:
>From: pitts@mimosa.astro.indiana.edu (Jim Pitts)
>Subject: Does 'route flush' work?
>Date: Thu, 18 Aug 1994 14:29:07 GMT

>Hi,

>I am running the 1.1.5.1 release of FreeBSD.  I have just finished a neat
>series of scripts.  My machine is connected to a host via uucp.  There are
>also ppp dialup lines I have access to.  When I want to get to my machine
>from work via ppp, I just uucp a file named 'startppp'.  In 15 minutes
>the machine mails me a copy of the output of 'netstat -r' to tell me what
>IP number the ppp server assigned it.  After I am done, I touch a file in the
>uucppublic directory called 'stopppp' and within 10 minutes the connection is
>terminated with the machine going back to ppp.

>I want to flush the routing table after all this is done.  Trouble is that
>the command 'route flush' does not seem to do anything.


You have to be root to use the route add/delete/flush commands.
You will have to modify your script to run setuid root (<--A SECURITY HOLE)
or write a wrapper C program to call route that you can make setuid root.



>Any help here?

>-- 
>- pitts@mimosa.astro.indiana.edu            ^       | James J. Pitts        -
>- Most people are cattle.  In every        /@\      | IU Physics Dept       -
>- generation, a few leaders are born.     /   \     | Voice:   812-855-8247 -
>- I am such a leader.                    /_____\    | FAX  :   812-855-5533 -

== jbrown@umi.com , in real life Jim Brown   |                          ==
== 300 N. Zeeb Rd. Ann Arbor, MI 48106 (USA) |    Sit up straight.      ==
== (313) 761-4700 x3227                      |    You're slouching...   ==
================ All opinions and comment expressly my own. ==============