Parse rule files with Rust

This commit is contained in:
topjohnwu
2023-05-24 19:11:56 -07:00
parent 5a94ef9106
commit 18d0cedbe2
16 changed files with 176 additions and 93 deletions
+4 -2
View File
@@ -1,9 +1,10 @@
#pragma once
#include <stdlib.h>
#include <selinux.hpp>
#include <string>
#include <selinux.hpp>
#define ALL nullptr
struct sepolicy {
@@ -17,7 +18,8 @@ struct sepolicy {
// External APIs
bool to_file(c_str file);
void parse_statement(c_str stmt);
void parse_statement(c_str stmt, int len);
void parse_statement(c_str stmt) { parse_statement(stmt, strlen(stmt)); }
void load_rules(const std::string &rules);
void load_rule_file(c_str file);