Hans Leidekker (@hans) commented about programs/whoami/main.c:
return FALSE;
- }
- err = CopySid(token_user_len, *sid, token_user->User.Sid);
- if (!err)
- {
ERR("CopySid failed, error %ld\n", GetLastError());
return FALSE;
- }
- *sid = token_user->User.Sid;
- return TRUE;
+}
+static BOOL get_logon_sid(PSID *sid)
I'll let you handle this one :) You may want to add a helper that retrieves a token of a given type that would be shared with get_process_sid().