All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sven Vermeulen <sven.vermeulen@siphos.be>
To: selinux@tycho.nsa.gov
Subject: Debugging sepolgen-ifgen?
Date: Sat, 2 Aug 2014 21:19:04 +0200	[thread overview]
Message-ID: <20140802191904.GA7856@siphos.be> (raw)

Hi all

I've noticed that on my system, for some interfaces, the results in
/var/lib/sepolgen/interface_info are missing file-specific feedback.

For instance, consider the kernel_rw_kernel_sysctl() interface, which is
coded as follows:

interface(`kernel_rw_kernel_sysctl',`
        gen_require(`
                type proc_t, sysctl_t, sysctl_kernel_t;
        ')

        rw_files_pattern($1, { proc_t sysctl_t sysctl_kernel_t }, sysctl_kernel_t)

        list_dirs_pattern($1, { proc_t sysctl_t }, sysctl_kernel_t)
')

In the interface_info file, I only find the following metadata about this
interface:

[InterfaceVector kernel_rw_kernel_sysctl $1:source ]
$1,sysctl_t,dir,getattr,open,search
$1,sysctl_kernel_t,dir,getattr,open,search
$1,proc_t,dir,getattr,open,search

Shouldn't this at least contain something like this?

$1,sysctl_kernel_t,file,write,getattr,lock,open,ioctl,append 

Although not critical, it does result in audit2allow -R to not use
refpolicy-style interfaces when possible...

How can I debug this? I know the file is generated by sepolgen-ifgen, but
rerunning doesn't add in any file-related metadata and I'm totally oblivious
on how the parsing is done...

Wkr,
	Sven Vermeulen

             reply	other threads:[~2014-08-02 19:20 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-02 19:19 Sven Vermeulen [this message]
2014-08-04 17:07 ` Debugging sepolgen-ifgen? Stephen Smalley
2014-08-04 21:44   ` Daniel J Walsh
2014-08-05 13:09     ` Stephen Smalley
2014-08-25 19:18       ` Steve Lawrence
2014-08-26 11:13         ` Daniel J Walsh
2014-08-27 17:20       ` Karl MacMillan

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=20140802191904.GA7856@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --cc=selinux@tycho.nsa.gov \
    /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.