mirror of
https://github.com/rustdesk/rustdesk.git
synced 2026-04-09 17:21:28 +03:00
fix command line password permission
Signed-off-by: 21pages <pages21@163.com>
This commit is contained in:
@@ -214,7 +214,11 @@ pub fn core_main() -> Option<Vec<String>> {
|
|||||||
return None;
|
return None;
|
||||||
} else if args[0] == "--password" {
|
} else if args[0] == "--password" {
|
||||||
if args.len() == 2 {
|
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;
|
return None;
|
||||||
} else if args[0] == "--check-hwcodec-config" {
|
} else if args[0] == "--check-hwcodec-config" {
|
||||||
|
|||||||
Reference in New Issue
Block a user