All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] remove system_u and s0 hardcoded strings
@ 2016-09-06 13:48 Gary Tierney
  2016-09-06 13:48 ` [PATCH] genhomedircon: remove hardcoded refpolicy strings Gary Tierney
  0 siblings, 1 reply; 13+ messages in thread
From: Gary Tierney @ 2016-09-06 13:48 UTC (permalink / raw)
  To: selinux

This patch removes the search and replacement for "system_u" and "s0" by instead
looking for a valid context and replacing the user and MLS/MCS range where
appropriate.  This allows using genhomedircon with alternative policies that
don't name the system seuser "system_u" or declare users in a CIL namespace /
container.

This is also a slight behavior change, but should be functionally equivalent to
before for existing policies. In refpolicy we have no homedir contexts without
system_u as the user or s0 as the level:

> $ find . -name '*.fc' | xargs grep -h 'HOME_DIR' | grep -v 's0' | grep -Evc '^#'
0
> $ find . -name '*.fc' | xargs grep -h 'HOME_DIR' | grep -v 'system_u' | grep -Evc '^#'
0

Gary Tierney (1):
  genhomedircon: remove hardcoded refpolicy strings

 libsemanage/src/genhomedircon.c | 79 ++++++++++++++++++++++++++++++++++-------
 1 file changed, 66 insertions(+), 13 deletions(-)

-- 
2.7.4

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

end of thread, other threads:[~2016-09-07 13:08 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-09-06 13:48 [PATCH] remove system_u and s0 hardcoded strings Gary Tierney
2016-09-06 13:48 ` [PATCH] genhomedircon: remove hardcoded refpolicy strings Gary Tierney
2016-09-06 19:13   ` Stephen Smalley
2016-09-07  4:42     ` Gary Tierney
2016-09-07  7:15       ` Dominick Grift
2016-09-07 12:45         ` Stephen Smalley
2016-09-07 12:45           ` Dominick Grift
2016-09-07 12:36       ` Stephen Smalley
2016-09-07 12:47         ` Dominick Grift
2016-09-07 12:55           ` Dominick Grift
2016-09-07 13:00           ` Stephen Smalley
2016-09-07 13:04             ` Dominick Grift
2016-09-07 13:08               ` Stephen Smalley

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.