From: Eric Blake <eblake@redhat.com>
To: "Daniel P. Berrangé" <berrange@redhat.com>
Cc: vsementsov@virtuozzo.com,
"Richard W.M. Jones" <rjones@redhat.com>,
qemu-block@nongnu.org, qemu-devel@nongnu.org
Subject: Re: [PATCH v2] nbd/server: Add --selinux-label option
Date: Mon, 26 Jul 2021 09:22:54 -0500 [thread overview]
Message-ID: <20210726142254.ia7g2jt5gb36cb7u@redhat.com> (raw)
In-Reply-To: <YPqePyWeE9p6NkxR@redhat.com>
On Fri, Jul 23, 2021 at 11:47:51AM +0100, Daniel P. Berrangé wrote:
> On Fri, Jul 23, 2021 at 11:33:03AM +0100, Richard W.M. Jones wrote:
> > Under SELinux, Unix domain sockets have two labels. One is on the
> > disk and can be set with commands such as chcon(1). There is a
> > different label stored in memory (called the process label). This can
> > only be set by the process creating the socket. When using SELinux +
> > SVirt and wanting qemu to be able to connect to a qemu-nbd instance,
> > you must set both labels correctly first.
> >
> > For qemu-nbd the options to set the second label are awkward. You can
> > create the socket in a wrapper program and then exec into qemu-nbd.
> > Or you could try something with LD_PRELOAD.
> >
> > This commit adds the ability to set the label straightforwardly on the
> > command line, via the new --selinux-label flag. (The name of the flag
> > is the same as the equivalent nbdkit option.)
> >
> > A worked example showing how to use the new option can be found in
> > this bug: https://bugzilla.redhat.com/show_bug.cgi?id=1984938
> >
> > Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1984938
> > Signed-off-by: Richard W.M. Jones <rjones@redhat.com>
> > ---
> > configure | 9 ++++-
> > meson.build | 10 +++++-
> > meson_options.txt | 3 ++
> > qemu-nbd.c | 33 +++++++++++++++++++
> > tests/docker/dockerfiles/centos8.docker | 1 +
> > tests/docker/dockerfiles/fedora.docker | 1 +
> > tests/docker/dockerfiles/opensuse-leap.docker | 1 +
> > tests/docker/dockerfiles/ubuntu1804.docker | 1 +
> > tests/docker/dockerfiles/ubuntu2004.docker | 1 +
> > 9 files changed, 58 insertions(+), 2 deletions(-)
>
> Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Thanks. This is a new feature, so it doesn't qualify for inclusion in
6.1, but I'm queuing it through my NBD tree to go in as soon as
upstream reopens for 6.2.
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
next prev parent reply other threads:[~2021-07-26 14:23 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-23 10:33 [PATCH v2] nbd/server: Add --selinux-label option Richard W.M. Jones
2021-07-23 10:33 ` Richard W.M. Jones
2021-07-23 10:47 ` Daniel P. Berrangé
2021-07-26 14:22 ` Eric Blake [this message]
2021-07-23 16:18 ` Kevin Wolf
2021-07-23 16:34 ` Richard W.M. Jones
2021-07-23 16:38 ` Daniel P. Berrangé
2021-08-25 19:35 ` Eric Blake
2021-09-24 19:23 ` Eric Blake
2021-09-27 12:48 ` Vladimir Sementsov-Ogievskiy
2021-09-27 12:55 ` Daniel P. Berrangé
2021-09-27 21:18 ` Eric Blake
2021-09-27 21:39 ` Richard W.M. Jones
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=20210726142254.ia7g2jt5gb36cb7u@redhat.com \
--to=eblake@redhat.com \
--cc=berrange@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
--cc=rjones@redhat.com \
--cc=vsementsov@virtuozzo.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.
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).