Fix non-root user startup and config fallback - #297
Draft
mister-teddy wants to merge 1 commit into
Draft
Conversation
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.
Summary
/etc/passwd, uses the account's actual home directory, and falls back to root when a configured user cannot be resolved0644permissions on/etc/passwdand/etc/groupbefore PRoot commands so non-root processes can resolve users and groupstry_usernameis consumed, and accept the reported[users]section spellingtry_usernamefirst and document recoveryRoot cause
Account database files modified inside PRoot can retain modes that make
passwdandgroupunreadable after dropping privileges. The launcher also trusted the configured username and assumed every non-root home was/home/<username>, so a missing account or nonstandard home could leave the desktop on a black or red screen.Separately, once
try_usernamewas commented out, an otherwise empty[user]table had no field-level default. That caused the entire TOML document to fall back to defaults and discarded valid command settings.Impact
Non-root sessions now start with a resolvable identity and the account's configured home. Invalid or missing account settings recover to a root desktop instead of trapping the user behind a blank screen, while one-shot config trials retain their documented fallback behavior.
Validation
cargo test --lib(9 passed)cargo clippy --lib -- -D warningscargo check --lib --target aarch64-linux-androidgit diff --checkThe Android target check reports only existing warnings in unrelated Smithay, webview, PulseAudio, and Wayland code.
Source issues