git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Paul Jackson <pj@sgi.com>
To: Junio C Hamano <junkio@cox.net>
Cc: lkml@lazy.shacknet.nu, git@vger.kernel.org
Subject: Re: using git directory cache code in darcs?
Date: Sun, 17 Apr 2005 19:00:01 -0700	[thread overview]
Message-ID: <20050417190001.7e1ae3ac.pj@sgi.com> (raw)
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

  reply	other threads:[~2005-04-18  1:57 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-04-16 13:22 using git directory cache code in darcs? David Roundy
2005-04-16 13:31 ` Ingo Molnar
2005-04-16 14:28 ` Junio C Hamano
2005-04-16 22:43 ` Linus Torvalds
2005-04-17 12:17   ` David Roundy
2005-04-17 16:24     ` Linus Torvalds
2005-04-17 16:49       ` Mike Taht
2005-04-17 22:37       ` Nomad Arton
2005-04-17 23:23         ` Junio C Hamano
2005-04-18  2:00           ` Paul Jackson [this message]
2005-04-18  2:56       ` Paul Jackson
2005-04-18  3:06         ` Linus Torvalds
2005-04-18  4:36           ` Paul Jackson
2005-04-18  9:23             ` git options Mike Taht

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20050417190001.7e1ae3ac.pj@sgi.com \
    --to=pj@sgi.com \
    --cc=git@vger.kernel.org \
    --cc=junkio@cox.net \
    --cc=lkml@lazy.shacknet.nu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).