gryf has asked for the wisdom of the Perl Monks concerning the following question:
Here's the shell response:#!/usr/bin/perl -w use Data::Dumper; use CGI qw/:standard/; use CGI::Carp 'fatalsToBrowser'; use strict; $ENV{'PATH'} = '/bin:/usr/bin'; delete @ENV{'IFS', 'CDPATH', 'ENV', 'BASH_ENV'}; my $cmd = qq(rsh case3 /home/dncms/bin/testForwardLookup.pl case3 &|); my $result = ""; print header; print "running {$cmd}\n"; open(FOO,$cmd) || die "Failed to run $cmd: $!"; while (<FOO>) { print "feh: "; $result .= "$_\n"; } close(FOO); print ( $result );
Here's the sum total of the web response:dncms@alien 531 > perl foo.pl Content-Type: text/html; charset=ISO-8859-1 running {rsh case3 /home/dncms/bin/testForwardLookup.pl case3 &|} feh: 130.42.0.117
It doesn't seem to matter whether I use setguid or not. Does anyone have an idea of what I'm doing wrong? Thanks!running {rsh case3 /home/dncms/bin/testForwardLookup.pl case3 &|}
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: shell redirect CGI failure
by ikegami (Patriarch) on Sep 10, 2007 at 17:00 UTC | |
by throop (Chaplain) on Sep 10, 2007 at 17:48 UTC | |
by ikegami (Patriarch) on Sep 10, 2007 at 18:03 UTC | |
|
Re: shell redirect CGI failure
by sauoq (Abbot) on Sep 10, 2007 at 17:56 UTC | |
|
Re: shell redirect CGI failure
by ikegami (Patriarch) on Sep 10, 2007 at 18:06 UTC | |
by gryf (Novice) on Sep 11, 2007 at 16:10 UTC | |
by ikegami (Patriarch) on Sep 11, 2007 at 16:19 UTC |