mirror of
https://github.com/winfsp/winfsp.git
synced 2025-06-14 15:52:47 -05:00
tst: winfsp-tests: WIP
This commit is contained in:
@ -154,6 +154,21 @@ BOOL HookCloseHandle(
|
||||
hObject);
|
||||
}
|
||||
|
||||
BOOL HookSetFileAttributesW(
|
||||
LPCWSTR lpFileName,
|
||||
DWORD dwFileAttributes)
|
||||
{
|
||||
WCHAR FileNameBuf[FILENAMEBUF_SIZE];
|
||||
BOOL Success;
|
||||
|
||||
PrepareFileName(lpFileName, FileNameBuf);
|
||||
|
||||
MaybeAdjustTraversePrivilege(FALSE);
|
||||
Success = SetFileAttributesW(FileNameBuf, dwFileAttributes);
|
||||
MaybeAdjustTraversePrivilege(TRUE);
|
||||
return Success;
|
||||
}
|
||||
|
||||
BOOL HookCreateDirectoryW(
|
||||
LPCWSTR lpPathName,
|
||||
LPSECURITY_ATTRIBUTES lpSecurityAttributes)
|
||||
@ -230,3 +245,20 @@ HANDLE HookFindFirstFileW(
|
||||
MaybeAdjustTraversePrivilege(TRUE);
|
||||
return Handle;
|
||||
}
|
||||
|
||||
HANDLE HookFindFirstStreamW(
|
||||
LPCWSTR lpFileName,
|
||||
STREAM_INFO_LEVELS InfoLevel,
|
||||
LPVOID lpFindStreamData,
|
||||
DWORD dwFlags)
|
||||
{
|
||||
WCHAR FileNameBuf[FILENAMEBUF_SIZE];
|
||||
HANDLE Handle;
|
||||
|
||||
PrepareFileName(lpFileName, FileNameBuf);
|
||||
|
||||
MaybeAdjustTraversePrivilege(FALSE);
|
||||
Handle = FindFirstStreamW(FileNameBuf, InfoLevel, lpFindStreamData, dwFlags);
|
||||
MaybeAdjustTraversePrivilege(TRUE);
|
||||
return Handle;
|
||||
}
|
||||
|
Reference in New Issue
Block a user