Re: Problem with setuid script starting pppd

2003-07-18 Thread Vincent Lefevre
On Tue, Jun 10, 2003 at 18:25:11 +0200, Vincent Lefevre wrote: > I have written a setuid/setgid-root Perl script that does the > following: > > #!/usr/bin/suidperl -T > > use strict; > use warnings; > > $ENV{'PATH'} = '/usr/sbin:/usr/bin:/sbin:/bin'; > > @ARGV == 1 and my ($isp) = $ARGV[0] =~ /

Re: Problem with setuid script starting pppd

2003-06-22 Thread Vincent Lefevre
On Fri, Jun 13, 2003 at 15:27:16 +0100, Ben Kal wrote: > I too do not immediately understand that. It looks like the 'and die' part > of the statement > system '/usr/sbin/pppd', 'call', $isp and die; > is executed regardless of the real success or failure of the pppd call > when the script runs t

Re: Problem with setuid script starting pppd

2003-06-13 Thread Ben Kal
On 10 Jun 2003 Vincent Lefevre <[EMAIL PROTECTED]> wrote: > I have written a setuid/setgid-root Perl script that does the following: > > #!/usr/bin/suidperl -T > > use strict; > use warnings; > > $ENV{'PATH'} = '/usr/sbin:/usr/bin:/sbin:/bin'; > > @ARGV == 1 and my ($isp) = $ARGV[0] =~ /^([-0-9A-Z

Problem with setuid script starting pppd

2003-06-10 Thread Vincent Lefevre
I have written a setuid/setgid-root Perl script that does the following: #!/usr/bin/suidperl -T use strict; use warnings; $ENV{'PATH'} = '/usr/sbin:/usr/bin:/sbin:/bin'; @ARGV == 1 and my ($isp) = $ARGV[0] =~ /^([-0-9A-Za-z_]+)$/ or die "Usage: ppp-on \n"; $< = $>; # set real to effective u