cli: use a better permission for keychain fallback (#206650)

Fixes https://github.com/microsoft/vscode-remote-release/issues/9619
This commit is contained in:
Connor Peet
2024-03-01 14:40:46 -08:00
committed by GitHub
parent eb4ebc2247
commit df809f53dd
2 changed files with 34 additions and 5 deletions

View File

@@ -404,7 +404,10 @@ impl Auth {
let mut keyring_storage = KeyringStorage::default();
#[cfg(target_os = "linux")]
let mut keyring_storage = ThreadKeyringStorage::default();
let mut file_storage = FileStorage(PersistedState::new(self.file_storage_path.clone()));
let mut file_storage = FileStorage(PersistedState::new_with_mode(
self.file_storage_path.clone(),
0o600,
));
let native_storage_result = if std::env::var("VSCODE_CLI_USE_FILE_KEYCHAIN").is_ok()
|| self.file_storage_path.exists()