All of lore.kernel.org
 help / color / mirror / Atom feed
From: aranea@aixah.de (Luis Ressel)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] kmod
Date: Sat, 9 Nov 2013 14:52:31 +0100	[thread overview]
Message-ID: <20131109145231.38037787@gentp.lnet> (raw)
In-Reply-To: <20131109143209.2fe65eb6@gentp.lnet>

On Sat, 9 Nov 2013 14:32:09 +0100
Luis Ressel <aranea@aixah.de> wrote:

> I'm experiencing a problem with the kernel's "make modules_install".
> The old modutils had different binaries for modprobe, lsmod, depmod
> etc, but its successor kmod only has one multi-call binary with
> several symlinks to it.
> 
> The system/modutils part of refpolicy has two separate application
> domains, insmod_t (for the various module-loading commands) and
> depmod_t (for depmod, invoked only during compilation). Only the
> latter is allowed to write module_dep_t files.
> 
> But when using kmod, /sbin/depmod is only a symlink to /bin/kmod.
> Therefore it runs in the insmod_t domain and isn't allowed to write
> module_dep_t files.
> 
> I see three possible solutions:
> 1) Unify the insmod_t and depmod_t domains (problem: weakens
> protection) 2) Patch kmod to be selinux-aware and choose the
> appropriate domain (problems: also requires policy changes, upstream
> might be uninterested in including the patches)
> 3) Make /sbin/depmod a wrapper instead of a symlink.
> 
> Which way would you go? I'm leaning towards option 3.

The problem with approach 3 is that the only way to invoke the depmod
functionality in kmod is to pass "depmod" as basename(argv[0]). Do I
need to create another symlink for that, or can that be done by other
means in a shell script? (Or should I write the wrapper in C?)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: not available
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20131109/82e2efa1/attachment.bin 

  reply	other threads:[~2013-11-09 13:52 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-09 13:32 [refpolicy] kmod Luis Ressel
2013-11-09 13:52 ` Luis Ressel [this message]
2013-11-09 14:01   ` Luis Ressel
2013-11-13 14:45 ` Christopher J. PeBenito
2013-11-13 16:27   ` Luis Ressel
2014-02-18 18:13     ` Luis Ressel

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=20131109145231.38037787@gentp.lnet \
    --to=aranea@aixah.de \
    --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.