Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 25 Mar 1995 23:01:20 -0600 (CST)
From:      John Lind <john@starfire.mn.org>
To:        FreeBSD-questions@FreeBSD.org (FreeBSD questions)
Subject:   setting ID's
Message-ID:  <199503260501.XAA23117@starfire.mn.org>

next in thread | raw e-mail | index | archive | help
This is on a FreeBSD 2.0 system, 2.0-950210-SNAP.

As a convenience, I tried to write a tiny little program to run as
root to execute a shell script to set up a SLIP link, including the
route commands.  The itty-bitty program just does a system() request
with the path to a shell script as the sole argument.  When this shell
script is run from a root login or su'ed shell, it works correctly,
but when invoked from this program which is
-rwsr-xr-x  root
the route command complains that it is not being run by root.  I even
tried setuid(geteuid()) but that didn't help at all.  I clearly do not
have a good understanding of real/effective/actual user ID's with
FreeBSD/BSD 4.4, and would appreciate any pointers to help me understand
better, as well as the immediate solution to my problem.  Thanks!

		   John Lind, Starfire Consulting Services
E-mail: john@starfire.MN.ORG		USnail: PO Box 17247, Mpls MN  55417



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