Commit 6bc4423f authored by Alex Kelly's avatar Alex Kelly
Browse files

Fixed variable reference

parent 115725da
...@@ -5,8 +5,8 @@ use strict; ...@@ -5,8 +5,8 @@ use strict;
use POSIX; use POSIX;
use Getopt::Long; use Getopt::Long;
our $opt_user = 'apache'; our $opt_user = '__APACHEUSER__';
our $opt_group = 'apache'; our $opt_group = '__APACHEGROUP';
GetOptions ( GetOptions (
"user=s" => \$opt_user, "user=s" => \$opt_user,
"group=s" => \$opt_group "group=s" => \$opt_group
...@@ -16,8 +16,8 @@ or die("Error in command line arguments\n"); ...@@ -16,8 +16,8 @@ or die("Error in command line arguments\n");
my $action; my $action;
eval { eval {
POSIX::setgid( scalar( getgrnam('__APACHEGROUP__') ) ); POSIX::setgid( scalar( getgrnam($opt_group) ) );
POSIX::setuid( scalar( getpwnam('__APACHEUSER__') ) ); POSIX::setuid( scalar( getpwnam($opt_user) ) );
}; };
for ( my $i = 0 ; $i < @ARGV ; $i++ ) { for ( my $i = 0 ; $i < @ARGV ; $i++ ) {
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment