all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Andy Wingo <wingo@igalia.com>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH] dmd: Add support for exec'ing processes as other users
Date: Thu, 20 Aug 2015 17:03:19 +0200	[thread overview]
Message-ID: <87lhd6ypc8.fsf@gnu.org> (raw)
In-Reply-To: <87bne8pcor.fsf@igalia.com> (Andy Wingo's message of "Sat, 15 Aug 2015 21:35:32 +0200")

Andy Wingo <wingo@igalia.com> skribis:

> The attached patch adds #:user and #:group kwargs to
> make-fork+exec-constructor in DMD, to allow DMD to change users before
> execing the sub-process.  I couldn't figure out how to make a proper
> test but it works for me and GeoClue.

Nice!

> The patch is formulated as a patch against Guix adding a DMD patch.  The
> DMD patch itself can be applied directly to DMD's git repo.  As they are
> maintained together AFAIU I guess this is the right thing?  Let me know.

I ended up doing it slightly differently: I pushed the patch to dmd,
then add the ‘patches’ field, which gets it over HTTP.

One thing we can do, but which is not very convenient, is to just add
whatever code we need in dmd in a module maintained in Guix, and then
have that module loaded wherever we need it.

For instance, ‘call-with-container’ will land in Guix itself, but we’ll
be able to use it to launch services in containers (BTW, I have “no
horse in the systemd race” either, but I think this flexibility we have
is Pretty Cool & Unprecedented™ :-)).

> ++     (when group
> ++       (catch #t
> ++         (lambda ()
> ++           (setgid (group:gid (getgr group))))

Maybe we should add:

  (setgroups #())

for good measure?

Thank you!

Ludo’.

      reply	other threads:[~2015-08-20 15:03 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-15 19:35 [PATCH] dmd: Add support for exec'ing processes as other users Andy Wingo
2015-08-20 15:03 ` Ludovic Courtès [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=87lhd6ypc8.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=wingo@igalia.com \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.