pub fn check_engine_launch(
v: &EngineLaunch<'_>,
) -> Result<(), UserDataViolation>Expand description
Judge one engine launch. A launch is refused, before anything starts, when:
- an argument equals (or is
flag=...of) a flag inforbidden_args; - the data directory, or an absolute environment value naming data, home, profile or config,
breaks
check_engine_dirs’s rules; - it names no isolated data directory: neither the
data_dir_envvariable nor thedata_dir_argflag carries a non-empty value thatGuard::check_diraccepts. Adata_dirthe target cannot deliver (nodata_dir_env) does not count, because the engine would never see it and would resolve its real per-user folder by its own default.
With refusal_probe the third rule is replaced by a second barrier, available only on Unix:
the child environment must redirect HOME into a directory that passes the guard, and
XDG_DATA_HOME / XDG_CONFIG_HOME (set by the launcher or inherited from this process) must
do the same where set. On Windows the probe is refused outright: the engine finds its folder
through the Known Folder API, which ignores the environment, so no environment redirect is a
barrier there.