File tree Expand file tree Collapse file tree
crates/pedm-simulator/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,6 +4,7 @@ use anyhow::Context as _;
44use win_api_wrappers:: identity:: account:: { enumerate_account_rights, get_username, lookup_account_by_name} ;
55use win_api_wrappers:: identity:: sid:: { Sid , SidAndAttributes } ;
66use win_api_wrappers:: process:: Process ;
7+ use win_api_wrappers:: raw:: core:: HRESULT ;
78use win_api_wrappers:: raw:: Win32 :: Foundation :: LUID ;
89use win_api_wrappers:: raw:: Win32 :: Security ;
910use 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 ! (
You can’t perform that action at this time.
0 commit comments