Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions nmrs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ All notable changes to the `nmrs` crate will be documented in this file.
### Fixed
- `#[deprecated(since = ...)]` on `connect_vpn_by_uuid()` and `disconnect_vpn_by_uuid()` said `3.6.0`; corrected to `3.5.1`, the release that actually deprecated them.([#544](https://github.com/freedesktop-rs/nmrs/pull/544))
- `disconnect()` no longer fails with `org.freedesktop.NetworkManager.Device.NotActive` when the device finishes deactivating between the state check and the `Disconnect` call. The error is treated as already-disconnected and the call still waits for the device to settle. ([#544](https://github.com/freedesktop-rs/nmrs/pull/544))
- Saved-profile lookups (`get_saved_connection_path()`, `get_saved_connection_uuid()`, `has_saved_connection()`, and the Wi-Fi/wired/VPN/Bluetooth connect paths built on them) no longer fail when a profile restricted to another user via `connection.permissions` exists. `GetSettings` returns `Settings.PermissionDenied` for those; they are now skipped instead of aborting the whole scan, which previously made known networks prompt for a password and then fail to connect. ([#545](https://github.com/freedesktop-rs/nmrs/pull/545))

## [3.5.1] - 2026-09-02
### Added
Expand Down
18 changes: 13 additions & 5 deletions nmrs/src/core/connection_settings.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,20 @@ async fn find_saved_connection_by_name(
for cpath in conns {
let cproxy = connection_settings_proxy(conn, cpath.clone()).await?;

let msg = cproxy.call_method("GetSettings", &()).await.map_err(|e| {
ConnectionError::DbusOperation {
context: format!("failed to get settings for {}", cpath.as_str()),
source: e,
// `ListConnections` includes profiles restricted to other users via
// `connection.permissions`; `GetSettings` on those fails with
// `Settings.PermissionDenied`. Skip them instead of failing the
// whole lookup, matching the other profile scans in this crate.
let msg = match cproxy.call_method("GetSettings", &()).await {
Ok(msg) => msg,
Err(e) => {
trace!(
"skipping saved connection {}: GetSettings failed: {e}",
cpath.as_str()
);
continue;
}
})?;
};

let body = msg.body();
let all: HashMap<String, HashMap<String, Value>> = body.deserialize()?;
Expand Down