MCPcopy Create free account
hub / github.com/bailey27/cppcryptfs / GetSessionIdFromToken

Function GetSessionIdFromToken

libcppcryptfs/util/util.cpp:890–903  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

888}
889
890bool GetSessionIdFromToken(HANDLE handle, DWORD &sessionid)
891{
892 DWORD returnLength;
893
894 if (GetTokenInformation(handle, TokenSessionId, &sessionid, sizeof(sessionid), &returnLength) &&
895 returnLength == sizeof(sessionid)) {
896 DbgPrint(L"SessionId = %u\n", sessionid);
897 return true;
898 } else {
899 DWORD lastErr = GetLastError();
900 DbgPrint(L"failed to get SessionId, LastErr = %u\n", lastErr);
901 return false;
902 }
903}
904
905bool CanGetSessionIdOk()
906{

Callers 2

CanGetSessionIdOkFunction · 0.85

Calls 1

DbgPrintFunction · 0.85

Tested by

no test coverage detected