All of lore.kernel.org
 help / color / mirror / Atom feed
From: sven.vermeulen@siphos.be (Sven Vermeulen)
To: refpolicy@oss.tresys.com
Subject: [refpolicy] [PATCH/RFC v3] Introduce xdg types
Date: Sun, 13 Nov 2011 21:33:18 +0100	[thread overview]
Message-ID: <20111113203317.GA17650@siphos.be> (raw)
In-Reply-To: <20111013140614.GA3116@siphos.be>

On Thu, Oct 13, 2011 at 04:06:14PM +0200, Sven Vermeulen wrote:
> With some delay (busy days at work), the XDG module with the feedback from
> Dominick integrated. Changes since v2 include
> 
> - Rename of interfaces to be more in lign with naming conventions
> - Use of userdom_search_... instead of userdom_list_...
> - Add the lnk_file and fifo_file classes in the xdg_manage_* interfaces
> - Drop the xdg_admin interface
> - Add a few TODOs that need to be written when named file transitions are
>   supported (didn't want to include it as comments since M4 doesn't like
>   that)

Now that named file transitions are supported [1], I'd like to add a rule that,
when a one of the following directories is created, that directory is
immediately labeled appropriately:

- ~/.cache -> xdg_cache_home_t
- ~/.config -> xdg_config_home_t
- ~/.local -> xdg_data_home_t

To do so, I thought about doing this in the following steps:

(1.) Enhance userdom_user_home_dir_filetrans with a fourth argument
     (filename) and use that in its filetrans_pattern() call
(2.) Enhance xdg.if with the xdg_*_home_filetrans statements that accomplish
     something like 
       userdom_user_home_dir_filetrans($1, xdg_cache_home_t, dir, ".cache")
     for the xdg_cache_home_filetrans (others very related)
(3.) Enhance application.te with optional calls like
     "xdg_cache_home_filetrans(application_domain_type)"

Is this a proper way to handle the above? Is application_domain_type the
right level?

Wkr,
	Sven Vermeulen

[1] http://oss.tresys.com/pipermail/refpolicy-commits/2011-November/000029.html

  reply	other threads:[~2011-11-13 20:33 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-10-13 14:06 [refpolicy] [PATCH/RFC v3] Introduce xdg types Sven Vermeulen
2011-11-13 20:33 ` Sven Vermeulen [this message]
2011-11-14 20:35   ` Christopher J. PeBenito
2011-11-15  7:33     ` Sven Vermeulen
2011-11-15 14:23       ` Christopher J. PeBenito
2012-05-01  7:31     ` Sven Vermeulen
2012-05-10 13:57       ` Christopher J. PeBenito

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=20111113203317.GA17650@siphos.be \
    --to=sven.vermeulen@siphos.be \
    --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.