
Problem: setuid script calling program that forks (I think :)
Quote:
>>#!/usr/bin/perl
>>$< = $>;
>>$( = $);
>>exec "/sbin/dip /usr/local/etc/wu.dip";
>># Set clock
>>exec "/usr/sbin/netdate ns";
>Hmmm .. where is the fork?
The fork is in dip itself. Near as I can tell, dip dials the modem,
makes the connection, then forks to do the actual interface config and
route setup. At least these are the parts that I get errors on when I
run it under a non-root account (and yes, I'm pretty sure I have the
protection of the script set correctly; dip won't normally run at all
unless you're root).
Quote:
>If your problem is that dip works but netdate doesn't, just remember
>that netdate is never executed!
Yes, sorry about that :-). I had been using system(), but changed to
exec() to see if it made any difference. I forgot to change it back
before I posted. But no, the problem isn't that netdate doesn't run.
It's a privilege violation inside dip itself. I've been assuming that
it's because the process that dip forks is no longer running as root.
--
John A. Breen | I teleported home one night with Ron & Sid & Meg.
| - Douglas Adams