{"thread":{"id":"23477","subject":"[PATCH] git-instaweb: pass through invoking user's path to gitweb CGI scripts","startedAt":"2010-04-15T13:29:45Z","lastAt":"2010-04-17T17:32:47Z","messageCount":3,"participants":["Chris Webb","Eric Wong","Junio C Hamano"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"139588","messageId":"59ee8c7a3052ed747b5dbaa0a1d0e51aded9c413.1271337968.git.chris@arachsys.com","threadId":"23477","inReplyTo":null,"subject":"[PATCH] git-instaweb: pass through invoking user's path to gitweb CGI scripts","fromName":"Chris Webb","fromEmail":"chris@arachsys.com","sentAt":"2010-04-15T13:29:45Z","receivedAt":"2010-04-15T13:29:45Z","isPatch":true,"sender":{"key":"chris@arachsys.com","avatar":"https://avatars.githubusercontent.com/u/299056?v=4"},"body":"When used with lighttpd or mongoose, git-instaweb previously passed a\nhard-coded, default value of PATH to the gitweb CGI script. Use the invoking\nuser's value for PATH for this instead. (This is already implicitly the\nbehaviour for other web servers supported by git-instaweb.)\n\nSigned-off-by: Chris Webb <chris@arachsys.com>\n---\n git-instaweb.sh |    4 ++--\n 1 files changed, 2 insertions(+), 2 deletions(-)\n\ndiff --git a/git-instaweb.sh b/git-instaweb.sh\nindex d4941a9..f608014 100755\n--- a/git-instaweb.sh\n+++ b/git-instaweb.sh\n@@ -212,7 +212,7 @@ server.errorlog = \"$fqgitdir/gitweb/error.log\"\n # variable above and uncomment this\n #accesslog.filename = \"$fqgitdir/gitweb/access.log\"\n \n-setenv.add-environment = ( \"PATH\" => \"/usr/local/bin:/usr/bin:/bin\" )\n+setenv.add-environment = ( \"PATH\" => env.PATH )\n \n cgi.assign = ( \".cgi\" => \"\" )\n \n@@ -361,7 +361,7 @@ error_log\t$fqgitdir/gitweb/error.log\n access_log\t$fqgitdir/gitweb/access.log\n \n #cgi setup\n-cgi_env\t\tPATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH\n+cgi_env\t\tPATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH\n cgi_interp\t$PERL\n cgi_ext\t\tcgi,pl\n \n-- \n1.7.0.3\n"},{"id":"139654","messageId":"20100416063432.GA27115@dcvr.yhbt.net","threadId":"23477","inReplyTo":"59ee8c7a3052ed747b5dbaa0a1d0e51aded9c413.1271337968.git.chris@arachsys.com","subject":"Re: [PATCH] git-instaweb: pass through invoking user's path to gitweb CGI scripts","fromName":"Eric Wong","fromEmail":"normalperson@yhbt.net","sentAt":"2010-04-16T06:34:32Z","receivedAt":"2010-04-16T06:34:32Z","isPatch":true,"sender":{"key":"e@80x24.org","avatar":null},"body":"Chris Webb <chris@arachsys.com> wrote:\n> When used with lighttpd or mongoose, git-instaweb previously passed a\n> hard-coded, default value of PATH to the gitweb CGI script. Use the invoking\n> user's value for PATH for this instead. (This is already implicitly the\n> behaviour for other web servers supported by git-instaweb.)\n> \n> Signed-off-by: Chris Webb <chris@arachsys.com>\n\nLooks good to me, thanks Chris.\n\nAcked-by: Eric Wong <normalperson@yhbt.net>\n\n> ---\n>  git-instaweb.sh |    4 ++--\n>  1 files changed, 2 insertions(+), 2 deletions(-)\n> \n> diff --git a/git-instaweb.sh b/git-instaweb.sh\n> index d4941a9..f608014 100755\n> --- a/git-instaweb.sh\n> +++ b/git-instaweb.sh\n> @@ -212,7 +212,7 @@ server.errorlog = \"$fqgitdir/gitweb/error.log\"\n>  # variable above and uncomment this\n>  #accesslog.filename = \"$fqgitdir/gitweb/access.log\"\n>  \n> -setenv.add-environment = ( \"PATH\" => \"/usr/local/bin:/usr/bin:/bin\" )\n> +setenv.add-environment = ( \"PATH\" => env.PATH )\n>  \n>  cgi.assign = ( \".cgi\" => \"\" )\n>  \n> @@ -361,7 +361,7 @@ error_log\t$fqgitdir/gitweb/error.log\n>  access_log\t$fqgitdir/gitweb/access.log\n>  \n>  #cgi setup\n> -cgi_env\t\tPATH=/usr/local/bin:/usr/bin:/bin,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH\n> +cgi_env\t\tPATH=$PATH,GIT_DIR=$GIT_DIR,GIT_EXEC_PATH=$GIT_EXEC_PATH\n>  cgi_interp\t$PERL\n>  cgi_ext\t\tcgi,pl\n>  \n> -- \n> 1.7.0.3\n> \n"},{"id":"139763","messageId":"7vd3xy2dds.fsf@alter.siamese.dyndns.org","threadId":"23477","inReplyTo":"59ee8c7a3052ed747b5dbaa0a1d0e51aded9c413.1271337968.git.chris@arachsys.com","subject":"Re: [PATCH] git-instaweb: pass through invoking user's path to gitweb CGI scripts","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2010-04-17T17:32:47Z","receivedAt":"2010-04-17T17:32:47Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Thanks, both.  Will queue.\n"}]}