libsepol: add function to generate CIL from a module policydb
PATCH 2/3 libsepol: add function to generate CIL from a module policydb
Add new function, sepol_module_policydb_to_cil, that generates CIL from a module (not kernel) policydb.
Signed-off-by James Carter <[email protected]>
--- libsepol/include/sepol/module_to_cil.h | 2 + libsepol/src/module_to_cil.c | 367 ++++++++++++++++++++++----------- 2 files changed, 254 insertions(+), 115 deletions(-)
libsepol/include/sepol/module_to_cil.h +2 -0
@@ -1,6 +1,8 @@#include <stdlib.h> #include <sepol/module.h> +#include <sepol/policydb/policydb.h> +int sepol_module_policydb_to_cil (FILE *fp,struct policydb *pdb,int linked);int sepol_module_package_to_cil (FILE *fp,struct sepol_module_package *mod_pkg);int sepol_ppfile_to_module_package (FILE *fp,struct sepol_module_package **mod_pkg);
libsepol/src/module_to_cil.c +252 -115
503 lines not on this page · raw message
Signature · 2 lines
James Carter <[email protected]> National Security Agency