selinux-refpolicy.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dominick Grift <dac.override@gmail.com>
To: Russell Coker <russell@coker.com.au>
Cc: "selinux-refpolicy@vger.kernel.org"  <selinux-refpolicy@vger.kernel.org>
Subject: Re: strange daemon startup issue
Date: Mon, 4 Mar 2019 14:59:50 +0100	[thread overview]
Message-ID: <20190304135950.GA22313@brutus.lan> (raw)
In-Reply-To: <3166760.egoGarHQ6g@xev>

[-- Attachment #1: Type: text/plain, Size: 1840 bytes --]

On Tue, Mar 05, 2019 at 12:29:45AM +1100, Russell Coker wrote:
> When I boot kernel 4.9.144 (Debian/Stable kernel) with the Debian policy for 
> Unstable (which isn't very different to the latest Git refpolicy) /usr/sbin/
> ModemManager and /usr/sbin/mysqld run as init_t.
> 
> When I boot the same policy with kernel 4.19.16 (Debian/Testing kernel) those 
> daemons run in modemmanager_t and mysqld_t as desired.
> 
> What is the difference between those kernels which would explain this?  Would 
> it be some interaction with systemd?  I don't expect anyone to just hand me 
> the answer (although that would be really nice), any clues as to where I 
> should start investigating this would be great.
> 
> The general aim with Debian SE Linux is that you can run the policy with the 
> kernel from the previous version of Debian.  So this is something I really 
> want to fix.

If its the nnp transition polcap then you have some options:

1. easiest is to remove the references to "NoNewPrivileges=" in systemd service units. Hopefully in these old versions of systemd this directive is not implied by other widely used directives.
I recall that back then I got away with this solution, at least untill the polcap was introduced.

2. hard and ugly: before the polcap was introduced, NNP was covered with type bounds. (see selinux_err messages on older kernels)
This can get ugly really fast though as the NNP flag is inherited. Probably best to avoid this option, but in theory it is possible to address this issue with type bounds.

> 
> -- 
> My Main Blog         http://etbe.coker.com.au/
> My Documents Blog    http://doc.coker.com.au/
> 

-- 
Key fingerprint = 5F4D 3CDB D3F8 3652 FBD8 02D5 3B6C 5F1D 2C7B 6B02
https://sks-keyservers.net/pks/lookup?op=get&search=0x3B6C5F1D2C7B6B02
Dominick Grift

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      parent reply	other threads:[~2019-03-04 13:59 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-04 13:29 strange daemon startup issue Russell Coker
2019-03-04 13:34 ` Dominick Grift
2019-03-04 13:59 ` Dominick Grift [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=20190304135950.GA22313@brutus.lan \
    --to=dac.override@gmail.com \
    --cc=russell@coker.com.au \
    --cc=selinux-refpolicy@vger.kernel.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 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).