mirror of
https://gitlab.com/niansa/PolicyToolLib.git
synced 2025-03-06 20:48:27 +01:00
Fixed minor issue in RemoteLockBreak
This commit is contained in:
parent
0043c1b5c9
commit
49ea41820f
1 changed files with 6 additions and 6 deletions
|
@ -22,9 +22,9 @@ class RemoteLockBreak : public ModuleBase {
|
||||||
IoStatusBlock, ShareAccess, OpenOptions);
|
IoStatusBlock, ShareAccess, OpenOptions);
|
||||||
|
|
||||||
if (iStatus == STATUS_SHARING_VIOLATION || iStatus == STATUS_ACCESS_DENIED) {
|
if (iStatus == STATUS_SHARING_VIOLATION || iStatus == STATUS_ACCESS_DENIED) {
|
||||||
if (CloseHandle(FileHandle)) {
|
if (NtClose(FileHandle)) {
|
||||||
// try operation again now that file is closed
|
// try operation again now that file is closed
|
||||||
iStatus = TrueNtOpenFile(FileHandle, DesiredAccess, ObjectAttributes,
|
return TrueNtOpenFile(FileHandle, DesiredAccess, ObjectAttributes,
|
||||||
IoStatusBlock, ShareAccess, OpenOptions);
|
IoStatusBlock, ShareAccess, OpenOptions);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -41,9 +41,9 @@ class RemoteLockBreak : public ModuleBase {
|
||||||
FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength);
|
FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength);
|
||||||
|
|
||||||
if (iStatus == STATUS_SHARING_VIOLATION || iStatus == STATUS_ACCESS_DENIED) {
|
if (iStatus == STATUS_SHARING_VIOLATION || iStatus == STATUS_ACCESS_DENIED) {
|
||||||
if (CloseHandle(FileHandle)) {
|
if (NtClose(FileHandle)) {
|
||||||
// try operation again now that file is closed
|
// try operation again now that file is closed
|
||||||
iStatus = TrueNtCreateFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, AllocationSize,
|
return TrueNtCreateFile(FileHandle, DesiredAccess, ObjectAttributes, IoStatusBlock, AllocationSize,
|
||||||
FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength);
|
FileAttributes, ShareAccess, CreateDisposition, CreateOptions, EaBuffer, EaLength);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue