Lines Matching defs:pSid
320 * Get the process token of the process indicated by @a dwPID if the @a pSid
326 * @param pSid The secure identifier of the user.
330 static int rtProcWinGetProcessTokenHandle(DWORD dwPid, PSID pSid, PHANDLE phToken)
332 AssertPtr(pSid);
363 && EqualSid(pTokenUser->User.Sid, pSid))
410 * @param pSid The secure identifier of the user.
418 static bool rtProcWinFindTokenByProcessAndPsApi(const char * const *papszNames, PSID pSid, PHANDLE phToken)
479 && RT_SUCCESS(rtProcWinGetProcessTokenHandle(paPids[iPid], pSid, phToken)))
497 * Finds a one of the processes in @a papszNames running with user @a pSid and
502 * @param pSid The secure identifier of the user.
506 static bool rtProcWinFindTokenByProcess(const char * const *papszNames, PSID pSid, PHANDLE phToken)
509 AssertPtr(pSid);
538 && RT_SUCCESS(rtProcWinGetProcessTokenHandle(procEntry.th32ProcessID, pSid, phToken)))
560 return rtProcWinFindTokenByProcessAndPsApi(papszNames, pSid, phToken);
847 PSID pSid = (PSID)RTMemAlloc(cbSid * sizeof(wchar_t)); /** @todo r=bird: What's the relationship between wchar_t and PSID? */
848 AssertReturn(pSid, VERR_NO_MEMORY); /** @todo r=bird: Leaking token handles when we're out of memory... */
860 pSid,
865 && IsValidSid(pSid))
876 fFound = rtProcWinFindTokenByProcess(s_papszProcNames, pSid, &hTokenUserDesktop);
880 RTMemFree(pSid);