Export the interface to validate a policydb structure. It can be used e.g. in compilers to verify they generate valid policies. Signed-off-by: Christian Göttsche <cgzones@xxxxxxxxxxxxxx> --- libsepol/include/sepol/policydb/validate.h | 17 +++++++++++++++++ libsepol/src/policydb_validate.h | 4 +--- 2 files changed, 18 insertions(+), 3 deletions(-) create mode 100644 libsepol/include/sepol/policydb/validate.h diff --git a/libsepol/include/sepol/policydb/validate.h b/libsepol/include/sepol/policydb/validate.h new file mode 100644 index 00000000..eff0779e --- /dev/null +++ b/libsepol/include/sepol/policydb/validate.h @@ -0,0 +1,17 @@ +#ifndef _SEPOL_POLICYDB_VALIDATE_H +#define _SEPOL_POLICYDB_VALIDATE_H + +#include <sepol/handle.h> +#include <sepol/policydb/policydb.h> + +#ifdef __cplusplus +extern "C" { +#endif + +int validate_policydb(sepol_handle_t *handle, policydb_t *p); + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/libsepol/src/policydb_validate.h b/libsepol/src/policydb_validate.h index d9f7229b..c2980403 100644 --- a/libsepol/src/policydb_validate.h +++ b/libsepol/src/policydb_validate.h @@ -1,7 +1,5 @@ #include <stdint.h> -#include <sepol/handle.h> -#include <sepol/policydb/policydb.h> +#include <sepol/policydb/validate.h> int value_isvalid(uint32_t value, uint32_t nprim); -int validate_policydb(sepol_handle_t *handle, policydb_t *p); -- 2.33.1