X-Git-Url: http://git.vanrenterghem.biz/git.ikiwiki.info.git/blobdiff_plain/1c5a3f2c67c153a57439bce02f320e6e950a58ea..778d9e50d41d7ed2c1b2a2bf5cad52f089c94122:/IkiWiki/Receive.pm diff --git a/IkiWiki/Receive.pm b/IkiWiki/Receive.pm index c73adfbbb..332ba7c2c 100644 --- a/IkiWiki/Receive.pm +++ b/IkiWiki/Receive.pm @@ -35,12 +35,19 @@ EOF } "u != $uid"; } @{$config{untrusted_committers}}). - ") exit(0);\n"; + ") {\n"; $ret.=<<"EOF"; - asprintf(&s, "CALLER_UID=%i", u); - newenviron[i++]=s; + /* Trusted user. + * Consume all stdin before exiting, as git may + * otherwise be unhappy. */ + char buf[256]; + while (read(0, &buf, 256) != 0) {} + exit(0); + } + asprintf(&s, "%i", u); + addenv("CALLER_UID", s); } EOF return $ret;