升級 gentoo 的 perl 到 5.12.2 後 openwebmail 不能使用的問題

After upgrading my gentoo box’s perl to 5.12.2, the openwebmail dead. The basic result is in the 5.12 version there is no suidperl program.

To solve this, after reading related materiel, the step listing:

1
2
3
# cd {http root}/cgi-bin/openwebmail
# perl misc/tools/wrapsuid/wrapsuid.pl {http root}/cgi-bin/openwebmail
# grep "suidperl" ./.*.* | awk -F ':#' '{print $1}' | xargs sed -i 's/suidperl/perl/'

The step 2 will first change all the .pl files into hidden file and then make a wrapper written in C language. And the step 3 is for changing all the suidperl corresponding interpreter line to perl.

But after this I encounter another problem that there shown I must setuid to root in webpage while using it. The solution is to change owner to root again because the wrapper program broken it.

# chmod 4555 *.pl

And it works! All the material is from Openwebmail.

2 Replies to “升級 gentoo 的 perl 到 5.12.2 後 openwebmail 不能使用的問題”

  1. 在第三行會有grep “suidperl” ./..的問題
    會導致出現
    grep: ./..: Is a directory
    sed: no input files

    如果使用
    grep “suidperl” ./openwebmail-*.pl | awk -F ‘:#’ ‘{print $1}’ | xargs sed -i ‘s/suidperl/perl/’
    會不會比較好?

  2. 這是很懶的作法,其實出現那個錯誤提示沒有什麼影響就是。能被改的還是會被 sed 處理掉的。

Leave a Reply

Your email address will not be published. Required fields are marked *