linux-modules.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Luis Ressel <aranea@aixah.de>
To: Josh Boyer <jwboyer@fedoraproject.org>
Cc: "linux-modules@vger.kernel.org" <linux-modules@vger.kernel.org>
Subject: Re: Proposal: Add a depmod wrapper for kmod to aid SELinux
Date: Tue, 18 Feb 2014 19:10:20 +0100	[thread overview]
Message-ID: <20140218191020.12a65822@gentp.lnet> (raw)
In-Reply-To: <CA+5PVA417O+uny=q5yZk22gVZi2zojrUGHQrq05XuXDUSW_KgA@mail.gmail.com>

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

On Mon, 17 Feb 2014 08:47:05 -0500
Josh Boyer <jwboyer@fedoraproject.org> wrote:

> Can you elaborate on the different set of SELinux labels/permissions
> for depmod?  Fedora ships with SELinux enforcing enabled and we've not
> had any issues with depmod being under the system_u:object_r:bin_t:s0
> label.  I'm curious what you're trying to set depmod to and why.

That's because Fedora uses a "targeted" SELinux policy by default and
therefore only restricts the permissions of daemons. Users are
"unconfined" - they keep their full permission set. Depmod is called
interactively and gets full root access, just as without SELinux.

I use a "strict" policy which also restricts users. In that case, root
normally doesn't have the permissions needed by modprobe or depmod.
Thus, they have to be labeled specially: depmod_t for depmod and
insmod_t for the other kmod tools.

> This seems somewhat over-engineered.  Wouldn't it be simpler to copy
> the kmod binary itself to a real file called 'depmod' during the
> installation?

You're absolutely right. I just didn't think of that. In some cases
this might create an unpleasant size overhead, but for kmod that
overhead is negligible. Since kmod's make install target doesn't create
the symlinks, it also doesn't have to care about this. I therefore
withdraw my proposal.

However, in case you add the functionality of creating the symlinks to
the Makefile in the future, it would be neat to offer this approach as
a configurable alternative. (Only for depmod, though, the other tools
can stay symlinks).


Regards,
Luis Ressel

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

  reply	other threads:[~2014-02-18 18:10 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-02-16 21:23 Proposal: Add a depmod wrapper for kmod to aid SELinux Luis Ressel
2014-02-17 13:47 ` Josh Boyer
2014-02-18 18:10   ` Luis Ressel [this message]
2014-02-18 18:39     ` Lucas De Marchi

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=20140218191020.12a65822@gentp.lnet \
    --to=aranea@aixah.de \
    --cc=jwboyer@fedoraproject.org \
    --cc=linux-modules@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).