Repository navigation
Conversation
An elevated PIMELauncher makes the Python backend create %APPDATA%\\PIME owned by BUILTIN\\Administrators, which the normal sign-in session cannot read; input methods then silently swallow keys with no error anywhere. The folder-creation and NULL-context fixes from the report landed in EasyIME#988; this completes the remaining suggestion: the watchdog now logs a warning naming the cause and the two icacls repair commands right after logging is set up, before any backend can create those folders. The worker child inherits the same token and stays silent, so the log carries one warning. Architecture and design by asdf80730. Implementation generated with AI assistance from omp (Qwen3.8-Flash-Next).
Contributor
Author
|
Could a maintainer approve the first workflow run for this fork PR? Local evidence is in the Validation list; the CI run is the remaining check. (Comment generated with assistance from omp + Qwen3.8-Flash-Next) |
This branch has not been deployed
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.
Fixes #973
Suggestions 1 and 2 of the report (dropping
mode=0o700, raising on a NULLchewing_new2()context) landed in #988. This completes the third: make anelevated
PIMELauncherrun visible instead of letting it poison%APPDATA%\PIMEsilently.PIMELauncher/src/elevation.rs:is_process_elevated()readsTokenElevationfrom the process token — a UAC-filtered token of anAdministrators member reports 0, so the check follows real privilege, not
group membership;
should_warn()gates the warning to the watchdog; andelevation_advice()carries the text: the folder the run poisons plus thetwo
icaclsrepair commands from the report.elevation::warn_if_elevated()right aftersetup_logging()and before the backend manager starts, so/consoleand/log-fileboth capture it while the user can still avoid the damage. Theworker child inherits the same token and stays silent, so the log carries
one warning, not two.
tracing::warn!with no dialog: an elevated launcher isalways a deliberate launch, and its debug log — the artifact people attach
when reporting "keys do nothing" — is where the diagnosis belongs.
Validation:
cargo test --target x86_64-pc-windows-gnu: 17 lib + 2 integration testspass, including 3 new
elevation::tests(watchdog-only gating, advicenames the icacls repair,
TokenElevationquery succeeds on the liveprocess token).
cargo clippy --target x86_64-pc-windows-gnu --all-targets: no newwarnings;
rustfmt --checkclean on the new module.ci / build-and-signand AppVeyor bothpass.
/log-filecompletes full startup(watchdog → worker → backend registry) and its log carries no elevation
warning while the process is not elevated.
Architecture and design by asdf80730. Implementation generated with AI
assistance from omp (Qwen3.8-Flash-Next).