Re: using git directory cache code in darcs?
- From
- Paul Jackson <pj@sgi.com>
- Date
- Apr 18, 2005, 02:00 UTC
- Message-ID
- <20050417190001.7e1ae3ac.pj@sgi.com>
- In-Reply-To
- <7vvf6lugw7.fsf@assigned-by-dhcp.cox.net>
Junio wrote:
> What Linus is saying is that he wants you to talk with git > plumbing by invoking the executables he have, via system(3), > popen(3), etc.
Hopefully, Linus didn't specify system(3) or popen(3) for production software.
They are a rich source of security holes. Inefficient, too, since they invoke a shell process to interpret the command.
Use execve(2), or exevl(3), execle(3), execv(3).
Or if you really enjoy the path search, use execlp or execvp, but with your own $PATH, not trusting the one passed in via the environment any further than you can throw it.
However, on further consideration, I think Linus is wrong to recommend that the git executables, not a libgit library, be the 'basic user level on which all else is based."
I will reply to a Linus post, expounding on that thought further.
--
I won't rest till it's the best ...
Programmer, Linux Scalability
Paul Jackson <pj@engr.sgi.com> 1.650.933.1373, 1.925.600.0401