Revert "Fix build and use new cil_write_build_ast"
Revert "Use cil_write_build_ast" Revert submission 1827311-update_libselinux Reason for revert: b/200771997 Reverted Changes: I088d1e94c:Fix build and use new cil_write_build_ast I14dc4dc58:Merge remote-tracking branch 'aosp/upstream-master... I7b77f4469:Use cil_write_build_ast Change-Id: I7b34185a9205c550cdfee2ac29acad1bea7879a4
This commit is contained in:
parent
3342f74ef8
commit
f4408b8e8e
5 changed files with 10 additions and 12 deletions
|
@ -173,7 +173,6 @@ cc_library {
|
|||
"src/mapping.c",
|
||||
"src/procattr.c",
|
||||
"src/reject_unknown.c",
|
||||
"src/sestatus.c",
|
||||
"src/setenforce.c",
|
||||
"src/setexecfilecon.c",
|
||||
"src/setfilecon.c",
|
||||
|
@ -201,7 +200,6 @@ cc_library {
|
|||
"src/mapping.c",
|
||||
"src/procattr.c",
|
||||
"src/reject_unknown.c",
|
||||
"src/sestatus.c",
|
||||
"src/setexecfilecon.c",
|
||||
"src/stringrep.c",
|
||||
],
|
||||
|
|
|
@ -80,9 +80,9 @@ cc_library {
|
|||
"src/policydb.c",
|
||||
"src/policydb_convert.c",
|
||||
"src/policydb_public.c",
|
||||
"src/policydb_validate.c",
|
||||
"src/port_record.c",
|
||||
"src/ports.c",
|
||||
"src/roles.c",
|
||||
"src/services.c",
|
||||
"src/sidtab.c",
|
||||
"src/symtab.c",
|
||||
|
|
7
libsepol/cil/include/cil/cil_write_ast.h
Normal file
7
libsepol/cil/include/cil/cil_write_ast.h
Normal file
|
@ -0,0 +1,7 @@
|
|||
#ifndef CIL_WRITE_H_
|
||||
#define CIL_WRITE_H_
|
||||
|
||||
#include <cil/cil.h>
|
||||
|
||||
int cil_write_ast(struct cil_db *db, const char* path);
|
||||
#endif /* CIL_WRITE_H_ */
|
|
@ -829,7 +829,6 @@ static int cil_build_mappings_tree(hashtab_key_t k, hashtab_datum_t d, void *arg
|
|||
/* re)declare typeattribute. */
|
||||
cil_typeattribute_init(&typeattr);
|
||||
typeattr->datum.name = new_key;
|
||||
typeattr->datum.fqn = new_key;
|
||||
cil_tree_node_init(&ast_node);
|
||||
ast_node->data = typeattr;
|
||||
ast_node->flavor = CIL_TYPEATTRIBUTE;
|
||||
|
|
|
@ -1521,10 +1521,7 @@ static int __write_cil_ast_node_helper(struct cil_tree_node *node, uint32_t *fin
|
|||
struct cil_write_ast_args *args = extra_args;
|
||||
|
||||
if (node->flavor == CIL_SRC_INFO) {
|
||||
// ANDROID: The generated cil may be split/merged later on. Do not output
|
||||
// source information to avoid issues when loading the resulting policy with
|
||||
// libsepol.
|
||||
// cil_write_src_info_node(args->out, node);
|
||||
cil_write_src_info_node(args->out, node);
|
||||
return SEPOL_OK;
|
||||
}
|
||||
|
||||
|
@ -1559,10 +1556,7 @@ static int __write_cil_ast_last_child_helper(struct cil_tree_node *node, void *e
|
|||
if (parent->flavor == CIL_ROOT) {
|
||||
return SEPOL_OK;
|
||||
} else if (parent->flavor == CIL_SRC_INFO) {
|
||||
// ANDROID: The generated cil may be split/merged later on. Do not output
|
||||
// source information to avoid issues when loading the resulting policy with
|
||||
// libsepol.
|
||||
// fprintf(args->out, ";;* lme\n");
|
||||
fprintf(args->out, ";;* lme\n");
|
||||
return SEPOL_OK;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue