Repository navigation
build: Build releases in release mode, and make the trusted-client overrides opt-in - #270
Merged
iinuwa merged 2 commits intoNov 20, 2026
Merged
Conversation
4f2a648 renamed the `default` profile to `release` in meson.options, but the Cargo builds still checked for `default`, so every build ran `cargo build` without `--release`. Release packages then shipped debug binaries, with the development-only CREDSD_TRUSTED_CALLERS and CREDSD_TRUSTED_APP_IDS overrides enabled.
kpanuragh
force-pushed
the
explicit-trust-overrides
branch
from
November 17, 2026 06:47
3b6ca23 to
5c0dfe9
Compare
iinuwa
requested changes
Nov 20, 2026
| # Probably has to do with forking the test processes. | ||
| run: meson test -C $BUILD_DIR --interactive | ||
|
|
||
| - name: Test trusted client overrides |
Member
There was a problem hiding this comment.
These tests and implementation are straightforward, non-default and intended for development only, so I don't think we should spend the CI time to recompile and run the entire test suite. Can you remove this?
Contributor
Author
There was a problem hiding this comment.
Removed the CI step. Clippy still checks the feature since it runs with --all-features.
CREDSD_TRUSTED_CALLERS and CREDSD_TRUSTED_APP_IDS were read in any build with debug_assertions, so a debug build was enough to let any process in the session become a privileged client. Read them only when built with -Denable_trusted_client_overrides=true, which turns on the daemon's trusted-client-overrides Cargo feature, like enable_core_dumps for the UI. Meson warns when the option is on, and the daemon logs a warning at startup. When it's off and either variable is set, the daemon logs that it's ignoring it, so existing development setups get a hint. CI also runs the daemon's unit tests with the feature on.
kpanuragh
force-pushed
the
explicit-trust-overrides
branch
from
November 20, 2026 05:34
5c0dfe9 to
116349b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to the private report, as discussed: the profile fix, plus an explicit build option for the trusted-client overrides, like
enable_core_dumps.Release builds were debug builds. Commit 4f2a648 renamed the
defaultprofile torelease, but threemeson.buildfiles still checked fordefault. So every build rancargo buildwithout--release, and installedtarget/debugbinaries. They now check forrelease.Overrides are opt-in.
CREDSD_TRUSTED_CALLERSandCREDSD_TRUSTED_APP_IDSused to be read in any build withdebug_assertions. Now they're only read when the daemon is built with-Denable_trusted_client_overrides=true:--features trusted-client-overridesto Cargo, and the two checks ingateway/mod.rstest that feature..vscode/launch.json.meson testonly covers the default.profile=development. So the development instructions in BUILDING.md now set the option, and say not to use it for installed builds.The
profileoption's description no longer says thatdevelopmentrelaxes security checks.Testing
cargo test --binspasses both with and without--features trusted-client-overrides, andcargo clippy --workspace --all-features -- -Dwarningsis clean.CREDSD_TRUSTED_CALLERS=/usr/bin/python3.14and sentCreateCredentialfrom python3:release)-Dprofile=development-Dprofile=development -Denable_trusted_client_overrides=trueOne thing to check when packaging 0.5.0: Rust's
lto = truefrom[profile.release]now applies again. With makepkg and Ubuntu's default flags, C LTO already has to be turned off for hidapi (see the PKGBUILD in #269).