selinux.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] checkmodule: allow building modules of a specific version
@ 2019-04-17 16:37 Gary Tierney
  2019-04-17 16:37 ` [PATCH 1/2] checkmodule: add support for specifying module policy version Gary Tierney
                   ` (2 more replies)
  0 siblings, 3 replies; 9+ messages in thread
From: Gary Tierney @ 2019-04-17 16:37 UTC (permalink / raw)
  To: selinux

These changes come from a report by a user on the Freenode IRC channel that
they were unable to build policies for a machine that has an older version of
libsepol installed.

A new `-c` option that mirrors checkpolicy's own has been added to checkmodule,
and the output of a simple test is shown below:

$ cat > test.te <<EOF
module test 1.0;

require {
    type domain;
    type file_type;
    class file { read write };
}

allow domain file_type : file { read write };
EOF
$ obj/usr/bin/checkmodule -m -M -c 10 -o test.mod test.te
$ checkpolicy/test/dismod test.mod
Reading policy...
... snip ...
Binary policy module file loaded.
Module name: test
Module version: 1.0
Policy version: 10

Worthy of note, however, is that these policy version numbers differ from those
used by the kernel policy format.

Gary Tierney (2):
  checkmodule: add support for specifying module policy version
  dismod: print policy version of loaded modules

 checkpolicy/checkmodule.8 |  5 ++++-
 checkpolicy/checkmodule.c | 29 +++++++++++++++++++++++++++--
 checkpolicy/test/dismod.c |  4 ++--
 3 files changed, 33 insertions(+), 5 deletions(-)

-- 
2.17.2


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

end of thread, other threads:[~2019-04-19 19:44 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-04-17 16:37 [PATCH 0/2] checkmodule: allow building modules of a specific version Gary Tierney
2019-04-17 16:37 ` [PATCH 1/2] checkmodule: add support for specifying module policy version Gary Tierney
2019-04-18 15:11   ` William Roberts
2019-04-17 16:37 ` [PATCH 2/2] dismod: print policy version of loaded modules Gary Tierney
2019-04-18 15:13   ` William Roberts
2019-04-18 13:17 ` [Non-DoD Source] [PATCH 0/2] checkmodule: allow building modules of a specific version jwcart2
2019-04-18 15:18   ` William Roberts
2019-04-18 17:49     ` jwcart2
2019-04-19 17:21       ` jwcart2

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).