fix command line password permission
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
parent
6f7eb17c48
commit
c0443e95d6
@ -214,7 +214,11 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
return None;
|
||||
} else if args[0] == "--password" {
|
||||
if args.len() == 2 {
|
||||
crate::ipc::set_permanent_password(args[1].to_owned()).unwrap();
|
||||
if crate::platform::is_root() {
|
||||
crate::ipc::set_permanent_password(args[1].to_owned()).unwrap();
|
||||
} else {
|
||||
log::info!("Permission denied!");
|
||||
}
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--check-hwcodec-config" {
|
||||
|
Loading…
x
Reference in New Issue
Block a user