T
Tulan W. Hu
I have a C wraper program that has a setgid turned on.
The C wraper will call proper perl program with correct gid.
The perl program will exec another program based upon the $ARGV[0].
This works fine under perl 5.6. However, it stop working
when I recently upgraded to perl 5.8.2.
It gives me the following error
Insecure dependency in exec while running with -T switch at myprog line 26
If a user in the same group of the program, it works fine, but if a user is
not
in the the group, then it prints out the Insecure message.
Any suggestions? How can I make the exec work for a user not in the group?
c program
main() {
system("/path/prog1 /path/prog2");
}
/path/prog1:
#!/usr/bin/perl
use lib '/path/mylib';
use English;
delete @ENV{qw(IFS ENV)};
$ENV{PATH} = '/bin';
my $cmd = shift;
$EGID= $GID;
exec $cmd, 'arg1', 'arg2';
die "can't exec $cmd: $!";
/path/prog2:
#!/usr/bin/perl
print "hello $ARG[0] $ARG[1]\n";
The C wraper will call proper perl program with correct gid.
The perl program will exec another program based upon the $ARGV[0].
This works fine under perl 5.6. However, it stop working
when I recently upgraded to perl 5.8.2.
It gives me the following error
Insecure dependency in exec while running with -T switch at myprog line 26
If a user in the same group of the program, it works fine, but if a user is
not
in the the group, then it prints out the Insecure message.
Any suggestions? How can I make the exec work for a user not in the group?
c program
main() {
system("/path/prog1 /path/prog2");
}
/path/prog1:
#!/usr/bin/perl
use lib '/path/mylib';
use English;
delete @ENV{qw(IFS ENV)};
$ENV{PATH} = '/bin';
my $cmd = shift;
$EGID= $GID;
exec $cmd, 'arg1', 'arg2';
die "can't exec $cmd: $!";
/path/prog2:
#!/usr/bin/perl
print "hello $ARG[0] $ARG[1]\n";