[INFO] fetching crate firehazard 0.0.0-2022-09-10... [INFO] testing firehazard-0.0.0-2022-09-10 against try#dec9417b8611e34e787a3e4c37686b5131f9e5c5 for pr-154210-1 [INFO] extracting crate firehazard 0.0.0-2022-09-10 into /workspace/builds/worker-1-tc2/source [INFO] removed /workspace/builds/worker-1-tc2/source/.cargo/config.toml [INFO] removed /workspace/builds/worker-1-tc2/source/rust-toolchain.toml [INFO] started tweaking crates.io crate firehazard 0.0.0-2022-09-10 [INFO] finished tweaking crates.io crate firehazard 0.0.0-2022-09-10 [INFO] tweaked toml for crates.io crate firehazard 0.0.0-2022-09-10 written to /workspace/builds/worker-1-tc2/source/Cargo.toml [INFO] validating manifest of crates.io crate firehazard 0.0.0-2022-09-10 on toolchain dec9417b8611e34e787a3e4c37686b5131f9e5c5 [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--manifest-path" "Cargo.toml" "--no-deps", kill_on_drop: false }` [INFO] crate crates.io crate firehazard 0.0.0-2022-09-10 already has a lockfile, it will not be regenerated [INFO] running `Command { std: CARGO_HOME="/workspace/cargo-home" RUSTUP_HOME="/workspace/rustup-home" "/workspace/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "fetch" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 84dfd69315220a7994c9536f69a0be0792117bf18e089fb0842e2f9bcff77a8e [INFO] running `Command { std: "docker" "start" "-a" "84dfd69315220a7994c9536f69a0be0792117bf18e089fb0842e2f9bcff77a8e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "84dfd69315220a7994c9536f69a0be0792117bf18e089fb0842e2f9bcff77a8e", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "84dfd69315220a7994c9536f69a0be0792117bf18e089fb0842e2f9bcff77a8e", kill_on_drop: false }` [INFO] [stdout] 84dfd69315220a7994c9536f69a0be0792117bf18e089fb0842e2f9bcff77a8e [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "build" "--frozen" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 08752a39c0bc6669d6dc0b86b609a606baf520f7881bbae4935f59189297f569 [INFO] running `Command { std: "docker" "start" "-a" "08752a39c0bc6669d6dc0b86b609a606baf520f7881bbae4935f59189297f569", kill_on_drop: false }` [INFO] [stderr] Compiling proc-macro2 v1.0.43 [INFO] [stderr] Compiling quote v1.0.21 [INFO] [stderr] Compiling unicode-ident v1.0.3 [INFO] [stderr] Compiling syn v1.0.99 [INFO] [stderr] Compiling firehazard v0.0.0-2022-09-10 (/opt/rustwide/workdir) [INFO] [stderr] Compiling abistr-macros v0.2.0-rc3 [INFO] [stderr] Compiling widestring v1.0.2 [INFO] [stderr] Compiling abibool v0.5.3 [INFO] [stderr] Compiling abistr v0.2.0-rc3 [INFO] [stderr] Compiling bytemuck_derive v1.2.1 [INFO] [stderr] Compiling bytemuck v1.12.1 [INFO] [stderr] Finished `dev` profile [unoptimized + debuginfo] target(s) in 6.58s [INFO] running `Command { std: "docker" "inspect" "08752a39c0bc6669d6dc0b86b609a606baf520f7881bbae4935f59189297f569", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "08752a39c0bc6669d6dc0b86b609a606baf520f7881bbae4935f59189297f569", kill_on_drop: false }` [INFO] [stdout] 08752a39c0bc6669d6dc0b86b609a606baf520f7881bbae4935f59189297f569 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-1-tc2/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTFLAGS=--cap-lints=forbid" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--user" "0:0" "--network" "none" "ghcr.io/rust-lang/crates-build-env/linux@sha256:d429b63d4308055ea97f60fb1d3dfca48854a00942f1bd2ad806beaf015945ec" "/opt/rustwide/cargo-home/bin/cargo" "+dec9417b8611e34e787a3e4c37686b5131f9e5c5" "test" "--frozen" "--no-run" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] 6186750b3f4696ba85516a025d9b0b68db4b89cedd95ae8768d25bd5f42d3c27 [INFO] running `Command { std: "docker" "start" "-a" "6186750b3f4696ba85516a025d9b0b68db4b89cedd95ae8768d25bd5f42d3c27", kill_on_drop: false }` [INFO] [stderr] Compiling firehazard v0.0.0-2022-09-10 (/opt/rustwide/workdir) [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use winapi::shared::winerror::*; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `privilege` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:24:79 [INFO] [stdout] | [INFO] [stdout] 24 | ...&permissive, None, None, Some(&[privilege::LuidAndAttributes::new(se_shutdown, privilege::Attributes::default())]), None).unwrap(); [INFO] [stdout] | ^^^^^^^^^ use of unresolved module or unlinked crate `privilege` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `privilege`, use `cargo add privilege` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `privilege` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:24:126 [INFO] [stdout] | [INFO] [stdout] 24 | ...AndAttributes::new(se_shutdown, privilege::Attributes::default())]), None).unwrap(); [INFO] [stdout] | ^^^^^^^^^ use of unresolved module or unlinked crate `privilege` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `privilege`, use `cargo add privilege` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `process` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:32:14 [INFO] [stdout] | [INFO] [stdout] 32 | let si = process::StartupInfoW::default(); [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `process` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `process`, use `cargo add process` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `process` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:33:118 [INFO] [stdout] | [INFO] [stdout] 33 | ...false, process::DETACHED_PROCESS, process::environment::Inherit, (), &si)?; [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `process` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `process`, use `cargo add process` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find type `Error` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:30:76 [INFO] [stdout] | [INFO] [stdout] 30 | fn shutdown_as_user(args: &str, token: &token::OwnedHandle) -> Result { [INFO] [stdout] | ^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing one of these items [INFO] [stdout] | [INFO] [stdout] 3 + use std::error::Error; [INFO] [stdout] | [INFO] [stdout] 3 + use std::fmt::Error; [INFO] [stdout] | [INFO] [stdout] 3 + use std::io::Error; [INFO] [stdout] | [INFO] [stdout] 3 + use core::error::Error; [INFO] [stdout] | [INFO] [stdout] = and 1 other candidate [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/restrict_child_shutdown.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_current_process` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:11:41 [INFO] [stdout] | [INFO] [stdout] 11 | let permissive = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:11:64 [INFO] [stdout] | [INFO] [stdout] 11 | let permissive = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `open_process_token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:11:22 [INFO] [stdout] | [INFO] [stdout] 11 | let permissive = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:17:60 [INFO] [stdout] | [INFO] [stdout] 17 | let restrictive = create_restricted_token(&permissive, token::DISABLE_MAX_PRIVILEGE, None, None, None).unwrap(); [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_restricted_token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:17:23 [INFO] [stdout] | [INFO] [stdout] 17 | let restrictive = create_restricted_token(&permissive, token::DISABLE_MAX_PRIVILEGE, None, None, None).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `lookup_privilege_value_a` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:23:23 [INFO] [stdout] | [INFO] [stdout] 23 | let se_shutdown = lookup_privilege_value_a(cstr!("SeShutdownPrivilege")).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_restricted_token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:24:23 [INFO] [stdout] | [INFO] [stdout] 24 | let restrictive = create_restricted_token(&permissive, None, None, Some(&[privilege::LuidAndAttributes::new(se_shutdown, privile... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `process` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:33:91 [INFO] [stdout] | [INFO] [stdout] 33 | ...mut args[..]), None, None, false, process::DETACHED_PROCESS, process::environment::Inherit, (), &si)?; [INFO] [stdout] | ^^^^^^^ use of unresolved module or unlinked crate `process` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `process`, use `cargo add process` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_process_as_user_w` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:33:15 [INFO] [stdout] | [INFO] [stdout] 33 | let cmd = create_process_as_user_w(token, (), Some(&mut args[..]), None, None, false, process::DETACHED_PROCESS, process::enviro... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `wait_for_process` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | wait_for_process(&cmd.process) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/restrict_child_shutdown.rs:30:41 [INFO] [stdout] | [INFO] [stdout] 30 | fn shutdown_as_user(args: &str, token: &token::OwnedHandle) -> Result { [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stderr] error: could not compile `firehazard` (example "restrict_child_shutdown") due to 17 previous errors; 1 warning emitted [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use winapi::um::winnt::*; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] warning: build failed, waiting for other jobs to finish... [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:13:51 [INFO] [stdout] | [INFO] [stdout] 13 | t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0x1000), None)).unwrap_err(); // Can't raise integrity [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `firehazard::process` [INFO] [stdout] --> examples/ui_switch_desktop.rs:11:17 [INFO] [stdout] | [INFO] [stdout] 11 | use firehazard::process::{environment, StartupInfoW}; [INFO] [stdout] | ^^^^^^^ could not find `process` in `firehazard` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:11:51 [INFO] [stdout] | [INFO] [stdout] 11 | t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0), None)).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `firehazard::process` [INFO] [stdout] --> examples/max_sandbox/attribute.rs:2:17 [INFO] [stdout] | [INFO] [stdout] 2 | use firehazard::process::ThreadAttributeList; [INFO] [stdout] | ^^^^^^^ could not find `process` in `firehazard` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/run.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use winapi::um::winbase::*; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use winapi::ctypes::c_void; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:4:5 [INFO] [stdout] | [INFO] [stdout] 4 | use winapi::shared::minwindef::FALSE; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | use winapi::um::handleapi::DuplicateHandle; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:6:5 [INFO] [stdout] | [INFO] [stdout] 6 | use winapi::um::minwinbase::*; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `winapi` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:7:5 [INFO] [stdout] | [INFO] [stdout] 7 | use winapi::um::winnt::*; [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `winapi` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `winapi`, use `cargo add winapi` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `debug` in this scope [INFO] [stdout] --> examples/max_sandbox/debugger.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 27 | use debug::DebugEventU::*; [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `debug` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `debug`, use `cargo add debug` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0432]: unresolved import `firehazard::job` [INFO] [stdout] --> examples/max_sandbox/job.rs:7:21 [INFO] [stdout] | [INFO] [stdout] 7 | pub use firehazard::job::*; [INFO] [stdout] | ^^^ could not find `job` in `firehazard` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/max_sandbox/settings.rs:21:35 [INFO] [stdout] | [INFO] [stdout] 21 | restricted: Some(vec![sid!(S-1-0-0)]), [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/max_sandbox/settings.rs:60:27 [INFO] [stdout] | [INFO] [stdout] 60 | let users = sid!(S-1-5-32-545); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:14:90 [INFO] [stdout] | [INFO] [stdout] 14 | let r = create_restricted_token(&t, None, None, None, Some(&[sid::AndAttributes::new(sid!(S-1-0-0), None)])).unwrap(); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/max_sandbox/settings.rs:61:27 [INFO] [stdout] | [INFO] [stdout] 61 | let everyone = sid!(S-1-1-0); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `sid` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:11:27 [INFO] [stdout] | [INFO] [stdout] 11 | t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0), None)).unwrap(); [INFO] [stdout] | ^^^ use of unresolved module or unlinked crate `sid` [INFO] [stdout] | [INFO] [stdout] help: there is a crate or module with a similar name [INFO] [stdout] | [INFO] [stdout] 11 - t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0), None)).unwrap(); [INFO] [stdout] 11 + t.set_integrity_level(std::AndAttributes::new(sid!(S-1-16-0), None)).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error: cannot find macro `sid` in this scope [INFO] [stdout] --> examples/max_sandbox/settings.rs:62:27 [INFO] [stdout] | [INFO] [stdout] 62 | let null = sid!(S-1-0-0); [INFO] [stdout] | ^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `sid` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:14:66 [INFO] [stdout] | [INFO] [stdout] 14 | let r = create_restricted_token(&t, None, None, None, Some(&[sid::AndAttributes::new(sid!(S-1-0-0), None)])).unwrap(); [INFO] [stdout] | ^^^ use of unresolved module or unlinked crate `sid` [INFO] [stdout] | [INFO] [stdout] help: there is a crate or module with a similar name [INFO] [stdout] | [INFO] [stdout] 14 - let r = create_restricted_token(&t, None, None, None, Some(&[sid::AndAttributes::new(sid!(S-1-0-0), None)])).unwrap(); [INFO] [stdout] 14 + let r = create_restricted_token(&t, None, None, None, Some(&[std::AndAttributes::new(sid!(S-1-0-0), None)])).unwrap(); [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0405]: cannot find trait `FromLocalHandle` in this scope [INFO] [stdout] --> examples/less_trivial.rs:43:29 [INFO] [stdout] | [INFO] [stdout] 43 | unsafe fn env_var_handle(name: &str) -> H { [INFO] [stdout] | ^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/spam_dbg.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/less_trivial.rs:3:5 [INFO] [stdout] | [INFO] [stdout] 3 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `io` in this scope [INFO] [stdout] --> examples/less_trivial.rs:26:35 [INFO] [stdout] | [INFO] [stdout] 26 | let mut write_handle : io::WriteHandle<'static> = unsafe { env_var_handle("%WRITE_HANDLE%" ) }; [INFO] [stdout] | ^^ use of unresolved module or unlinked crate `io` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `io`, use `cargo add io` to add it to your `Cargo.toml` [INFO] [stdout] help: a builtin type with a similar name exists [INFO] [stdout] | [INFO] [stdout] 26 - let mut write_handle : io::WriteHandle<'static> = unsafe { env_var_handle("%WRITE_HANDLE%" ) }; [INFO] [stdout] 26 + let mut write_handle : i8::WriteHandle<'static> = unsafe { env_var_handle("%WRITE_HANDLE%" ) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `io` in this scope [INFO] [stdout] --> examples/less_trivial.rs:27:35 [INFO] [stdout] | [INFO] [stdout] 27 | let read_handle_noinherit : io::ReadHandle<'static> = unsafe { env_var_handle("%READ_HANDLE_NOINHERIT%" ) }; [INFO] [stdout] | ^^ use of unresolved module or unlinked crate `io` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `io`, use `cargo add io` to add it to your `Cargo.toml` [INFO] [stdout] help: a builtin type with a similar name exists [INFO] [stdout] | [INFO] [stdout] 27 - let read_handle_noinherit : io::ReadHandle<'static> = unsafe { env_var_handle("%READ_HANDLE_NOINHERIT%" ) }; [INFO] [stdout] 27 + let read_handle_noinherit : i8::ReadHandle<'static> = unsafe { env_var_handle("%READ_HANDLE_NOINHERIT%" ) }; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `output_debug_string_a` in this scope [INFO] [stdout] --> examples/less_trivial.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | output_debug_string_a(cstr!("sandbox")); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_current_process` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:13:32 [INFO] [stdout] | [INFO] [stdout] 13 | let t = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:13:55 [INFO] [stdout] | [INFO] [stdout] 13 | let t = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `open_process_token` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:13:13 [INFO] [stdout] | [INFO] [stdout] 13 | let t = open_process_token(get_current_process(), token::ALL_ACCESS).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_restricted_token` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:14:13 [INFO] [stdout] | [INFO] [stdout] 14 | let r = create_restricted_token(&t, None, None, None, Some(&[sid::AndAttributes::new(sid!(S-1-0-0), None)])).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_handle_information` in this scope [INFO] [stdout] --> examples/less_trivial.rs:28:18 [INFO] [stdout] | [INFO] [stdout] 28 | let _ = dbg!(get_handle_information(write_handle)); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_handle_information` in this scope [INFO] [stdout] --> examples/less_trivial.rs:39:50 [INFO] [stdout] | [INFO] [stdout] 39 | let _ = dbg!(std::panic::catch_unwind(|| get_handle_information(read_handle_noinherit))); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0405, E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0405`. [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_ASLR_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:7:22 [INFO] [stdout] | [INFO] [stdout] 7 | let mut policy = PROCESS_MITIGATION_ASLR_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:14:22 [INFO] [stdout] | [INFO] [stdout] 14 | let mut policy = PROCESS_MITIGATION_BINARY_SIGNATURE_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_CHILD_PROCESS_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:20:22 [INFO] [stdout] | [INFO] [stdout] 20 | let mut policy = PROCESS_MITIGATION_CHILD_PROCESS_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:25:22 [INFO] [stdout] | [INFO] [stdout] 25 | let mut policy = PROCESS_MITIGATION_CONTROL_FLOW_GUARD_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_DEP_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:31:22 [INFO] [stdout] | [INFO] [stdout] 31 | let mut policy = PROCESS_MITIGATION_DEP_POLICY { Flags: 0, Permanent: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_DYNAMIC_CODE_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:37:22 [INFO] [stdout] | [INFO] [stdout] 37 | let mut policy = PROCESS_MITIGATION_DYNAMIC_CODE_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:43:22 [INFO] [stdout] | [INFO] [stdout] 43 | let mut policy = PROCESS_MITIGATION_EXTENSION_POINT_DISABLE_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_FONT_DISABLE_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:47:22 [INFO] [stdout] | [INFO] [stdout] 47 | let mut policy = PROCESS_MITIGATION_FONT_DISABLE_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_IMAGE_LOAD_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:51:22 [INFO] [stdout] | [INFO] [stdout] 51 | let mut policy = PROCESS_MITIGATION_IMAGE_LOAD_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:57:22 [INFO] [stdout] | [INFO] [stdout] 57 | let mut policy = PROCESS_MITIGATION_PAYLOAD_RESTRICTION_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:66:22 [INFO] [stdout] | [INFO] [stdout] 66 | let mut policy = PROCESS_MITIGATION_STRICT_HANDLE_CHECK_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:71:22 [INFO] [stdout] | [INFO] [stdout] 71 | let mut policy = PROCESS_MITIGATION_SYSTEM_CALL_DISABLE_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0422]: cannot find struct, variant or union type `PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:75:22 [INFO] [stdout] | [INFO] [stdout] 75 | let mut policy = PROCESS_MITIGATION_SYSTEM_CALL_FILTER_POLICY { Flags: 0 }; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/restrict_self_policy.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find type `Luid` in this scope [INFO] [stdout] --> examples/spam_dbg.rs:35:29 [INFO] [stdout] | [INFO] [stdout] 35 | dbg!(t.origin().map(|o| Luid::from(o.OriginatingLogonSession))); [INFO] [stdout] | ^^^^ use of undeclared type `Luid` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `heap_enable_termination_on_corruption` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:5:5 [INFO] [stdout] | [INFO] [stdout] 5 | heap_enable_termination_on_corruption().unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `firehazard` (example "less_trivial") due to 6 previous errors; 1 warning emitted [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:35:50 [INFO] [stdout] | [INFO] [stdout] 35 | assert_eq!(core::mem::size_of::()==8, set_process_mitigation_policy(policy).is_err()); // ERROR_NOT_SUPPORTED - possibly ... [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:41:5 [INFO] [stdout] | [INFO] [stdout] 41 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:55:5 [INFO] [stdout] | [INFO] [stdout] 55 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:73:5 [INFO] [stdout] | [INFO] [stdout] 73 | set_process_mitigation_policy(policy).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `set_process_mitigation_policy` in this scope [INFO] [stdout] --> examples/restrict_self_policy.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | set_process_mitigation_policy(policy).unwrap(); // XXX: "This structure is not supported." [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0422, E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0422`. [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `sleep_ms` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:41:9 [INFO] [stdout] | [INFO] [stdout] 41 | sleep_ms(3000); [INFO] [stdout] | ^^^^^^^^ not found in this scope [INFO] [stdout] | [INFO] [stdout] help: consider importing this function [INFO] [stdout] | [INFO] [stdout] 10 + use std::thread::sleep_ms; [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/ui_switch_desktop.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `sid` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:13:27 [INFO] [stdout] | [INFO] [stdout] 13 | t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0x1000), None)).unwrap_err(); // Can't raise integrity [INFO] [stdout] | ^^^ use of unresolved module or unlinked crate `sid` [INFO] [stdout] | [INFO] [stdout] help: there is a crate or module with a similar name [INFO] [stdout] | [INFO] [stdout] 13 - t.set_integrity_level(sid::AndAttributes::new(sid!(S-1-16-0x1000), None)).unwrap_err(); // Can't raise integrity [INFO] [stdout] 13 + t.set_integrity_level(std::AndAttributes::new(sid!(S-1-16-0x1000), None)).unwrap_err(); // Can't raise integrity [INFO] [stdout] | [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] error: could not compile `firehazard` (example "spam_dbg") due to 7 previous errors; 1 warning emitted [INFO] [stderr] error: could not compile `firehazard` (example "restrict_self_policy") due to 26 previous errors; 1 warning emitted [INFO] [stderr] error: could not compile `firehazard` (example "restrict_self_integrity") due to 10 previous errors; 1 warning emitted [INFO] [stdout] error[E0425]: cannot find function `get_current_thread_id` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:19:40 [INFO] [stdout] | [INFO] [stdout] 19 | let original = open_thread_desktop(get_current_thread_id()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `open_thread_desktop` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:19:20 [INFO] [stdout] | [INFO] [stdout] 19 | let original = open_thread_desktop(get_current_thread_id()).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `access` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:21:66 [INFO] [stdout] | [INFO] [stdout] 21 | let desktop = create_desktop_w(desktop_name, (), None, None, access::GENERIC_ALL, None).unwrap(); [INFO] [stdout] | ^^^^^^ use of unresolved module or unlinked crate `access` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `access`, use `cargo add access` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/restrict_self_integrity.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_current_process` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:10:32 [INFO] [stdout] | [INFO] [stdout] 10 | let t = open_process_token(get_current_process(), token::ADJUST_DEFAULT).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_desktop_w` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:21:19 [INFO] [stdout] | [INFO] [stdout] 21 | let desktop = create_desktop_w(desktop_name, (), None, None, access::GENERIC_ALL, None).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `switch_desktop` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:24:5 [INFO] [stdout] | [INFO] [stdout] 24 | switch_desktop(&original).expect("unable to switch_desktop to original desktop, that's a bit sketchy"); [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `argv_to_command_line_0` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:28:23 [INFO] [stdout] | [INFO] [stdout] 28 | let mut cmd = argv_to_command_line_0(t, args); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:10:55 [INFO] [stdout] | [INFO] [stdout] 10 | let t = open_process_token(get_current_process(), token::ADJUST_DEFAULT).unwrap(); [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `open_process_token` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:10:13 [INFO] [stdout] | [INFO] [stdout] 10 | let t = open_process_token(get_current_process(), token::ADJUST_DEFAULT).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `get_current_process` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:12:29 [INFO] [stdout] | [INFO] [stdout] 12 | dbg!(open_process_token(get_current_process(), token::QUERY).unwrap().integrity_level().unwrap().label().sid); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0433]: cannot find module or crate `token` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:12:52 [INFO] [stdout] | [INFO] [stdout] 12 | dbg!(open_process_token(get_current_process(), token::QUERY).unwrap().integrity_level().unwrap().label().sid); [INFO] [stdout] | ^^^^^ use of unresolved module or unlinked crate `token` [INFO] [stdout] | [INFO] [stdout] = help: if you wanted to use a crate named `token`, use `cargo add token` to add it to your `Cargo.toml` [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `open_process_token` in this scope [INFO] [stdout] --> examples/restrict_self_integrity.rs:12:10 [INFO] [stdout] | [INFO] [stdout] 12 | dbg!(open_process_token(get_current_process(), token::QUERY).unwrap().integrity_level().unwrap().label().sid); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `create_process_w` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:29:9 [INFO] [stdout] | [INFO] [stdout] 29 | create_process_w((), Some(&mut cmd[..]), None, None, false, None, environment::Inherit, (), &StartupInfoW { [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `switch_desktop` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | switch_desktop(&desktop).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `wait_for_process` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:39:9 [INFO] [stdout] | [INFO] [stdout] 39 | wait_for_process(&child.process) [INFO] [stdout] | ^^^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0425]: cannot find function `switch_desktop` in this scope [INFO] [stdout] --> examples/ui_switch_desktop.rs:45:5 [INFO] [stdout] | [INFO] [stdout] 45 | switch_desktop(&original).unwrap(); [INFO] [stdout] | ^^^^^^^^^^^^^^ not found in this scope [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0432, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0425, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0425`. [INFO] [stdout] [INFO] [stderr] error: could not compile `firehazard` (example "ui_switch_desktop") due to 12 previous errors; 1 warning emitted [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/attribute.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] | [INFO] [stdout] = note: `#[warn(unused_imports)]` (part of `#[warn(unused)]`) on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `nope` [INFO] [stdout] --> examples/max_sandbox/attribute.rs:74:19 [INFO] [stdout] | [INFO] [stdout] 74 | #[cfg(nope)] { [INFO] [stdout] | ^^^^ [INFO] [stdout] | [INFO] [stdout] = help: expected names are: `docsrs`, `feature`, and `test` and 31 more [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(nope)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(nope)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] = note: `#[warn(unexpected_cfgs)]` on by default [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/debugger.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/job.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/run.rs:2:5 [INFO] [stdout] | [INFO] [stdout] 2 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `std` [INFO] [stdout] --> examples/max_sandbox/run.rs:52:11 [INFO] [stdout] | [INFO] [stdout] 52 | #[cfg(std)] let conio = { [INFO] [stdout] | ^^^ help: found config with similar value: `feature = "std"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(std)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(std)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `std` [INFO] [stdout] --> examples/max_sandbox/run.rs:70:11 [INFO] [stdout] | [INFO] [stdout] 70 | #[cfg(std)] match conio.join().unwrap() { [INFO] [stdout] | ^^^ help: found config with similar value: `feature = "std"` [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(std)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(std)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/settings.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unexpected `cfg` condition name: `cet` [INFO] [stdout] --> examples/max_sandbox/settings.rs:39:36 [INFO] [stdout] | [INFO] [stdout] 39 | missing_cet: ! cfg!(cet), [INFO] [stdout] | ^^^ [INFO] [stdout] | [INFO] [stdout] = help: consider using a Cargo feature instead [INFO] [stdout] = help: or consider adding in `Cargo.toml` the `check-cfg` lint config for the lint: [INFO] [stdout] [lints.rust] [INFO] [stdout] unexpected_cfgs = { level = "warn", check-cfg = ['cfg(cet)'] } [INFO] [stdout] = help: or consider adding `println!("cargo::rustc-check-cfg=cfg(cet)");` to the top of the `build.rs` [INFO] [stdout] = note: see for more information about checking conditional configuration [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: unused import: `firehazard::*` [INFO] [stdout] --> examples/max_sandbox/tokens.rs:1:5 [INFO] [stdout] | [INFO] [stdout] 1 | use firehazard::*; [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: no implementation for `() | bool` [INFO] [stdout] --> examples/max_sandbox/attribute.rs:27:13 [INFO] [stdout] | [INFO] [stdout] 18 | ... let policy1 = () [INFO] [stdout] | _____________________- [INFO] [stdout] 19 | | ... | process::creation::mitigation_policy::DEP_ENABLE [INFO] [stdout] 20 | | ... //| process::creation::mitigation_policy::DEP_ATL_THUNK_ENABLE [INFO] [stdout] 21 | | ... | process::creation::mitigation_policy::SEHOP_ENABLE [INFO] [stdout] ... | [INFO] [stdout] 25 | | ... | process::creation::mitigation_policy::high_entropy_aslr::ALWAYS_ON [INFO] [stdout] 26 | | ... | process::creation::mitigation_policy::strict_handle_checks::ALWAYS_ON [INFO] [stdout] | |_________________________________________________________________________________- () [INFO] [stdout] 27 | ... | (!target.allow.same_desktop * process::creation::mitigation_policy::win32k_system_call_disable::ALWAYS_ON) // user32.d... [INFO] [stdout] | ^ ---------------------------------------------------------------------------------------------------------- bool [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] error[E0369]: no implementation for `Option<_> | bool` [INFO] [stdout] --> examples/max_sandbox/attribute.rs:45:13 [INFO] [stdout] | [INFO] [stdout] 40 | let policy2 = None [INFO] [stdout] | _______________________- [INFO] [stdout] 41 | | | process::creation::mitigation_policy2::loader_integrity_continuity::ALWAYS_ON [INFO] [stdout] 42 | | | process::creation::mitigation_policy2::strict_control_flow_guard::ALWAYS_ON [INFO] [stdout] 43 | | | process::creation::mitigation_policy2::module_tampering_protection::ALWAYS_ON [INFO] [stdout] 44 | | | process::creation::mitigation_policy2::restrict_indirect_branch_prediction::ALWAYS_ON [INFO] [stdout] | |___________________________________________________________________________________________________- Option<_> [INFO] [stdout] 45 | | (!target.allow.dynamic_code * process::creation::mitigation_policy2::allow_downgrade_dynamic_code_policy::ALWAYS_OFF) [INFO] [stdout] | ^ --------------------------------------------------------------------------------------------------------------------- bool [INFO] [stdout] | [INFO] [stdout] note: `Option<_>` does not implement `BitOr` [INFO] [stdout] --> /rustc/dec9417b8611e34e787a3e4c37686b5131f9e5c5/library/core/src/option.rs:600:0 [INFO] [stdout] | [INFO] [stdout] = note: `Option<_>` is defined in another crate [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] Some errors have detailed explanations: E0369, E0432, E0433. [INFO] [stdout] [INFO] [stdout] For more information about an error, try `rustc --explain E0369`. [INFO] [stdout] [INFO] [stderr] error: could not compile `firehazard` (example "max_sandbox") due to 15 previous errors; 10 warnings emitted [INFO] running `Command { std: "docker" "inspect" "6186750b3f4696ba85516a025d9b0b68db4b89cedd95ae8768d25bd5f42d3c27", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "6186750b3f4696ba85516a025d9b0b68db4b89cedd95ae8768d25bd5f42d3c27", kill_on_drop: false }` [INFO] [stdout] 6186750b3f4696ba85516a025d9b0b68db4b89cedd95ae8768d25bd5f42d3c27