Re: [PATCH] be paranoid about closed stdin/stdout/stderr
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Aug 26, 2008, 22:42 UTC
- Message-ID
- <7vabez2yac.fsf@gitster.siamese.dyndns.org>
- In-Reply-To
- <48B44C61.2020206@gnu.org>
Paolo Bonzini <bonzini@gnu.org> writes:
Show 17 quoted lines
> Junio C Hamano wrote: >> Johannes Sixt <j.sixt@viscovery.net> writes: >> >>> Paolo Bonzini schrieb: >>>> + /* >>>> + * Always open file descriptors 0/1/2 to avoid clobbering files >>>> + * in die(). It also avoids not messing up when the pipes are >>>> + * dup'ed onto stdin/stdout/stderr in the child processes we spawn. >>>> + */ >>> I see your point, but I don't have an opinion whether this stretch is >>> necessary. >> >> This is going too far. Have you seen any other sane program that do this? > > Busybox. But it runs setuid, as Steven pointed out. > > I say it's all (i.e. be this paranoid), or nothing.
I tend to agree, and I think what Stephen R. van den Berg said earlier in the thread makes perfect sense.