Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-winehq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wine
wine-winehq
Commits
4e8b83dc
Commit
4e8b83dc
authored
Aug 14, 2007
by
Paul Vriens
Committed by
Alexandre Julliard
Aug 14, 2007
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32/tests: Make tests run again on win95.
parent
1e33bdcf
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
2 deletions
+20
-2
security.c
dlls/advapi32/tests/security.c
+20
-2
No files found.
dlls/advapi32/tests/security.c
View file @
4e8b83dc
...
...
@@ -55,6 +55,9 @@ static BOOL (WINAPI *pConvertStringSecurityDescriptorToSecurityDescriptorA)(LPCS
PSECURITY_DESCRIPTOR
*
,
PULONG
);
typedef
BOOL
(
WINAPI
*
fnGetFileSecurityA
)(
LPCSTR
,
SECURITY_INFORMATION
,
PSECURITY_DESCRIPTOR
,
DWORD
,
LPDWORD
);
static
DWORD
(
WINAPI
*
pGetNamedSecurityInfoA
)(
LPSTR
,
SE_OBJECT_TYPE
,
SECURITY_INFORMATION
,
PSID
*
,
PSID
*
,
PACL
*
,
PACL
*
,
PSECURITY_DESCRIPTOR
*
);
typedef
DWORD
(
WINAPI
*
fnRtlAdjustPrivilege
)(
ULONG
,
BOOLEAN
,
BOOLEAN
,
PBOOLEAN
);
typedef
BOOL
(
WINAPI
*
fnCreateWellKnownSid
)(
WELL_KNOWN_SID_TYPE
,
PSID
,
PSID
,
DWORD
*
);
typedef
BOOL
(
WINAPI
*
fnDuplicateTokenEx
)(
HANDLE
,
DWORD
,
LPSECURITY_ATTRIBUTES
,
...
...
@@ -65,6 +68,7 @@ typedef NTSTATUS (WINAPI *fnLsaClose)(LSA_HANDLE);
typedef
NTSTATUS
(
WINAPI
*
fnLsaFreeMemory
)(
PVOID
);
typedef
NTSTATUS
(
WINAPI
*
fnLsaOpenPolicy
)(
PLSA_UNICODE_STRING
,
PLSA_OBJECT_ATTRIBUTES
,
ACCESS_MASK
,
PLSA_HANDLE
);
static
NTSTATUS
(
WINAPI
*
pNtQueryObject
)(
HANDLE
,
OBJECT_INFORMATION_CLASS
,
PVOID
,
ULONG
,
PULONG
);
static
DWORD
(
WINAPI
*
pSetEntriesInAclW
)(
ULONG
,
PEXPLICIT_ACCESSW
,
PACL
,
PACL
*
);
static
HMODULE
hmod
;
static
int
myARGC
;
...
...
@@ -102,6 +106,8 @@ static void init(void)
hmod
=
GetModuleHandle
(
"advapi32.dll"
);
pConvertStringSecurityDescriptorToSecurityDescriptorA
=
(
void
*
)
GetProcAddress
(
hmod
,
"ConvertStringSecurityDescriptorToSecurityDescriptorA"
);
pGetNamedSecurityInfoA
=
(
void
*
)
GetProcAddress
(
hmod
,
"GetNamedSecurityInfoA"
);
pSetEntriesInAclW
=
(
void
*
)
GetProcAddress
(
hmod
,
"SetEntriesInAclW"
);
myARGC
=
winetest_get_mainargs
(
&
myARGV
);
}
...
...
@@ -1714,7 +1720,13 @@ static void test_SetEntriesInAcl(void)
ACL
*
acl
=
(
ACL
*
)
0xdeadbeef
;
DWORD
res
;
res
=
SetEntriesInAclW
(
0
,
NULL
,
NULL
,
&
acl
);
if
(
!
pSetEntriesInAclW
)
{
skip
(
"SetEntriesInAclW is not available
\n
"
);
return
;
}
res
=
pSetEntriesInAclW
(
0
,
NULL
,
NULL
,
&
acl
);
if
(
res
==
ERROR_CALL_NOT_IMPLEMENTED
)
{
skip
(
"SetEntriesInAclW is not implemented
\n
"
);
...
...
@@ -1737,11 +1749,17 @@ static void test_GetNamedSecurityInfoA(void)
BOOL
ret
;
CHAR
windows_dir
[
MAX_PATH
];
if
(
!
pGetNamedSecurityInfoA
)
{
skip
(
"GetNamedSecurityInfoA is not available
\n
"
);
return
;
}
ret
=
GetWindowsDirectoryA
(
windows_dir
,
MAX_PATH
);
ok
(
ret
,
"GetWindowsDirectory failed with error %d
\n
"
,
GetLastError
());
SetLastError
(
0xdeadbeef
);
error
=
GetNamedSecurityInfoA
(
windows_dir
,
SE_FILE_OBJECT
,
error
=
p
GetNamedSecurityInfoA
(
windows_dir
,
SE_FILE_OBJECT
,
OWNER_SECURITY_INFORMATION
|
GROUP_SECURITY_INFORMATION
|
DACL_SECURITY_INFORMATION
,
NULL
,
NULL
,
NULL
,
NULL
,
&
pSecDesc
);
if
(
error
!=
ERROR_SUCCESS
&&
(
GetLastError
()
==
ERROR_CALL_NOT_IMPLEMENTED
))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment