Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
W
wine-fonts
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
Aleksandr Isakov
wine-fonts
Commits
8620d670
Commit
8620d670
authored
Mar 05, 2017
by
Michael Müller
Committed by
Vitaly Lipatov
Jul 30, 2022
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
advapi32: Fix error code when calling LsaOpenPolicy for non existing remote machine.
parent
9ce17470
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
1 deletion
+11
-1
lsa.c
dlls/advapi32/lsa.c
+1
-1
lsa.c
dlls/advapi32/tests/lsa.c
+10
-0
No files found.
dlls/advapi32/lsa.c
View file @
8620d670
...
@@ -739,7 +739,7 @@ NTSTATUS WINAPI LsaOpenPolicy(
...
@@ -739,7 +739,7 @@ NTSTATUS WINAPI LsaOpenPolicy(
ObjectAttributes
,
DesiredAccess
,
PolicyHandle
);
ObjectAttributes
,
DesiredAccess
,
PolicyHandle
);
ADVAPI_ForceLocalComputer
(
SystemName
?
SystemName
->
Buffer
:
NULL
,
ADVAPI_ForceLocalComputer
(
SystemName
?
SystemName
->
Buffer
:
NULL
,
STATUS_ACCESS_VIOLATION
);
RPC_NT_SERVER_UNAVAILABLE
);
dumpLsaAttributes
(
ObjectAttributes
);
dumpLsaAttributes
(
ObjectAttributes
);
if
(
PolicyHandle
)
*
PolicyHandle
=
(
LSA_HANDLE
)
0xcafe
;
if
(
PolicyHandle
)
*
PolicyHandle
=
(
LSA_HANDLE
)
0xcafe
;
...
...
dlls/advapi32/tests/lsa.c
View file @
8620d670
...
@@ -43,6 +43,8 @@ static NTSTATUS (WINAPI *pLsaGetUserName)(PUNICODE_STRING *user, PUNICODE_STRING
...
@@ -43,6 +43,8 @@ static NTSTATUS (WINAPI *pLsaGetUserName)(PUNICODE_STRING *user, PUNICODE_STRING
static
void
test_lsa
(
void
)
static
void
test_lsa
(
void
)
{
{
static
WCHAR
machineW
[]
=
{
'W'
,
'i'
,
'n'
,
'e'
,
'N'
,
'o'
,
'M'
,
'a'
,
'c'
,
'h'
,
'i'
,
'n'
,
'e'
,
0
};
LSA_UNICODE_STRING
machine
;
NTSTATUS
status
;
NTSTATUS
status
;
LSA_HANDLE
handle
;
LSA_HANDLE
handle
;
LSA_OBJECT_ATTRIBUTES
object_attributes
;
LSA_OBJECT_ATTRIBUTES
object_attributes
;
...
@@ -50,6 +52,14 @@ static void test_lsa(void)
...
@@ -50,6 +52,14 @@ static void test_lsa(void)
ZeroMemory
(
&
object_attributes
,
sizeof
(
object_attributes
));
ZeroMemory
(
&
object_attributes
,
sizeof
(
object_attributes
));
object_attributes
.
Length
=
sizeof
(
object_attributes
);
object_attributes
.
Length
=
sizeof
(
object_attributes
);
machine
.
Buffer
=
machineW
;
machine
.
Length
=
sizeof
(
machineW
)
-
2
;
machine
.
MaximumLength
=
sizeof
(
machineW
);
status
=
LsaOpenPolicy
(
&
machine
,
&
object_attributes
,
POLICY_LOOKUP_NAMES
,
&
handle
);
ok
(
status
==
RPC_NT_SERVER_UNAVAILABLE
,
"LsaOpenPolicy(POLICY_LOOKUP_NAMES) for invalid machine returned 0x%08x
\n
"
,
status
);
status
=
LsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_ALL_ACCESS
,
&
handle
);
status
=
LsaOpenPolicy
(
NULL
,
&
object_attributes
,
POLICY_ALL_ACCESS
,
&
handle
);
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
,
ok
(
status
==
STATUS_SUCCESS
||
status
==
STATUS_ACCESS_DENIED
,
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx
\n
"
,
status
);
"LsaOpenPolicy(POLICY_ALL_ACCESS) returned 0x%08lx
\n
"
,
status
);
...
...
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