All of lore.kernel.org
 help / color / mirror / Atom feed
* [refpolicy] fcontexts for XDG_RUNTIME_DIR /run/user
@ 2016-04-11 17:11 Jason Zaman
  2016-04-12 14:43 ` Christopher J. PeBenito
  0 siblings, 1 reply; 8+ messages in thread
From: Jason Zaman @ 2016-04-11 17:11 UTC (permalink / raw)
  To: refpolicy

Hi all,

I submitted patches to add USERID and USERNAME to genhomedircon[1] and
am now trying to fix refpol to work with it.

What labels do we want for things in /run/user?
Currently refpol has the following which seems pretty weird:
/var/run/user(/.*)? gen_context(system_u:object_r:var_auth_t,s0)
It was originally added from fedora but fedora has since dropped that.

fedora now has:
/var/run/user(/.*)? gen_context(system_u:object_r:user_tmp_t,s0)

The problem with that fcontext is that users have write perms towards
user_tmp_t so they would be able to do other things in /run/user/
instead of only within /run/user/%{USERID}/.

I think we should have some kind of _root_t and _home_t like how things
are for /home and /home/USERNAME

In gentoo we have an xdg module which adds xdg_runtime_home_t which we
have for the user's dir. I was thinking to add an xdg_runtime_dir_t or
_root_t. then things would get search perms towards that root dir and
get normal write perms within the actual runtime dir. Only
logind/consolekit would need to manage xdg_runtime_dir_t.

If we send (parts of?) the xdg module upstream from gentoo, would it be
accepted? and if not, I want to at least fix the label for /run/user/
(xdg_runtime_dir_t or whatever is decided) in refpol and then I can
carry the xdg_runtime_home_t part in gentoo only.

Regards,
Jason

[1]: https://marc.info/?l=selinux&m=146013183309131&w=2

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

end of thread, other threads:[~2016-05-04 13:00 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-04-11 17:11 [refpolicy] fcontexts for XDG_RUNTIME_DIR /run/user Jason Zaman
2016-04-12 14:43 ` Christopher J. PeBenito
2016-04-12 17:02   ` Jason Zaman
2016-04-12 17:57     ` Christopher J. PeBenito
2016-04-13 16:18       ` Miroslav Grepl
2016-04-13 17:01         ` Christopher J. PeBenito
2016-04-13 18:24           ` Jason Zaman
2016-05-04 13:00           ` Miroslav Grepl

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.