Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 79027

Summary: Pass KRB5_KTNAME to apache2
Product: Gentoo Linux Reporter: Fredrik Tolf <fredrik>
Component: [OLD] ServerAssignee: Apache Team - Bugzilla Reports <apache-bugs>
Status: RESOLVED DUPLICATE    
Severity: normal    
Priority: High    
Version: 2004.3   
Hardware: All   
OS: All   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: This patch changes /etc/init.d/apache2 to preserve KRB5_KTNAME.

Description Fredrik Tolf 2005-01-21 18:18:03 UTC
In /etc/init.d/apache2, the environment is cleared and PATH added to the new process executing apache. I think that the KRB5_KTNAME variable should also be preserved in this way, since it allows one to easily specify a seperate keytab for Apache, when used with mod_auth_kerb >=5. The system default keytab normally cannot be used by apache, since it shouldn't be readable by anyone but root. KRB5_KTNAME can then easily be defined in /etc/conf.d/apache2.

Specifying a keytab _can_ also be done with a configuration directive to mod_auth_kerb, but that doesn't work very well, since it has to be specified for each and every directory (and in each .htaccess). Whether this behavior is a bug or intended I don't know, but allowing KRB5_KTNAME to be passed through would allow for both behaviors either way.
Comment 1 Fredrik Tolf 2005-01-21 18:20:30 UTC
Created attachment 49152 [details, diff]
This patch changes /etc/init.d/apache2 to preserve KRB5_KTNAME.
Comment 2 Daniel Ceregatti 2005-03-24 12:41:39 UTC
There's an even greater problem here. The /etc/init.d/apache2 from apache-2.0.53 has this:

start() {
        checkconfig || return 1
        ebegin "Starting apache2"
        [ -f /var/log/apache2/ssl_scache ] && rm /var/log/apache2/ssl_scache
        [ -f /usr/lib/apache2/build/envvars ] && . /usr/lib/apache2/build/envvars
        ${APACHE2} ${APACHE2_OPTS} -k start
        eend $?
}

Sourcing /usr/lib/apache2/build/envvars in start() is futile if ${APACHE2} has "env -i ..." in it.
Comment 3 Michael Stewart (vericgar) (RETIRED) gentoo-dev 2005-07-11 21:04:05 UTC

*** This bug has been marked as a duplicate of 92891 ***