Bug 34671 - mod_suexec not privileges(5) aware
Summary: mod_suexec not privileges(5) aware
Status: RESOLVED WONTFIX
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: mod_suexec (show other bugs)
Version: 2.0.52
Hardware: Sun Solaris
: P3 enhancement with 2 votes (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-04-29 01:11 UTC by Ceri Davies
Modified: 2009-05-24 15:29 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Ceri Davies 2005-04-29 01:11:33 UTC
Solaris 10 provides a mechanism for specifying fine-grained permissions that can
be used in the case of suexec to avoid the requirement of having the suexec
binary setuid.  However, httpd will check for the setuid bit on startup, making
this mechanism difficult to use (even though it works perfectly well).

For example, after the setuid bit is removed from the suexec wrapper below, the
suexec mechanism continues to work perfectly well, as the web server has
permission to change effective uid at will due to the proc_setid privilege.
Unfortunately, it is still necessary to set the setuid bit on the suexec wrapper
as otherwise the mechanism is not enabled.

$ id
uid=80(www) gid=80:(webservd)
$ ppriv -S $$
5672:	-pfsh
flags = <none>
		E: basic,net_privaddr,proc_setid
		I: basic,net_privaddr,proc_setid
		P: basic,net_privaddr,proc_setid
		L: zone
$ su -
# chmod u+s /usr/apache2/bin/suexec
# ^D
$ apachectl start
$ grep -i suexec /var/apache2/logs/error_log
[Fri Apr 29 00:06:58 2005] [notice] suEXEC mechanism enabled (wrapper:
/usr/apache2/bin/suexec)
$ su -
# chmod u-s /usr/apache2/bin/suexec
#
Comment 1 Paul Querna 2005-04-29 01:19:49 UTC
It is possible to do some things like this with other operating systems like
FreeBSD 5 and Linux w/ SELinux.

It would be nice if we could figure out someway of putting code that worked for
all of them into APR.
Comment 2 Philp M. Gollucci 2009-01-18 16:19:16 UTC
CC myself on FreeBSD related bugs
Comment 3 Nick Kew 2009-05-24 15:29:24 UTC
I would suggest that mod_privileges (in trunk) supersedes this enhancement request (and indeed the need for suexec on solaris/opensolaris).  Feel free to re-open if you disagree.