@matheusbsbs / matheus-bagliano / commits / 39407304f1
Fork 0

git-instaweb: pass through invoking user's path to gitweb CGI scripts

When used with lighttpd or mongoose, git-instaweb previously passed a hard-coded, default value of PATH to the gitweb CGI script. Use the invoking user's value for PATH for this instead. (This is already implicitly the behaviour for other web servers supported by git-instaweb.) Signed-off-by: Chris Webb <chris@arachsys.com> Acked-by: Eric Wong <normalperson@yhbt.net>

Chris Webb committed Apr 15, 2010 at 14:29 UTC 39407304f11b4ae1977acd9875b9b8540bff2874
1 file changed +2 -2
git-instaweb.sh
+2 -2
@@ -212,7 +212,7 @@ server.errorlog = "$fqgitdir/gitweb/error.log"
212 # variable above and uncomment this
213 #accesslog.filename = "$fqgitdir/gitweb/access.log"
214
215 -setenv.add-environment = ( "PATH" => "/usr/local/bin:/usr/bin:/bin" )
215 +setenv.add-environment = ( "PATH" => env.PATH )
216
217 cgi.assign = ( ".cgi" => "" )
218
@@ -361,7 +361,7 @@ error_log $fqgitdir/gitweb/error.log
361 access_log $fqgitdir/gitweb/access.log
362
363 #cgi setup
364 -cgi_env PATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
364 +cgi_env PATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH
365 cgi_interp $PERL
366 cgi_ext cgi,pl
367