mirror of
https://github.com/SELinuxProject/selinux
synced 2025-03-20 17:57:42 +00:00
libsepol: Create policydb_sort_ocontexts()
Create the function called policydb_sort_ocontexts() that calls the internal function sort_ocontexts() to sort the ocontexts of a policydb. The function sort_ocontexts() is already used by sepol_kernel_policydb_to_conf() and sepol_kernel_policydb_to_cil() when converting a binary policy to cil or policy.conf format. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
parent
c7fa63150e
commit
b816808e7f
@ -640,6 +640,8 @@ extern void policydb_destroy(policydb_t * p);
|
|||||||
|
|
||||||
extern int policydb_load_isids(policydb_t * p, sidtab_t * s);
|
extern int policydb_load_isids(policydb_t * p, sidtab_t * s);
|
||||||
|
|
||||||
|
extern int policydb_sort_ocontexts(policydb_t *p);
|
||||||
|
|
||||||
/* Deprecated */
|
/* Deprecated */
|
||||||
extern int policydb_context_isvalid(const policydb_t * p,
|
extern int policydb_context_isvalid(const policydb_t * p,
|
||||||
const context_struct_t * c);
|
const context_struct_t * c);
|
||||||
|
@ -51,6 +51,7 @@
|
|||||||
#include <sepol/policydb/util.h>
|
#include <sepol/policydb/util.h>
|
||||||
#include <sepol/policydb/flask.h>
|
#include <sepol/policydb/flask.h>
|
||||||
|
|
||||||
|
#include "kernel_to_common.h"
|
||||||
#include "private.h"
|
#include "private.h"
|
||||||
#include "debug.h"
|
#include "debug.h"
|
||||||
#include "mls.h"
|
#include "mls.h"
|
||||||
@ -4301,3 +4302,7 @@ int policydb_set_target_platform(policydb_t *p, int platform)
|
|||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
int policydb_sort_ocontexts(policydb_t *p)
|
||||||
|
{
|
||||||
|
return sort_ocontexts(p);
|
||||||
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user