mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00: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;
|
||||
} 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" {
|
||||
|
||||
Reference in New Issue
Block a user