All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] Policy modules design guidelines?
@ 2011-01-12 20:46 Sven Vermeulen
  2011-01-13 19:52 ` Christopher J. PeBenito
  0 siblings, 1 reply; 10+ messages in thread
From: Sven Vermeulen @ 2011-01-12 20:46 UTC (permalink / raw)
  To: refpolicy

Hi list

I'm slowly writing modules for applications that I cannot find modules for
in the reference policy or elsewhere. My main goal is to have policies for
all applications that have some network connectivity or work with data
received by untrusted parties (such as an e-mail client).

During the development I've found it difficult to know what the proper
approach is concerning a few setups. From the #selinux mailinglist I gather
that many of these approaches are mainly depending on the author (no wrong
or right approach) but before submitting modules to the mailinglist for
review (and potential inclusion) I thought of asking the following questions
first ;-)

- In case of application-specific modules (mozilla, pan, mutt, ...) is there
  a preferred method for handling the definitions? There are modules (such
  as for mozilla) that have the majority of the AV rules in the .te file and
  a somewhat straightforward role interface in .if, whereas others like
  screen have a straightforward .te file (more of a definition) whereas the
  .if file has a template (allowing for the generation of <role>_screen_t
  domains)

- When writing policies on one system, chances are very high that this
  policy is not sufficient on other systems (especially other
  distributions). Is it okay to present the policy when tested on a single
  platform (so that others can check it and perhaps update it) or would you
  rather see the request for inclusion only after a distribution (or two)
  have included it in their releases?

- One module I'm working on (Skype) has shown me that Skype likes reading
  things in the users' mozilla/firefox files (~/.mozilla/.../sec8.db and
  prefs.js), most likely to check if the Skype plugin is installed. I
  personally would not want to have this allowed, but I can imagine that the
  reference policy doesn't want to prevent activities that are normal
  behavior. Is that correct?

- How much in-line documentation would reference policy suggestions have?
  Does it make sense to document (as comments) reasons why certain
  interfaces are called in the .te description? I noticed that not that many
  modules have much comments beyond the structural separation (to split the
  policy in related blocks)?

- If an application really requires a permission to be granted (say execmem)
  but a more global boolean exists (allow_execmem) does reference policy
  want the module to honor the boolean, or should this only be when both
  states of the boolean still offer (some) functionality (like allow_dmesg)?

Wkr,
	Sven Vermeulen

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-01-17 20:28 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-01-12 20:46 [refpolicy] Policy modules design guidelines? Sven Vermeulen
2011-01-13 19:52 ` Christopher J. PeBenito
2011-01-13 20:30   ` Dominick Grift
2011-01-13 20:37     ` Daniel J Walsh
2011-01-15 21:03     ` Sven Vermeulen
2011-01-17 14:44       ` Christopher J. PeBenito
2011-01-17 15:07         ` Dominick Grift
2011-01-17 19:17           ` Christopher J. PeBenito
2011-01-17 19:39             ` Dominick Grift
2011-01-17 20:28               ` Christopher J. PeBenito

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.