dll: fuse: GetSecurityByName: correctly handle "not found" paths with symlinks

This commit is contained in:
Bill Zissimopoulos 2018-04-30 14:18:03 -07:00
parent deb237f7b0
commit 7d56b9c23d
No known key found for this signature in database
GPG Key ID: 3D4F95D52C7B3EA3

View File

@ -711,14 +711,16 @@ static NTSTATUS fsp_fuse_intf_GetSecurityByName(FSP_FILE_SYSTEM *FileSystem,
Result = fsp_fuse_intf_GetSecurityEx(FileSystem, PosixPath, 0,
PFileAttributes, SecurityDescriptorBuf, PSecurityDescriptorSize);
if (!NT_SUCCESS(Result))
if (!NT_SUCCESS(Result) &&
STATUS_OBJECT_NAME_NOT_FOUND != Result &&
STATUS_OBJECT_PATH_NOT_FOUND != Result)
goto exit;
if (FSP_FUSE_HAS_SYMLINKS(f) &&
FspFileSystemFindReparsePoint(FileSystem, fsp_fuse_intf_GetReparsePointByName, 0,
FileName, PFileAttributes))
Result = STATUS_REPARSE;
else
else if (NT_SUCCESS(Result))
Result = STATUS_SUCCESS;
exit: