mirror of
https://github.com/weyne85/rustdesk.git
synced 2025-10-29 17:00:05 +00:00
unlock with PIN (#8977)
* add custom password to unlock settings * If not set, use admin password; if set, use custom settings password. * At least 4 characters. * Set with gui or command line. Signed-off-by: 21pages <sunboeasy@gmail.com> * Update cn.rs --------- Signed-off-by: 21pages <sunboeasy@gmail.com> Co-authored-by: RustDesk <71636191+rustdesk@users.noreply.github.com>
This commit is contained in:
@@ -316,6 +316,20 @@ pub fn core_main() -> Option<Vec<String>> {
|
||||
}
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--set-unlock-pin" {
|
||||
#[cfg(feature = "flutter")]
|
||||
if args.len() == 2 {
|
||||
if crate::platform::is_installed() && is_root() {
|
||||
if let Err(err) = crate::ipc::set_unlock_pin(args[1].to_owned(), false) {
|
||||
println!("{err}");
|
||||
} else {
|
||||
println!("Done!");
|
||||
}
|
||||
} else {
|
||||
println!("Installation and administrative privileges required!");
|
||||
}
|
||||
}
|
||||
return None;
|
||||
} else if args[0] == "--get-id" {
|
||||
println!("{}", crate::ipc::get_id());
|
||||
return None;
|
||||
|
||||
Reference in New Issue
Block a user