LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1437|回复: 2

关于"Insecure dependency" 的问题

[复制链接]
发表于 2003-12-5 12:41:55 | 显示全部楼层 |阅读模式
我在运行一个perl写的cgi的时候出现如下错误,

output from openssl command: Insecure dependency in system while running setgid at /usr/local/catool/lib/perl/Catool/Funcs.pm line 112.

看起来是perl不允许执行setgid,不知道应该怎么解决?

PS: 我的系统fedora,

# perl -v

This is perl, v5.8.1 built for i386-linux-thread-multi
发表于 2003-12-5 14:31:56 | 显示全部楼层
前因後果
http://www.dwheeler.com/secure-p ... O/avoid-setuid.html
------------------------------------------------------------------
7.6. Avoid Creating Setuid/Setgid Scripts

Many Unix-like systems, in particular Linux, simply ignore the setuid and setgid bits on scripts to avoid the race condition described earlier. Since support for setuid scripts varies on Unix-like systems, they're best avoided in new applications where possible. As a special case, Perl includes a special setup to support setuid Perl scripts, so using setuid and setgid is acceptable in Perl if you truly need this kind of functionality. If you need to support this kind of functionality in your own interpreter, examine how Perl does this. Otherwise, a simple approach is to ``wrap'' the script with a small setuid/setgid executable that creates a safe environment (e.g., clears and sets environment variables) and then calls the script (using the script's full path). Make sure that the script cannot be changed by an attacker! Shell scripting languages have additional problems, and really should not be setuid/setgid; see Section 10.4 for more information about this.


http://www.open.com.au/catool/faq.html
------------------------------------------------------------------
5. When I try to run catool on RedHat EL, I get an error about "Can't do setuid"
Some version of Linux are shipped without the suidperl support package, which allows catool ti run as setuid.

This will result in a browser error wghen you try to access the catool program, and an error in the web server log, something like this:

Can't do setuid
[Mon Oct  6 05:18:30 2003] [error] [client 210.49.153.39] Premature end of script headers: /var/www/cgi-bin/catool

You should install suidperl. RPM binaries of perl-suidperl are available
 楼主| 发表于 2003-12-9 23:58:42 | 显示全部楼层
不好意思,这两天很忙,没能上来看回复,谢谢楼上的兄弟了。
不过我有装perl-suidperl的,还是不行啊

[fog@fog-pc fog]$ rpm -qa|grep perl
perl-Filter-1.29-3
perl-HTML-Parser-3.26-17
perl-libxml-enno-1.02-29
perl-DBD-Pg-1.21-2
perl-libxml-perl-0.07-28
perl-Net-DNS-0.31-3.1
perl-5.8.0-88.4
perl-DateManip-5.40-30
perl-URI-1.21-7
perl-XML-Dumper-0.4-25
perl-XML-Twig-3.09-3
perl-SGMLSpm-1.03ii-11
perl-CPAN-1.61-88.4
perl-DBI-1.32-5
perl-Time-HiRes-1.38-3
perl-HTML-Tagset-3.03-28
perl-libwww-perl-5.65-6
perl-XML-Encoding-1.01-23
perl-CGI-2.81-88.4
newt-perl-1.08-4
mod_perl-1.99_09-10.ent
perl-DBD-MySQL-2.1021-3
perl-Digest-SHA1-2.01-15.1
perl-suidperl-5.8.0-88
perl-XML-Parser-2.31-15
perl-Digest-HMAC-1.01-11.1
perl-DB_File-1.804-88.4
perl-Parse-Yapp-1.05-30
perl-XML-Grove-0.46alpha-25

另外修正一下,我的系统是redhat AS3
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表