Skip to content

Commit

Permalink
libsepol: Add ability to convert binary policy to policy.conf file
Browse files Browse the repository at this point in the history
It would sometimes be helpful for debugging or verification purposes
to be able to convert a binary policy to a human-readable form.

Create new function, sepol_kernel_policydb_to_conf(), that takes a
policydb created from a binary policy and writes a policy.conf file
to the provided FILE pointer.

Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
  • Loading branch information
jwcart2 committed Apr 5, 2017
1 parent 70a480b commit 0a08fd1
Show file tree
Hide file tree
Showing 3 changed files with 3,102 additions and 0 deletions.
5 changes: 5 additions & 0 deletions libsepol/include/sepol/kernel_to_conf.h
@@ -0,0 +1,5 @@
#include <stdlib.h>

#include <sepol/policydb/policydb.h>

int sepol_kernel_policydb_to_conf(FILE *fp, struct policydb *pdb);

0 comments on commit 0a08fd1

Please sign in to comment.