From: cpebenito@tresys.com (Christopher J. PeBenito)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH 1/5] Introduce interface allowing relabeling from/to non-security file types
Date: Mon, 18 Aug 2014 10:57:10 -0400 [thread overview]
Message-ID: <53F21446.3050205@tresys.com> (raw)
In-Reply-To: <20140815093146.GA5715@siphos.be>
On 8/15/2014 5:31 AM, Sven Vermeulen wrote:
> On Thu, Aug 14, 2014 at 03:35:47PM -0400, Christopher J. PeBenito wrote:
>> On 8/7/2014 2:05 PM, Sven Vermeulen wrote:
>>> This interface can be used by domains that have a need for broad
>>> privileges towards the system, but should not need any privileges
>>> towards security-sensitive types.
>> [..]
>>> +interface(`files_relabel_all_non_security_file_types',`
>>> + gen_require(`
>>> + attribute non_security_file_type;
>>> + ')
>>> +
>>> + allow $1 non_security_file_type:dir list_dir_perms;
>>> +
>>> + relabel_dirs_pattern($1, non_security_file_type, non_security_file_type)
>>> + relabel_files_pattern($1, non_security_file_type, non_security_file_type)
>>> + relabel_lnk_files_pattern($1, non_security_file_type, non_security_file_type)
>>> + relabel_fifo_files_pattern($1, non_security_file_type, non_security_file_type)
>>> + relabel_sock_files_pattern($1, non_security_file_type, non_security_file_type)
>>> +
>>> + # This is only relabelfrom as there should be no device nodes marked with a type
>>> + # associated with the non_security_file_type attribute
>>> + relabelfrom_blk_files_pattern($1, non_security_file_type, non_security_file_type)
>>> + relabelfrom_chr_files_pattern($1, non_security_file_type, non_security_file_type)
>>> +')
>>
>> While there are a few interfaces that are like this with broad object
>> class usage, I'd rather not have them. I'd prefer that they are broken
>> up into individual interfaces. #3 patch is like this too.
>
> As in, iterate over all the various types that would be matched?
Yes.
> Although I can do that, that might result in many, many more interfaces
> being necessary and having updates on the domain as users configure
> tmpfiles.
>
> Or we can go the other route and not include the broad privileges to start
> with (only the basic resource types such as the pidfiles) until users
> start complaining about tmpfiles not creating the directory, socket or file,
> and adapt the policy as things go along.
I'm fine with that too.
--
Chris PeBenito
Tresys Technology, LLC
www.tresys.com | oss.tresys.com
next prev parent reply other threads:[~2014-08-18 14:57 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-07 18:05 [refpolicy] [PATCH 0/5] Supporting tmpfiles Sven Vermeulen
2014-08-07 18:05 ` [refpolicy] [PATCH 1/5] Introduce interface allowing relabeling from/to non-security file types Sven Vermeulen
2014-08-14 19:35 ` Christopher J. PeBenito
2014-08-15 9:31 ` Sven Vermeulen
2014-08-18 14:57 ` Christopher J. PeBenito [this message]
2014-08-07 18:05 ` [refpolicy] [PATCH 2/5] Introduce interface to relabel from/to pidfile associated types Sven Vermeulen
2014-08-07 18:05 ` [refpolicy] [PATCH 3/5] Introduce interface to manage all non-security-sensitive resource types Sven Vermeulen
2014-08-07 18:05 ` [refpolicy] [PATCH 4/5] Introduce the tmpfiles_t domain Sven Vermeulen
2014-08-14 19:40 ` Christopher J. PeBenito
2014-08-14 19:53 ` Dominick Grift
2014-08-15 9:39 ` Sven Vermeulen
2014-08-15 9:35 ` Sven Vermeulen
2014-08-15 15:30 ` Daniel J Walsh
2014-08-18 16:51 ` Christopher J. PeBenito
2014-08-07 18:05 ` [refpolicy] [PATCH 5/5] Give kmod access to tmpfiles Sven Vermeulen
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=53F21446.3050205@tresys.com \
--to=cpebenito@tresys.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.