Re: [PATCH] be paranoid about closed stdin/stdout/stderr
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 27, 2008, 17:27 UTC
- Message-ID
- <7vej4aqsge.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <48B54A3D.3080708@gnu.org>
Paolo Bonzini <bonzini@gnu.org> writes:
Show 7 quoted lines
>>> But it's harmless to have both. >> >> Considering the fact that daemon authors might not get pointed at their >> mistakes as soon as possible, it is harmful to try and hide those facts. > > Agree. OTOH what about opening fd's 0/1/2 to /dev/null only in > git-shell.c, now that it's not a builtin anymore?
Hmm, why git-shell?
It is either run by ssh (via command="" option in authorized_keys file), by init/login (if in /etc/passwd), or by gitosis (and its equivalent).
Wouldn't these callers already give it a sane environment (and if a lookalike to gitosis forgets to do so, wouldn't Stephen's argument not to hide the issue from the daemon writers apply)?