Fix GetFileSecurityW for not existing directories/files.
This commit is contained in:
parent
61beaf48d3
commit
25102d6b25
|
@ -1323,6 +1323,9 @@ GetFileSecurityW( LPCWSTR lpFileName,
|
||||||
DWORD iLocNow;
|
DWORD iLocNow;
|
||||||
SECURITY_DESCRIPTOR_RELATIVE *pSDRelative;
|
SECURITY_DESCRIPTOR_RELATIVE *pSDRelative;
|
||||||
|
|
||||||
|
if(INVALID_FILE_ATTRIBUTES == GetFileAttributesW(lpFileName))
|
||||||
|
return FALSE;
|
||||||
|
|
||||||
FIXME("(%s) : returns fake SECURITY_DESCRIPTOR\n", debugstr_w(lpFileName) );
|
FIXME("(%s) : returns fake SECURITY_DESCRIPTOR\n", debugstr_w(lpFileName) );
|
||||||
|
|
||||||
nNeeded = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
|
nNeeded = sizeof(SECURITY_DESCRIPTOR_RELATIVE);
|
||||||
|
|
|
@ -425,8 +425,9 @@ static void test_FileSecurity(void)
|
||||||
|
|
||||||
SetLastError(NO_ERROR);
|
SetLastError(NO_ERROR);
|
||||||
result = pGetFileSecurityA( directory,OWNER_SECURITY_INFORMATION,buffer,0x40,&outSize);
|
result = pGetFileSecurityA( directory,OWNER_SECURITY_INFORMATION,buffer,0x40,&outSize);
|
||||||
todo_wine ok(!result, "GetFileSecurityA should fail for not existing directories\n");
|
ok(!result, "GetFileSecurityA should fail for not existing directories/files\n");
|
||||||
todo_wine ok( GetLastError() == ERROR_FILE_NOT_FOUND, "ERROR_FILE_NOT_FOUND expected\n");
|
ok( GetLastError() == ERROR_FILE_NOT_FOUND,
|
||||||
|
"last error ERROR_FILE_NOT_FOUND expected, got %ld\n", GetLastError());
|
||||||
}
|
}
|
||||||
|
|
||||||
START_TEST(security)
|
START_TEST(security)
|
||||||
|
|
Loading…
Reference in New Issue