Skip to content

Commit 08265a8

Browse files
committed
kp: bump to 0.13.1
kp: bump to 0.13.1 init package when startup load package_config by kernel apd: rm unused sepolicy check
1 parent 69da5ee commit 08265a8

File tree

8 files changed

+207
-955
lines changed

8 files changed

+207
-955
lines changed

apd/src/cli.rs

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -45,13 +45,8 @@ enum Commands {
4545
Resetprop(crate::resetprop::Args),
4646

4747
/// MagiskPolicy - SELinux Policy Patch Tool
48-
Policy(crate::mpolicy::Args),
48+
Sepolicy(crate::sepolicy::Args),
4949

50-
/// SELinux policy Patch tool
51-
Sepolicy {
52-
#[command(subcommand)]
53-
command: Sepolicy,
54-
},
5550
}
5651

5752
#[derive(clap::Subcommand, Debug)]
@@ -133,7 +128,7 @@ pub fn run() -> Result<()> {
133128
}
134129
if arg0.ends_with("magiskpolicy") {
135130
let all_args: Vec<String> = std::env::args().collect();
136-
crate::mpolicy::policy_main(&all_args)
131+
crate::sepolicy::policy_main(&all_args)
137132
}
138133

139134
let cli = Args::parse();
@@ -169,10 +164,6 @@ pub fn run() -> Result<()> {
169164
}
170165
}
171166

172-
Commands::Sepolicy { command } => match command {
173-
Sepolicy::Check { sepolicy } => crate::sepolicy::check_rule(&sepolicy),
174-
},
175-
176167
Commands::Services => event::on_services(cli.superkey),
177168

178169
Commands::Resetprop(resetprop_args) => crate::resetprop::execute(&resetprop_args)
@@ -184,7 +175,8 @@ pub fn run() -> Result<()> {
184175
}
185176
}),
186177

187-
Commands::Policy(policy_args) => crate::mpolicy::execute(&policy_args),
178+
Commands::Sepolicy(sepolicy_args) => crate::sepolicy::execute(&sepolicy_args),
179+
188180
};
189181

190182
if let Err(e) = &result {

apd/src/event.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
thread,
1010
time::Duration,
1111
};
12-
use crate::mpolicy::{get_policy_main};
12+
use crate::sepolicy::{get_policy_main};
1313
use anyhow::{Context, Result};
1414
use libc::SIGPWR;
1515
use log::{info, warn};
@@ -22,7 +22,7 @@ use signal_hook::{consts::signal::*, iterator::Signals};
2222
use crate::{
2323
assets, defs, lua, metamodule, module, restorecon, supercall,
2424
supercall::{
25-
init_load_package_uid_config, init_load_su_path, refresh_ap_package_list,
25+
init_load_su_path, refresh_ap_package_list,
2626
},
2727
utils::{self, switch_cgroups},
2828
};
@@ -46,7 +46,6 @@ pub fn on_post_data_fs(superkey: Option<String>) -> Result<()> {
4646
report_kernel(superkey.clone(), "post-fs-data", "before")?;
4747
use std::process::Stdio;
4848
#[cfg(unix)]
49-
init_load_package_uid_config(&superkey);
5049

5150
init_load_su_path(&superkey);
5251

apd/src/main.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ mod package;
1111
mod pty;
1212
mod restorecon;
1313
mod sepolicy;
14-
mod mpolicy;
1514
mod supercall;
1615
mod utils;
1716
mod resetprop;

apd/src/module.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ use std::{
99
process::Command,
1010
str::FromStr,
1111
};
12-
use crate::mpolicy::{get_policy_main};
12+
use crate::sepolicy::{get_policy_main};
1313
use crate::lua;
1414
use anyhow::{Context, Result, anyhow, bail, ensure};
1515
use const_format::concatcp;

apd/src/mpolicy.rs

Lines changed: 0 additions & 223 deletions
This file was deleted.

0 commit comments

Comments
 (0)