mirror of
https://github.com/topjohnwu/selinux.git
synced 2024-11-24 12:09:50 +00:00
libsepol: Add ability to convert binary policy to policy.conf file
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>
This commit is contained in:
parent
70a480bfcd
commit
0a08fd1e69
5
libsepol/include/sepol/kernel_to_conf.h
Normal file
5
libsepol/include/sepol/kernel_to_conf.h
Normal file
@ -0,0 +1,5 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <sepol/policydb/policydb.h>
|
||||
|
||||
int sepol_kernel_policydb_to_conf(FILE *fp, struct policydb *pdb);
|
3096
libsepol/src/kernel_to_conf.c
Normal file
3096
libsepol/src/kernel_to_conf.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -50,4 +50,5 @@ LIBSEPOL_1.1 {
|
||||
sepol_module_package_to_cil;
|
||||
sepol_module_policydb_to_cil;
|
||||
sepol_kernel_policydb_to_cil;
|
||||
sepol_kernel_policydb_to_conf;
|
||||
} LIBSEPOL_1.0;
|
||||
|
Loading…
Reference in New Issue
Block a user