patch bitwarden to disable annoying ssh-agent confirmation and clean dead overlays
This commit is contained in:
parent
826146df9d
commit
f4f0691647
5 changed files with 44 additions and 75 deletions
7
overlay/bitwarden/default.nix
Normal file
7
overlay/bitwarden/default.nix
Normal file
|
@ -0,0 +1,7 @@
|
|||
final: prev: {
|
||||
bitwarden-desktop = prev.bitwarden-desktop.overrideAttrs (finalAttrs: prevAttrs: {
|
||||
patches = prevAttrs.patches ++ [
|
||||
./ssh-agent-no-confirm.patch
|
||||
];
|
||||
});
|
||||
}
|
34
overlay/bitwarden/ssh-agent-no-confirm.patch
Normal file
34
overlay/bitwarden/ssh-agent-no-confirm.patch
Normal file
|
@ -0,0 +1,34 @@
|
|||
diff --git a/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs b/core/src/ssh_agent/mod.rs
|
||||
index 4e304cc..8203dca 100644
|
||||
--- a/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs
|
||||
+++ b/apps/desktop/desktop_native/core/src/ssh_agent/mod.rs
|
||||
@@ -44,28 +44,7 @@ impl ssh_agent::Agent<peerinfo::models::PeerInfo> for BitwardenDesktopAgent {
|
||||
return false;
|
||||
}
|
||||
|
||||
- let request_id = self.get_request_id().await;
|
||||
- println!(
|
||||
- "[SSH Agent] Confirming request from application: {}",
|
||||
- info.process_name()
|
||||
- );
|
||||
-
|
||||
- let mut rx_channel = self.get_ui_response_rx.lock().await.resubscribe();
|
||||
- self.show_ui_request_tx
|
||||
- .send(SshAgentUIRequest {
|
||||
- request_id,
|
||||
- cipher_id: Some(ssh_key.cipher_uuid.clone()),
|
||||
- process_name: info.process_name().to_string(),
|
||||
- is_list: false,
|
||||
- })
|
||||
- .await
|
||||
- .expect("Should send request to ui");
|
||||
- while let Ok((id, response)) = rx_channel.recv().await {
|
||||
- if id == request_id {
|
||||
- return response;
|
||||
- }
|
||||
- }
|
||||
- false
|
||||
+ true
|
||||
}
|
||||
|
||||
async fn can_list(&self, info: &peerinfo::models::PeerInfo) -> bool {
|
Loading…
Add table
Add a link
Reference in a new issue