async fn check_write( polkit: &PolkitAuthority, pid: u32, user: &str, tty: Option<&str>, ) -> Result<bool>
Check whether pid is allowed to write to user, optionally on a specific tty.
pid
write
user
tty