| 153 | } |
| 154 | |
| 155 | static 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 |
| 173 | static bool DenyOtherSession(const CryptContext* con, PDOKAN_FILE_INFO DokanFileInfo) |
no test coverage detected