Skip to content

Commit 40b3890

Browse files
committed
.
1 parent f776771 commit 40b3890

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

crates/pedm-simulator/src/main.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ use anyhow::Context as _;
44
use win_api_wrappers::identity::account::{enumerate_account_rights, get_username, lookup_account_by_name};
55
use win_api_wrappers::identity::sid::{Sid, SidAndAttributes};
66
use win_api_wrappers::process::Process;
7+
use win_api_wrappers::raw::core::HRESULT;
78
use win_api_wrappers::raw::Win32::Foundation::LUID;
89
use win_api_wrappers::raw::Win32::Security;
910
use win_api_wrappers::raw::Win32::System::SystemServices;
@@ -67,7 +68,7 @@ fn main() -> anyhow::Result<()> {
6768
// - This context may not be able to see the same network resources or DC that the interactive user.
6869
// Causing LookupAccountNameW to fail with a "no mapping" error.
6970
// Let’s just go ahead with the elevation in this case, assuming LocalSystem is enough for all intents and purposes at this point.
70-
if e.code().0 == 0x80070534 {
71+
if e.code() == HRESULT(0x80070534 as i32) {
7172
println!("Got the 'no mapping' error; continuing...")
7273
} else {
7374
return Err(anyhow::Error::new(e).context(format!(

0 commit comments

Comments
 (0)