Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 15976 - mod_php doesn't set proper permissions on pear executable, security problem
Summary: mod_php doesn't set proper permissions on pear executable, security problem
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Server (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Ryan Phillips (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-02-19 00:03 UTC by Adam M.
Modified: 2003-04-21 09:01 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Adam M. 2003-02-19 00:03:40 UTC
After emerging mod_php, /usr/bin/pear is world-writeable. This has been fixed in
the php ebuild, but the problem remains in the mod_php ebuild. What's needed is
"chmod 755 /usr/bin/pear" in the pkg_postinst() function (see php ebuild for an
example).

Reproducible: Always
Steps to Reproduce:
Comment 1 Ryan Phillips (RETIRED) gentoo-dev 2003-02-24 16:53:11 UTC
committed.
Comment 2 Alessandro Pisani 2003-02-24 19:12:20 UTC
This have to be reopened: output of mod_php-4.3.1-r1 compilation says:
...
Installing header files:          /tmp/portage/mod_php-4.3.1-r1/image//usr/include/php/
Installing helper programs:       /tmp/portage/mod_php-4.3.1-r1/image//usr/bin/
  program: phpize
  program: php-config
  program: phpextdist
Installing build environment:     /tmp/portage/mod_php-4.3.1-r1/image//usr/lib/php/build/
mkdir: cannot create directory `/tmp/portage/mod_php-4.3.1-r1/image//usr/lib/php/build': File exists
chmod: failed to get attributes of `/tmp/portage/mod_php-4.3.1-r1/image//usr/bin/php/pear': No such file or directory
man:
strip:
...

so, conseguently, on my machine /usr/bin/pear will have permission 777 after the emerge.

problem:

#fix 15976
chmod 755 ${D}/usr/bin/php/pear

is in the WRONG section of the ebuild (src_install instead of pkg_postinstall)
solution: move it where Adam originally suggested.

please fix.
bye,
Alessandro