[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: Hook scripts run with empty environment

From: Justin Erenkrantz <justin_at_erenkrantz.com>
Date: 2004-12-22 20:15:18 CET

--On Wednesday, December 22, 2004 2:01 PM -0500 Greg Hudson <ghudson@MIT.EDU>
wrote:

> But doesn't the same argument apply to Subversion itself? And to CGI
> scripts which are run by httpd? httpd doesn't empty out the environment
> for those, does it?

Yes, it does. httpd always resets the environment for CGI scripts except for
a very small subset of environment variables. Most notably, PATH is retained:
see ap_add_common_vars in util_script.c. And, even then the #1 complaint we
always get with respect to CGI scripts is that the PATH differs from user to
user depending upon who starts it. (This causes chaos when you use sudo, etc.)

> Well, it sucks for a Kerberos-using site using file:// URLs. You can't
> use the user's Kerberos tickets from a hook script because the
> KRB5CCNAME environment variable is lost.

You wouldn't get that behavior with a CGI script either. Take a look at
printenv in the cgi-bin/ dir: it'll dump what is available. -- justin

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Wed Dec 22 20:16:34 2004

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.