From 7d56b9c23d49e8eb481a2756c919efb8adce8a22 Mon Sep 17 00:00:00 2001 From: Bill Zissimopoulos Date: Mon, 30 Apr 2018 14:18:03 -0700 Subject: [PATCH] dll: fuse: GetSecurityByName: correctly handle "not found" paths with symlinks --- src/dll/fuse/fuse_intf.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/dll/fuse/fuse_intf.c b/src/dll/fuse/fuse_intf.c index 4a88f3ee..f764a449 100644 --- a/src/dll/fuse/fuse_intf.c +++ b/src/dll/fuse/fuse_intf.c @@ -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: