All of lore.kernel.org
 help / color / mirror / Atom feed
From: George Dunlap <george.dunlap@citrix.com>
To: Olaf Hering <olaf@aepfle.de>,
	George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Wei Liu <wei.liu2@citrix.com>,
	Ian Campbell <ian.campbell@citrix.com>,
	Stefano Stabellini <stefano.stabellini@eu.citrix.com>,
	"Luis R. Rodriguez" <mcgrof@do-not-panic.com>,
	Ian Jackson <ian.jackson@eu.citrix.com>,
	"xen-devel@lists.xen.org" <xen-devel@lists.xen.org>,
	M A Young <m.a.young@durham.ac.uk>,
	Anthony PERARD <anthony.perard@citrix.com>
Subject: Re: [PATCH 1/7] tools/hotplug: remove SELinux options from var-lib-xenstored.mount
Date: Mon, 14 Sep 2015 17:30:33 +0100	[thread overview]
Message-ID: <55F6F629.3040409@citrix.com> (raw)
In-Reply-To: <20150911063100.GA9276@aepfle.de>

On 09/11/2015 07:31 AM, Olaf Hering wrote:
> On Thu, Sep 10, George Dunlap wrote:
> 
>> On Fri, Dec 19, 2014 at 11:25 AM, Olaf Hering <olaf@aepfle.de> wrote:
>>> Using SELinux mount options per default breaks several systems.
>>> Either the context= mount option is not known at all to the kernel,
>>> as reported for ArchLinux. Or the default value "none" is unknown to
>>> SELinux, as reported for Fedora. In both cases the unit will fail.
>>>
>>> The proper place to specify mount options is /etc/fstab. Appearently
>>> systemd is kind enough to use values from there even if Options= or
>>> What= is specified in a .mount file.
>>
>> For the benefit of someone moonlighting as a CentOS package
>> maintainer, could you tell me how adding such an entry in a package is
>> normally done?  Or alternately, how you would recommend a package
>> maintainer to add the appropriate context?
> 
> George, I know nothing about SELinux.
> I think its either up to a rpm %post install script to fiddle with fstab
> and pray that the added lines fit the system policies. Or its up to the
> documentation team to describe how SELinux is supposed to be configured
> for the third party app "Xen" on CentOS.

Well if you "know nothing about SELinux", and you don't use it, and
don't have any test systems that use it, then why did you assert
"The proper place to specify [an SELinux mount context] is /etc/fstab"?
 This patchset was accepted because you represented it as the "right"
way of doing things.

So poking around CentOS 7, it looks like in most cases, after a tmpfs is
mounted, "restorecon -R $mountpoint" is also run, which restores the
default selinux tags.  Manually starting var-lib-xenstored, then running
restorecon, then manually starting xenstored.service seems to work.  So
at the moment I'm trying to figure out if there's a "right" way to get
restorecon run at the right time  (or alternately, a "right" way to
mount a tmpfs at /var/lib/xenstored such that it happens automatically).

If that doesn't work, then adding a xenstored configuration file that
can contain mount options is probably the best option.

 -George

  reply	other threads:[~2015-09-14 16:30 UTC|newest]

Thread overview: 58+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-12-19 11:25 [PATCH 0/7 v3] tools/hotplug: systemd changes for 4.5 Olaf Hering
2014-12-19 11:25 ` [PATCH 1/7] tools/hotplug: remove SELinux options from var-lib-xenstored.mount Olaf Hering
2015-01-06 11:27   ` Ian Campbell
2015-01-07  9:23     ` Olaf Hering
2015-01-07  9:31       ` Ian Campbell
2015-01-07 14:53         ` Konrad Rzeszutek Wilk
2015-01-06 14:48   ` Ian Jackson
2015-09-10 13:52   ` George Dunlap
2015-09-10 14:13     ` M A Young
2015-09-10 14:17       ` George Dunlap
2015-09-11  6:31     ` Olaf Hering
2015-09-14 16:30       ` George Dunlap [this message]
2015-09-14 18:33         ` Olaf Hering
2015-09-15  8:55           ` George Dunlap
2015-09-15 12:48             ` Olaf Hering
2015-09-15 12:55               ` George Dunlap
2015-09-15 13:58                 ` Konrad Rzeszutek Wilk
2015-09-15 14:01                   ` George Dunlap
2015-09-15 15:12                     ` Konrad Rzeszutek Wilk
2015-09-15 15:52                       ` George Dunlap
2015-09-15 13:57               ` Konrad Rzeszutek Wilk
2014-12-19 11:25 ` [PATCH 2/7] tools/hotplug: remove XENSTORED_ROOTDIR from xenstored.service Olaf Hering
2014-12-19 11:25 ` [PATCH 3/7] tools/hotplug: xendomains.service depends on network Olaf Hering
2014-12-19 11:25 ` [PATCH 4/7] tools/hotplug: use xencommons as EnvironmentFile in xenconsoled.service Olaf Hering
2015-01-06 11:29   ` Ian Campbell
2015-01-06 14:45   ` Ian Jackson
2014-12-19 11:25 ` [PATCH 5/7] tools/hotplug: use XENCONSOLED_TRACE " Olaf Hering
2015-01-06 11:30   ` Ian Campbell
2015-01-06 15:26     ` Konrad Rzeszutek Wilk
2015-01-06 14:46   ` Ian Jackson
2014-12-19 11:25 ` [PATCH 6/7] tools/hotplug: remove EnvironmentFile from xen-qemu-dom0-disk-backend.service Olaf Hering
2015-01-06 11:33   ` Ian Campbell
2015-01-06 14:50   ` Ian Jackson
2014-12-19 11:25 ` [PATCH 7/7] tools/hotplug: add wrapper to start xenstored Olaf Hering
2015-01-06 11:41   ` Ian Campbell
2015-01-07  9:40     ` Olaf Hering
2015-01-07 15:27       ` Ian Jackson
2015-01-07 15:42         ` Konrad Rzeszutek Wilk
2015-09-10 14:19       ` George Dunlap
2015-09-10 14:53         ` Wei Liu
2015-09-10 15:01           ` M A Young
2015-09-10 15:10             ` Wei Liu
2015-09-10 15:11             ` George Dunlap
2015-09-10 16:01           ` Ian Jackson
2015-09-11  6:42             ` Olaf Hering
2015-01-06 14:58   ` Ian Jackson
2015-01-07  9:49     ` Olaf Hering
2015-01-07 14:55       ` Konrad Rzeszutek Wilk
2014-12-19 19:10 ` [PATCH 0/7 v3] tools/hotplug: systemd changes for 4.5 Konrad Rzeszutek Wilk
2014-12-22  8:06   ` Olaf Hering
2014-12-31 15:31     ` Konrad Rzeszutek Wilk
2015-01-05 21:22       ` Konrad Rzeszutek Wilk
2015-01-06 10:05         ` Ian Campbell
2015-01-06 15:00         ` Ian Jackson
2015-01-06 15:19           ` Konrad Rzeszutek Wilk
2015-01-07  9:53         ` Olaf Hering
2015-01-07 14:56           ` Konrad Rzeszutek Wilk
2015-01-07 15:03             ` Olaf Hering

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=55F6F629.3040409@citrix.com \
    --to=george.dunlap@citrix.com \
    --cc=George.Dunlap@eu.citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=ian.campbell@citrix.com \
    --cc=ian.jackson@eu.citrix.com \
    --cc=m.a.young@durham.ac.uk \
    --cc=mcgrof@do-not-panic.com \
    --cc=olaf@aepfle.de \
    --cc=stefano.stabellini@eu.citrix.com \
    --cc=wei.liu2@citrix.com \
    --cc=xen-devel@lists.xen.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.