qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Eric Blake <eblake@redhat.com>
To: Thomas Huth <thuth@redhat.com>
Cc: peter.maydell@linaro.org, vsementsov@virtuozzo.com,
	berrange@redhat.com,
	"open list:Network Block Dev..." <qemu-block@nongnu.org>,
	richard.henderson@linaro.org, qemu-devel@nongnu.org,
	wainersm@redhat.com, rjones@redhat.com, willianr@redhat.com,
	pbonzini@redhat.com, alex.bennee@linaro.org, f4bug@amsat.org
Subject: Re: [PATCH for 6.2 v4] nbd/server: Add --selinux-label option
Date: Tue, 16 Nov 2021 08:20:40 -0600	[thread overview]
Message-ID: <20211116142040.u7yanlmliymwvx5v@redhat.com> (raw)
In-Reply-To: <9ea4ede4-f1aa-c430-9e94-cb2db9b1d372@redhat.com>

On Tue, Nov 16, 2021 at 08:06:03AM +0100, Thomas Huth wrote:
> On 15/11/2021 21.29, Eric Blake wrote:
> > From: "Richard W.M. Jones" <rjones@redhat.com>
> > 
> > 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.)
> ...
> > @@ -3430,6 +3437,7 @@ summary_info += {'libdaxctl support': libdaxctl}
> >   summary_info += {'libudev':           libudev}
> >   # Dummy dependency, keep .found()
> >   summary_info += {'FUSE lseek':        fuse_lseek.found()}
> > +summary_info += {'selinux':           selinux.found()}
> 
> It's nicer if you do it like this (i.e. without the .found()):
> 
> summary_info += {'selinux':           selinux}
> 
> ... then meson prints out the version of the library, too.

Will tweak on the pull request.

> 
> Apart from that, patch looks fine to me:
> 
> Reviewed-by: Thomas Huth <thuth@redhat.com>
>

Thanks. I'll send a pull request through my NBD tree soon.

-- 
Eric Blake, Principal Software Engineer
Red Hat, Inc.           +1-919-301-3266
Virtualization:  qemu.org | libvirt.org



      reply	other threads:[~2021-11-16 14:28 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-11-15 20:29 [PATCH for 6.2 v4] nbd/server: Add --selinux-label option Eric Blake
2021-11-16  7:06 ` Thomas Huth
2021-11-16 14:20   ` Eric Blake [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=20211116142040.u7yanlmliymwvx5v@redhat.com \
    --to=eblake@redhat.com \
    --cc=alex.bennee@linaro.org \
    --cc=berrange@redhat.com \
    --cc=f4bug@amsat.org \
    --cc=pbonzini@redhat.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=richard.henderson@linaro.org \
    --cc=rjones@redhat.com \
    --cc=thuth@redhat.com \
    --cc=vsementsov@virtuozzo.com \
    --cc=wainersm@redhat.com \
    --cc=willianr@redhat.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).