From: "Luis R. Rodriguez" <mcgrof@suse.com>
To: Cameron Norman <camerontnorman@gmail.com>
Cc: Lennart Poettering <mzxreary@0pointer.de>,
luto@mit.edu, Keir Fraser <keir@xen.org>,
Ian Campbell <Ian.Campbell@citrix.com>, Tim Deegan <tim@xen.org>,
Ian Jackson <ian.jackson@eu.citrix.com>,
linux-kernel@vger.kernel.org,
linux-security-module@vger.kernel.org, ebiederm@xmission.com,
Jan Beulich <jbeulich@suse.com>,
xen-devel@lists.xenproject.org,
systemd-devel@lists.freedesktop.org, morgan@kernel.org
Subject: Re: [systemd-devel] [PATCH v5 12/14] autoconf: xen: enable explicit preference option for xenstored preference
Date: Tue, 10 Jun 2014 03:15:58 +0200 [thread overview]
Message-ID: <20140610011558.GC6219@wotan.suse.de> (raw)
In-Reply-To: <CALZWFR+LQ3XK4RQ335CNqjr8zucWw4GieKwZS3N5m0w4yJXuBA@mail.gmail.com>
On Wed, Jun 04, 2014 at 07:52:56PM -0700, Cameron Norman wrote:
> On Wed, Jun 4, 2014 at 5:31 PM, Luis R. Rodriguez <mcgrof@suse.com> wrote:
> > On Sun, Jun 01, 2014 at 08:15:47AM +0200, Lennart Poettering wrote:
> >> On Fri, 30.05.14 01:29, Luis R. Rodriguez (mcgrof@suse.com) wrote:
> >>
> >> > I'm cc'ing a few security folks as I'd appreciate review on the ideas here,
> >> > in particular that of a launcher idea on system to replace alternatives on the
> >> > ExecStart= line of a systemd service unit file, alternative ideas are of
> >> > course welcomed. I'm also Cc'ing systemd-devel as this subject was reviewed
> >> > a little while ago with nothing concrete being recommended but instead a few
> >> > options being now archived as possibilities. I'm looking for a bit wider
> >> > review of the approaches and recomendations.
> >> >
> >> > Some general background for non xen folks: old xen requires the launch of
> >> > a daemon which implements supports of the xenstore, which is the database
> >> > that xen uses for information about guests / dom0. There are two supported
> >> > daemons, xenstored (C version) and oxenstored (Ocaml version) but they do the
> >> > same thing. Right now old init lets you override which one you pick through
> >> > an environment variable on /etc/{sysconfig,default}/xencommons, the script
> >> > will use the appropriate on there. Systemd doesn't let you use variables on
> >> > the ExecStart line of a service unit file so alternatives are required.
> >> >
> >> > The reason I'm being very careful here this could set a precedent and at
> >> > least for the launcher idea it'd require the usage of getenv() and execve(),
> >> > and secure alternatives for these (secure_getenv(), execve_nosecurity())
> >> > have either been merged or suggested before for Linux. The systemd discussion
> >> > is only specific to Linux but if we have a launcher we could consider it for
> >> > other supported OSes. All that said I'd like proper review of the security
> >> > implications of *all* strategies but obviously in particular the launcher
> >> > idea. I want to tread carefuly before setting precedents.
> >>
> >> You can also just invoke a shell script from ExecStart=. I mean, we try
> >> to deemphesize them in the boot process, but there's nothing wrong with
> >> using shell, if you need to parse shell configuraiton fragments and just
> >> want to execute on ot another program...
> >
> > I tried this and it didn't work given that systemd expects sd_notify()
> > to be called from the parent process, in this case the shell script.
>
> Just use exec before the daemon command. I am pretty certain it can be
> just like this:
>
> ExecStart=/bin/sh -c "exec $XENSTORED"
>
> xenstored then has the same PID as the sh process, and $NOTIFY_SOCKET
> works just fine.
Actually this does work on a test unit I just built. I'll proceed with
this approach since I haven't heard back from others and I think
this is the best approach now.
Luis
next prev parent reply other threads:[~2014-06-10 1:16 UTC|newest]
Thread overview: 71+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-20 12:31 [PATCH v5 00/14] xen: add systemd support Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 01/14] xenstored: enable usage of config.h on both xenstored and oxenstored Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 02/14] libxenstore.so: add support for systemd Luis R. Rodriguez
2014-05-21 14:35 ` Ian Campbell
2014-05-21 14:56 ` Ian Campbell
2014-05-21 16:32 ` Luis R. Rodriguez
2014-05-21 16:48 ` Ian Campbell
2014-05-21 17:15 ` Luis R. Rodriguez
2014-05-22 9:36 ` Ian Campbell
2014-05-22 9:59 ` Luis R. Rodriguez
2014-05-21 16:24 ` Luis R. Rodriguez
2014-05-21 16:39 ` Ian Campbell
2014-05-21 17:29 ` Luis R. Rodriguez
2014-05-22 9:39 ` Ian Campbell
2014-05-22 10:01 ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 03/14] cxenstored: add support for systemd active sockets Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 04/14] oxenstored: " Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 05/14] oxenstored: force FD_CLOEXEC with Unix.set_close_on_exec on LSB init Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 06/14] tools/xendomains: make xl the default Luis R. Rodriguez
2014-05-21 15:05 ` Ian Campbell
2014-05-21 17:29 ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 07/14] tools/xendomains: do space cleanups Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 08/14] tools/xendomains: move to libexec and use a smaller init helper Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 09/14] autoconf: xen: force a refresh with autoconf Luis R. Rodriguez
2014-05-21 15:07 ` Ian Campbell
2014-05-21 17:35 ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 10/14] autoconf: update m4/pkg.m4 Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 11/14] autoconf: xen: move standard variables to a generic place Luis R. Rodriguez
2014-05-20 13:37 ` Jan Beulich
[not found] ` <537B76D1020000780001422C@suse.com>
2014-05-20 17:54 ` Luis R. Rodriguez
2014-05-21 7:32 ` Jan Beulich
2014-05-21 8:03 ` Luis R. Rodriguez
2014-05-21 8:11 ` Jan Beulich
2014-05-21 8:27 ` Luis R. Rodriguez
2014-05-21 10:33 ` Ian Campbell
2014-05-21 13:54 ` Jan Beulich
2014-05-21 15:14 ` Ian Campbell
2014-05-21 15:20 ` Jan Beulich
2014-05-21 15:26 ` Ian Campbell
2014-05-21 21:54 ` Luis R. Rodriguez
2014-05-22 9:46 ` Ian Campbell
2014-05-20 12:31 ` [PATCH v5 12/14] autoconf: xen: enable explicit preference option for xenstored preference Luis R. Rodriguez
2014-05-21 15:44 ` Ian Campbell
2014-05-21 23:02 ` Luis R. Rodriguez
2014-05-22 10:05 ` Ian Campbell
2014-05-23 23:20 ` Luis R. Rodriguez
2014-05-28 9:30 ` Ian Campbell
2014-05-29 16:09 ` Don Koch
2014-05-29 23:29 ` Luis R. Rodriguez
2014-06-01 6:15 ` [systemd-devel] " Lennart Poettering
2014-06-05 0:31 ` Luis R. Rodriguez
2014-06-05 2:52 ` Cameron Norman
2014-06-10 1:15 ` Luis R. Rodriguez [this message]
2014-06-10 1:15 ` Luis R. Rodriguez
2014-06-05 2:52 ` Cameron Norman
2014-06-05 11:22 ` Lennart Poettering
2014-06-05 11:22 ` Lennart Poettering
2014-06-05 18:01 ` Luis R. Rodriguez
2014-06-05 19:24 ` Lennart Poettering
2014-06-05 19:26 ` Andrew Lutomirski
2014-06-05 19:26 ` Andrew Lutomirski
2014-06-05 19:24 ` Lennart Poettering
2014-06-05 18:01 ` Luis R. Rodriguez
2014-06-05 0:31 ` Luis R. Rodriguez
2014-06-01 6:15 ` Lennart Poettering
2014-05-29 23:29 ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 13/14] xencommons: move module list into a generic place Luis R. Rodriguez
2014-05-20 13:40 ` Jan Beulich
[not found] ` <537B776D020000780001425E@suse.com>
2014-05-20 18:03 ` Luis R. Rodriguez
2014-05-20 12:31 ` [PATCH v5 14/14] systemd: add xen systemd service and module files Luis R. Rodriguez
2014-05-20 12:48 ` Luis R. Rodriguez
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=20140610011558.GC6219@wotan.suse.de \
--to=mcgrof@suse.com \
--cc=Ian.Campbell@citrix.com \
--cc=camerontnorman@gmail.com \
--cc=ebiederm@xmission.com \
--cc=ian.jackson@eu.citrix.com \
--cc=jbeulich@suse.com \
--cc=keir@xen.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-security-module@vger.kernel.org \
--cc=luto@mit.edu \
--cc=morgan@kernel.org \
--cc=mzxreary@0pointer.de \
--cc=systemd-devel@lists.freedesktop.org \
--cc=tim@xen.org \
--cc=xen-devel@lists.xenproject.org \
/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 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.