From: guido@trentalancia.com (Guido Trentalancia)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] mtab lock files label (was [patch 1/3] Implementation of system conf type)
Date: Fri, 18 Mar 2011 23:53:00 +0100 [thread overview]
Message-ID: <1300488781.5246.5.camel@tesla.lan> (raw)
In-Reply-To: <4D70F55D.5000405@tresys.com>
On Fri, 04/03/2011 at 09.21 -0500, Christopher J. PeBenito wrote:
> > I also take the opportunity to remind you of the issue with mtab
> lock
> > files that I had already mentioned a few days ago.
> >
> > Basically, mount tries to create lock files named:
> >
> > /etc/mtab~<pid>
> >
> > where <pid> gets substituted with the process id of mount itself.
> >
> > Unfortunately at the moment these files are currently falling back
> to
> > the etc_t label. It is very much desirable to have them labeled
> > etc_runtime_t to avoid problems (denials) with write operations.
> >
> > Originally the name for those lock files was /etc/mtab~. To avoid
> race
> > conditions it was decided to append the <pid>. The source code is
> > designed so that the upper bound for the length of <pid> is 20.
> >
> > Please note that contrary to what is stated in the source code for
> mount
> > (fstab.c) there is no dot between "/etc/mtab~" and "<pid>" (it's not
> > "/etc/mtab~.<pid>") !
> >
> > Can somebody please take care of this ?
>
> I don't see why this would be happening. There are the following
> rules
> in mount:
>
> files_manage_etc_runtime_files(mount_t)
> files_etc_filetrans_etc_runtime(mount_t, file)
>
> So the file should be created with etc_runtime_t. The only reasons I
> can think of this mtab~<pid> file having etc_t are
>
> 1. it was there already and someone did a relabel
Explained. /etc/mtab* easily ends up in restorecond.conf (it's even in
selinuxproject.org). Now to me the incorrect etc_t type for mtab lock
files looks as a bug in the file contexts definitions that should be
fixed.
> 2. some new SELinux logic in it that does a matchpathcon on the
> filename
> and then does setfscreatecon() to that context.
>
> So if either of those is the case, you could add a file context entry
> to
> try to fix it.
Regards,
Guido
next prev parent reply other threads:[~2011-03-18 22:53 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-02-18 15:52 [refpolicy] [patch 1/3] Implementation of system conf type Miroslav Grepl
2011-02-19 9:57 ` Sven Vermeulen
2011-02-20 5:37 ` Guido Trentalancia
2011-02-21 15:40 ` Daniel J Walsh
2011-02-21 20:11 ` Guido Trentalancia
2011-02-22 15:46 ` Christopher J. PeBenito
2011-02-22 15:57 ` Daniel J Walsh
2011-02-22 17:27 ` Miroslav Grepl
2011-02-22 16:18 ` Guido Trentalancia
2011-03-01 19:57 ` Christopher J. PeBenito
2011-03-01 20:41 ` Guido Trentalancia
2011-03-02 14:33 ` Christopher J. PeBenito
2011-03-02 19:10 ` Daniel J Walsh
2011-03-03 14:36 ` Guido Trentalancia
2011-03-03 15:32 ` Daniel J Walsh
2011-03-04 14:21 ` Christopher J. PeBenito
2011-03-04 19:01 ` Guido Trentalancia
2011-03-18 22:53 ` Guido Trentalancia [this message]
2011-02-22 16:27 ` Guido Trentalancia
2011-03-01 20:01 ` Christopher J. PeBenito
2011-03-01 20:32 ` Guido Trentalancia
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=1300488781.5246.5.camel@tesla.lan \
--to=guido@trentalancia.com \
--cc=refpolicy@oss.tresys.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 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.