Lines Matching defs:sid
41 bool GetComputerSid(const wchar_t* account_name, SID* sid, DWORD sid_size) {
49 BOOL success = ::LookupAccountNameW(NULL, account_name, sid,
54 // one or both of sid and szDomain was too small. Check for that
62 success = ::LookupAccountNameW(NULL, account_name, sid, &sid_dword_size,
70 std::wstring ConvertSidToString(SID* sid) {
74 if (ConvertSidToStringSidW(sid, &sid_buffer)) {
79 SID_IDENTIFIER_AUTHORITY* sia = ::GetSidIdentifierAuthority(sid);
96 int sub_auth_count = *::GetSidSubAuthorityCount(sid);
98 base::StringAppendF(&sid_string, L"-%lu", *::GetSidSubAuthority(sid, i));
114 SID* sid = reinterpret_cast<SID*>(sid_buffer);
115 if (GetComputerSid(computer_name, sid, SECURITY_MAX_SID_SIZE)) {
116 *sid_string = ConvertSidToString(sid);