mirror of
https://github.com/topjohnwu/selinux.git
synced 2025-02-12 14:48:35 +00:00
libsepol, policycoreutils: Move functions to convert a module package to CIL
Move code to convert a policy module to CIL from the policy package to CIL conversion tool, pp, in policycoreutils to libsepol. The only changes to the code are the additions of the prefix "sepol_" to the functions sepol_module_package_to_cil() and sepol_ppfile_to_module_package(). This code is being changed from GPL to LGPL with permission from Tresys. Convert pp to use the renamed functions in libsepol. Signed-off-by: James Carter <jwcart2@tycho.nsa.gov>
This commit is contained in:
parent
1b7f3248ec
commit
758a7fe501
@ -23,6 +23,7 @@ common_src_files := \
|
||||
src/link.c \
|
||||
src/mls.c \
|
||||
src/module.c \
|
||||
src/module_to_cil.c \
|
||||
src/node_record.c \
|
||||
src/nodes.c \
|
||||
src/polcaps.c \
|
||||
|
6
libsepol/include/sepol/module_to_cil.h
Normal file
6
libsepol/include/sepol/module_to_cil.h
Normal file
@ -0,0 +1,6 @@
|
||||
#include <stdlib.h>
|
||||
|
||||
#include <sepol/module.h>
|
||||
|
||||
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);
|
@ -45,5 +45,7 @@ LIBSEPOL_1.1 {
|
||||
cil_set_target_platform;
|
||||
cil_set_policy_version;
|
||||
cil_set_mls;
|
||||
sepol_ppfile_to_module_package;
|
||||
sepol_module_package_to_cil;
|
||||
local: *;
|
||||
} LIBSEPOL_1.0;
|
||||
|
3873
libsepol/src/module_to_cil.c
Normal file
3873
libsepol/src/module_to_cil.c
Normal file
File diff suppressed because it is too large
Load Diff
@ -9,7 +9,7 @@ HLLDIR ?= $(LIBEXECDIR)/selinux/hll
|
||||
|
||||
CFLAGS ?= -Werror -Wall -W
|
||||
override CFLAGS += -I$(INCLUDEDIR)
|
||||
LDLIBS = $(LIBDIR)/libsepol.a -L$(LIBDIR)
|
||||
LDLIBS = -lsepol -L$(LIBDIR)
|
||||
|
||||
PP_SRCS = $(wildcard *.c)
|
||||
PP_OBJS = $(patsubst %.c,%.o,$(PP_SRCS))
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user