mirror of
https://github.com/topjohnwu/Magisk.git
synced 2024-12-22 07:57:39 +00:00
Remove unnecessary lock usage
This commit is contained in:
parent
f8967e9274
commit
66f49dfab5
@ -24,10 +24,7 @@ using token_list = std::vector<const char *>;
|
|||||||
using argument = std::pair<token_list, bool>;
|
using argument = std::pair<token_list, bool>;
|
||||||
using argument_list = std::vector<argument>;
|
using argument_list = std::vector<argument>;
|
||||||
|
|
||||||
const argument &all_xperm();
|
|
||||||
|
|
||||||
#define ALL nullptr
|
#define ALL nullptr
|
||||||
#define ALL_XPERM all_xperm()
|
|
||||||
|
|
||||||
struct sepolicy {
|
struct sepolicy {
|
||||||
using c_str = const char *;
|
using c_str = const char *;
|
||||||
|
@ -26,9 +26,11 @@ void sepolicy::magisk_rules() {
|
|||||||
allow(SEPOL_PROC_DOMAIN, ALL, ALL, ALL);
|
allow(SEPOL_PROC_DOMAIN, ALL, ALL, ALL);
|
||||||
// Allow us to do any ioctl
|
// Allow us to do any ioctl
|
||||||
if (impl->db->policyvers >= POLICYDB_VERSION_XPERMS_IOCTL) {
|
if (impl->db->policyvers >= POLICYDB_VERSION_XPERMS_IOCTL) {
|
||||||
allowxperm(SEPOL_PROC_DOMAIN, ALL, "blk_file", ALL_XPERM);
|
argument all;
|
||||||
allowxperm(SEPOL_PROC_DOMAIN, ALL, "fifo_file", ALL_XPERM);
|
all.first.push_back(nullptr);
|
||||||
allowxperm(SEPOL_PROC_DOMAIN, ALL, "chr_file", ALL_XPERM);
|
allowxperm(SEPOL_PROC_DOMAIN, ALL, "blk_file", all);
|
||||||
|
allowxperm(SEPOL_PROC_DOMAIN, ALL, "fifo_file", all);
|
||||||
|
allowxperm(SEPOL_PROC_DOMAIN, ALL, "chr_file", all);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Create unconstrained file type
|
// Create unconstrained file type
|
||||||
|
@ -8,13 +8,6 @@
|
|||||||
|
|
||||||
using namespace std;
|
using namespace std;
|
||||||
|
|
||||||
const argument &all_xperm() {
|
|
||||||
static argument arg;
|
|
||||||
if (arg.first.empty())
|
|
||||||
arg.first.push_back(nullptr);
|
|
||||||
return arg;
|
|
||||||
}
|
|
||||||
|
|
||||||
static const char *type_msg_1 =
|
static const char *type_msg_1 =
|
||||||
R"EOF("allow *source_type *target_type *class *perm_set"
|
R"EOF("allow *source_type *target_type *class *perm_set"
|
||||||
"deny *source_type *target_type *class *perm_set"
|
"deny *source_type *target_type *class *perm_set"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user