I have a perl file in cgi-bin dir, which needs to run a system command, which requires root priviledge. my apache server runs as user nobody, so i changed the setuid of the perl script (chmod 4711 xyz.pl ), when i run i get the below error
Insecure dependency in `` while running setuid at /dev/fd/5 line 31
the line 31 is
system(`/usr/apache/bin/htpasswd -b /asamsit/http/htpass/.htpasswd $user $passw
d`);
--------------------------------
my $user;
my $passwd;
print "User : $ENV{REMOTE_USER} \n";
$user = $ENV{REMOTE_USER};
$passwd = $form{pw};
print "<HR>";
print "new password : $form{pw} ";
system(`/usr/apache/bin/htpasswd -b /asamsit/http/htpass/.htpasswd $user $passw
d`);
print "</body></html>\n";
Insecure dependency in `` while running setuid at /dev/fd/5 line 31
the line 31 is
system(`/usr/apache/bin/htpasswd -b /asamsit/http/htpass/.htpasswd $user $passw
d`);
--------------------------------
my $user;
my $passwd;
print "User : $ENV{REMOTE_USER} \n";
$user = $ENV{REMOTE_USER};
$passwd = $form{pw};
print "<HR>";
print "new password : $form{pw} ";
system(`/usr/apache/bin/htpasswd -b /asamsit/http/htpass/.htpasswd $user $passw
d`);
print "</body></html>\n";