Files
time-mocker/Cargo.toml
T
tiennm99 79d3b69dcd fix(mmf): fall back to Local\ namespace when controller is not elevated
Creating a `Global\TimeMocker_<pid>` mapping requires
`SeCreateGlobalPrivilege`, which an unelevated token (e.g. debug `cargo run`
where the UAC manifest is intentionally skipped) does not have, so
`CreateFileMappingW` returned NULL with `ERROR_ACCESS_DENIED` and the
auto-inject scanner spammed `create MMF Global\TimeMocker_<pid>` for every
enumerated PID.

The UI now tries `Global\` first and falls back to `Local\` on access
denied, with a one-shot log warning so the auto-inject loop doesn't
flood. The hook DLL probes both names on attach so the IPC pairs up
symmetrically. Release builds keep their elevated `Global\` cross-session
reach; debug builds work against same-session targets without admin.

Also adds a dedicated `time-mocker-test-target` crate — a small console
binary that prints all 5 hooked time APIs every second with its own PID
banner, so dev verification can inject into a controlled harness instead
of arbitrary running processes.
2026-05-20 21:46:31 +07:00

31 lines
580 B
TOML

[workspace]
resolver = "2"
members = [
"crates/time-mocker-core",
"crates/time-mocker-hook",
"crates/time-mocker-test-target",
"crates/time-mocker-ui",
]
[workspace.package]
version = "0.1.0"
edition = "2021"
license = "Apache-2.0"
authors = ["tiennm99"]
repository = "https://github.com/tiennm99/time-mocker"
rust-version = "1.90"
[workspace.dependencies]
windows = { version = "0.58", default-features = false }
windows-sys = "0.59"
[profile.release]
lto = "thin"
codegen-units = 1
strip = "symbols"
opt-level = 3
panic = "abort"
[profile.dev]
opt-level = 1