Skip to contentSkip to conversation

libsepol: add function to generate CIL from a module policydb

PATCH Superseded James Carter 1 participant 1 message Mar 27, 2015 SELinux security module

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore
#0 lore raw

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.

---
 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
index 1d0225c..18bb3bf 100644
@@ -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