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
70071af6
Commit
70071af6
authored
Aug 14, 2006
by
Robert Reif
Committed by
Alexandre Julliard
Aug 14, 2006
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Try again with different access mask if LsaOpenPolicy fails with STATUS_ACCESS_DENIED.
parent
c22e98fa
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
2 deletions
+20
-2
lsa.c
dlls/advapi32/tests/lsa.c
+10
-1
security.c
dlls/advapi32/tests/security.c
+10
-1
No files found.
dlls/advapi32/tests/lsa.c
View file @
70071af6
...
...
@@ -62,9 +62,18 @@ static void test_lsa(void)
LSA_OBJECT_ATTRIBUTES
object_attributes
;
ZeroMemory
(
&
object_attributes
,
sizeof
(
object_attributes
));
object_attributes
.
Length
=
sizeof
(
object_attributes
);
status
=
pLsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_ALL_ACCESS
,
&
handle
);
ok
(
status
==
STATUS_SUCCESS
,
"LsaOpenPolicy() returned 0x%08lx
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
,
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx
\n
"
,
status
);
/* try a more restricted access mask if necessary */
if
(
status
==
STATUS_ACCESS_DENIED
)
{
trace
(
"LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION
\n
"
);
status
=
pLsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_VIEW_LOCAL_INFORMATION
,
&
handle
);
ok
(
status
==
STATUS_SUCCESS
,
"LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08lx
\n
"
,
status
);
}
if
(
status
==
STATUS_SUCCESS
)
{
PPOLICY_AUDIT_EVENTS_INFO
audit_events_info
;
...
...
dlls/advapi32/tests/security.c
View file @
70071af6
...
...
@@ -941,9 +941,18 @@ static void test_LookupAccountSid(void)
LSA_OBJECT_ATTRIBUTES
object_attributes
;
ZeroMemory
(
&
object_attributes
,
sizeof
(
object_attributes
));
object_attributes
.
Length
=
sizeof
(
object_attributes
);
status
=
pLsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_ALL_ACCESS
,
&
handle
);
ok
(
status
==
STATUS_SUCCESS
,
"LsaOpenPolicy() returned 0x%08lx
\n
"
,
status
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
,
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx
\n
"
,
status
);
/* try a more restricted access mask if necessary */
if
(
status
==
STATUS_ACCESS_DENIED
)
{
trace
(
"LsaOpenPolicy(POLICY_ALL_ACCESS) failed, trying POLICY_VIEW_LOCAL_INFORMATION
\n
"
);
status
=
pLsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_VIEW_LOCAL_INFORMATION
,
&
handle
);
ok
(
status
==
STATUS_SUCCESS
,
"LsaOpenPolicy(POLICY_VIEW_LOCAL_INFORMATION) returned 0x%08lx
\n
"
,
status
);
}
if
(
status
==
STATUS_SUCCESS
)
{
...
...
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