All of lore.kernel.org
 help / color / mirror / Atom feed
From: domg472@gmail.com (Dominick Grift)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] new policy: rtorrent
Date: Fri, 17 Jul 2009 12:21:32 +0200	[thread overview]
Message-ID: <1247826092.19628.23.camel@notebook2.grift.internal> (raw)
In-Reply-To: <20090717091335.GB1884@squirrel.roonstrasse.net>

On Fri, 2009-07-17 at 11:13 +0200, Max Kellermann wrote:
> On 2009/07/14 15:22, "Christopher J. PeBenito" <cpebenito@tresys.com> wrote:
> > If there is some default or suggested location in rtorrent's docs, then
> > that would be the best choice.
> 
> Unfortunately, there is none.  rtorrent defaults to the current
> directory.
> 
> > > dontaudit rtorrent_t etc_t:file read_file_perms;
> > 
> > Referring to other module's types by name is not allowed.
> 
> During my work with the refpolicy, I've been confused many times, and
> with each release, new styles get adopted, new rules are set.  Where
> can I find documentation?  There is a lot of outdated
> selinux/refpolicy documentation on the net, but it's very hard to find
> something which is still valid today.

You could maybe solve this by patching a new interface to files.if

########################################
## <summary>
##	Do not audit attempts to read files
##	in /etc that are generic
## </summary>
## <param name="domain">
##	<summary>
##	Domain to not audit.
##	</summary>
## </param>
#
interface(`files_dontaudit_read_etc_files',`
	gen_require(`
		type etc_t;
	')

	dontaudit $1 etc_t:file { getattr read };
')

And call that from your rtorrent.te file:

files_dontaudit_read_etc_files(rtorrent_t)

I have been considering writing some guidelines to refpolicy style
requirements, but i also still make mistakes...

Style issues can be learned by *carefully* studying refpolicy.

> Max
> _______________________________________________
> refpolicy mailing list
> refpolicy at oss.tresys.com
> http://oss.tresys.com/mailman/listinfo/refpolicy
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://oss.tresys.com/pipermail/refpolicy/attachments/20090717/1f263b7a/attachment.bin 

      reply	other threads:[~2009-07-17 10:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-09  9:58 [refpolicy] new policy: rtorrent Max Kellermann
2009-07-09 12:21 ` Dominick Grift
2009-07-09 12:31   ` Dominick Grift
2009-07-17  9:09   ` Max Kellermann
2009-07-17  9:58     ` Dominick Grift
2009-07-14 13:22 ` Christopher J. PeBenito
2009-07-17  9:13   ` Max Kellermann
2009-07-17 10:21     ` 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=1247826092.19628.23.camel@notebook2.grift.internal \
    --to=domg472@gmail.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.