Skip to content

server: replace only items with identical attributes - #549

Merged
bilelmoussaoui merged 3 commits into
linux-credentials:mainfrom
julian-corbet:fix-exact-create-item-replacement
Aug 15, 2026
Merged

server: replace only items with identical attributes#549
bilelmoussaoui merged 3 commits into
linux-credentials:mainfrom
julian-corbet:fix-exact-create-item-replacement

Conversation

@julian-corbet

Copy link
Copy Markdown
Contributor

CreateItem(replace=true) currently reuses the subset matcher needed by SearchItems. As a result, creating an item with a coarser attribute set removes every more-specific item that contains those attributes.

This change:

  • adds exact matching for both encrypted and unencrypted file items
  • uses it for single and bulk file-backend replacement
  • uses it for the D-Bus server's in-memory item replacement
  • keeps subset matching unchanged for searches and explicit query deletion
  • adds regressions for the file, bulk, and D-Bus paths, including exact replacement after a coarse item is created

Fixes #541.

@julian-corbet

Copy link
Copy Markdown
Contributor Author

Validation update:

The upstream PR workflows are still awaiting first-time-contributor approval.

Comment thread client/src/file/mod.rs Outdated
Comment thread client/src/file/unlocked_keyring.rs
Comment thread client/src/file/unlocked_keyring.rs
Comment thread server/src/collection/tests.rs Outdated
@bilelmoussaoui

Copy link
Copy Markdown
Collaborator

Both CI failures are unrelated to this one, so ignore them

@julian-corbet
julian-corbet force-pushed the fix-exact-create-item-replacement branch from 3d81086 to 125cd56 Compare August 14, 2026 11:36
Comment thread client/src/file/unlocked_item.rs Outdated
Comment thread server/src/collection/mod.rs Outdated
@julian-corbet

Copy link
Copy Markdown
Contributor Author

Review revision validation: fork CI passes Check, Rustfmt, Clippy, the full Test Suite, and Meson. cargo-deny reports the same wildcard dependency, duplicate syn, and RUSTSEC-2026-0244 errors as the untouched main baseline; this revision introduces no new policy errors.

@bilelmoussaoui
bilelmoussaoui merged commit 7b8edfb into linux-credentials:main Aug 15, 2026
15 of 17 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

CreateItem(replace=true) deletes items whose attributes are a superset of the given ones

2 participants