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

Function GetSessionIdFromDokanFileInfo

cppcryptfs/dokan/cryptdokan.cpp:155–170  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

153}
154
155static bool GetSessionIdFromDokanFileInfo(PDOKAN_FILE_INFO DokanFileInfo, DWORD& sessionid)
156{
157 HANDLE handle;
158
159 handle = DokanOpenRequestorToken(DokanFileInfo);
160 if (handle == INVALID_HANDLE_VALUE) {
161 DbgPrint(L" DokanOpenRequestorToken failed\n");
162 return false;
163 }
164
165 const bool bRet = GetSessionIdFromToken(handle, sessionid);
166
167 CloseHandle(handle);
168
169 return bRet;
170}
171
172// deny other users based on SessionId
173static bool DenyOtherSession(const CryptContext* con, PDOKAN_FILE_INFO DokanFileInfo)

Callers 1

DenyOtherSessionFunction · 0.85

Calls 2

DbgPrintFunction · 0.85
GetSessionIdFromTokenFunction · 0.85

Tested by

no test coverage detected