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
26a776e9
Commit
26a776e9
authored
Sep 17, 2002
by
Andriy Palamarchuk
Committed by
Alexandre Julliard
Sep 17, 2002
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make LsaOpenPolicy return success.
parent
b9093031
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
39 additions
and
1 deletion
+39
-1
security.c
dlls/advapi32/security.c
+39
-1
No files found.
dlls/advapi32/security.c
View file @
26a776e9
...
...
@@ -49,6 +49,42 @@ static void dumpLsaAttributes( PLSA_OBJECT_ATTRIBUTES oa )
}
}
/************************************************************
* ADVAPI_IsLocalComputer
*
* Checks whether the server name indicates local machine.
*/
BOOL
ADVAPI_IsLocalComputer
(
LPCWSTR
ServerName
)
{
if
(
!
ServerName
)
{
return
TRUE
;
}
else
{
DWORD
dwSize
=
MAX_COMPUTERNAME_LENGTH
+
1
;
BOOL
Result
;
LPWSTR
buf
;
buf
=
HeapAlloc
(
GetProcessHeap
(),
0
,
dwSize
*
sizeof
(
WCHAR
));
Result
=
GetComputerNameW
(
buf
,
&
dwSize
);
if
(
Result
&&
(
ServerName
[
0
]
==
'\\'
)
&&
(
ServerName
[
1
]
==
'\\'
))
ServerName
+=
2
;
Result
=
Result
&&
!
lstrcmpW
(
ServerName
,
buf
);
HeapFree
(
GetProcessHeap
(),
0
,
buf
);
return
Result
;
}
}
#define ADVAPI_ForceLocalComputer(ServerName, FailureCode) \
if (!ADVAPI_IsLocalComputer(ServerName)) \
{ \
FIXME("Action Implemented for local computer only. " \
"Requested for server %s\n", debugstr_w(ServerName)); \
return FailureCode; \
}
/* ##############################
###### TOKEN FUNCTIONS ######
##############################
...
...
@@ -802,9 +838,11 @@ LsaOpenPolicy(
FIXME
(
"(%s,%p,0x%08lx,%p):stub
\n
"
,
SystemName
?
debugstr_w
(
SystemName
->
Buffer
)
:
"null"
,
ObjectAttributes
,
DesiredAccess
,
PolicyHandle
);
ADVAPI_ForceLocalComputer
(
SystemName
?
SystemName
->
Buffer
:
NULL
,
STATUS_ACCESS_VIOLATION
);
dumpLsaAttributes
(
ObjectAttributes
);
if
(
PolicyHandle
)
*
PolicyHandle
=
(
LSA_HANDLE
)
0xcafe
;
return
TRUE
;
return
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