caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Richard Jones <rich@annexia.org>
To: Inria Ocaml Mailing List <caml-list@inria.fr>
Subject: Re: [Caml-list] on ocaml and set-user-id programs
Date: Sun, 27 Mar 2005 16:33:52 +0100	[thread overview]
Message-ID: <20050327153352.GA22455@furbychan.cocan.org> (raw)
In-Reply-To: <20050327133423.GA10496@fistandantilus.takhisis.org>

On Sun, Mar 27, 2005 at 03:34:23PM +0200, Stefano Zacchiroli wrote:
> On Sun, Mar 27, 2005 at 12:31:57PM +0200, Kim Nguyen wrote:
> > Indeed. Maybe the ocaml distribution could provide such a wrapper.
> Yes, it would be cool.

There are many pitfalls to calling a setuid process (in general, not
just scripts).  For instance several years ago I wrote a setuid
program and I was pretty sure I'd covered every base.  But then I
discovered that signal handler masks actually get inherited across
exec(2), so if your program depends on signals, then it could fail if
someone passed an unexpected signal mask.  There are so many of these
strange dependencies (IFS, PATH, signals, BSD resources, ...) that I
like the userv[1] approach which bypasses the problems entirely.
Either that, or use sudo which is at least well understood.

Rich.

[1] http://www.chiark.greenend.org.uk/~ian/userv/

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com


      reply	other threads:[~2005-03-27 15:33 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-27 10:01 Stefano Zacchiroli
2005-03-27 10:31 ` [Caml-list] " Richard Jones
2005-03-27 10:31 ` Kim Nguyen
2005-03-27 13:34   ` Stefano Zacchiroli
2005-03-27 15:33     ` Richard Jones [this message]

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=20050327153352.GA22455@furbychan.cocan.org \
    --to=rich@annexia.org \
    --cc=caml-list@inria.fr \
    /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).