All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 0/2 v3] Check if module name different than output filename
@ 2016-04-08 15:02 James Carter
  2016-04-08 15:02 ` [PATCH 1/2 v3] policycoreutils/hll/pp: Warn " James Carter
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: James Carter @ 2016-04-08 15:02 UTC (permalink / raw)
  To: selinux

Since CIL treats files as modules and does not have a separate
module statement it can cause confusion when a Refpolicy module
has a name that is not the same as its base filename because older
SELinux userspaces will refer to the module by its module name while
a CIL-based userspace will refer to it by its filename.

Because of this, provide a warning message when converting a policy
package to CIL and fail when compiling a module if the output base
filename is different than the module name.

Changes from v1:
- Added a "Warning:" prefix
- Removed checks against the input filename
- Since there are now only two checks and the base filename is used in the
warning message, it no longer made sense to create common helper functions
in libsepol.

Changes from v2:
- Check if strdup() returns NULL
- Have checkmodule fail rather than give a warning

James Carter (2):
  policycoreutils/hll/pp: Warn if module name different than output
    filename
  checkpolicy: Fail if module name different than output base filename

 checkpolicy/checkmodule.c   | 20 ++++++++++++++++++++
 policycoreutils/hll/pp/pp.c | 33 +++++++++++++++++++++++++++++----
 2 files changed, 49 insertions(+), 4 deletions(-)

-- 
2.5.5

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

end of thread, other threads:[~2016-04-12 14:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-04-08 15:02 [PATCH 0/2 v3] Check if module name different than output filename James Carter
2016-04-08 15:02 ` [PATCH 1/2 v3] policycoreutils/hll/pp: Warn " James Carter
2016-04-08 15:02 ` [PATCH 2/2 v3] checkpolicy: Fail if module name different than output base filename James Carter
2016-04-12 14:57 ` [PATCH 0/2 v3] Check if module name different than output filename James Carter

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.