- Make LsaOpenPolicy return a fake handle (ported from Wine), so that it doesn't leave garbage instead of a handle, which is going to be closed later by LsaClose.

- Make LsaClose understand the fake handle, and don't do anything in that case but just return success.
- Make one unimplemented func show a fixme (also from Wine).

svn path=/trunk/; revision=32224
This commit is contained in:
Aleksey Bragin 2008-02-08 17:52:48 +00:00
parent 02dc4b9442
commit 3a05e940a0

View file

@ -86,6 +86,10 @@ LsaClose(LSA_HANDLE ObjectHandle)
{
TRACE("LsaClose(0x%p) called\n", ObjectHandle);
/* This is our fake handle, don't go too much long way */
if (ObjectHandle == (LSA_HANDLE)0xcafe)
return STATUS_SUCCESS;
LSAHandleBind();
return LsarClose(LSABindingHandle,
@ -276,7 +280,9 @@ LsaLookupNames2(
PLSA_REFERENCED_DOMAIN_LIST *ReferencedDomains,
PLSA_TRANSLATED_SID2 *Sids)
{
return STATUS_NOT_IMPLEMENTED;
FIXME("(%p,0x%08x,0x%08x,%p,%p,%p) stub\n", PolicyHandle, Flags,
Count, Names, ReferencedDomains, Sids);
return STATUS_NONE_MAPPED;
}
/*
@ -345,17 +351,19 @@ LsaNtStatusToWinError(NTSTATUS Status)
*
* @unimplemented
*/
NTSTATUS STDCALL
LsaOpenPolicy(PLSA_UNICODE_STRING lsaucs,
PLSA_OBJECT_ATTRIBUTES lsaoa,
ACCESS_MASK access,
PLSA_HANDLE PolicyHandle)
NTSTATUS
STDCALL
LsaOpenPolicy(
IN PLSA_UNICODE_STRING SystemName,
IN PLSA_OBJECT_ATTRIBUTES ObjectAttributes,
IN ACCESS_MASK DesiredAccess,
IN OUT PLSA_HANDLE PolicyHandle)
{
static int count = 0;
if (count++ < 20)
{
FIXME("%s() not implemented!\n", __FUNCTION__);
}
FIXME("(%s,%p,0x%08x,%p) stub\n",
SystemName?debugstr_w(SystemName->Buffer):"(null)",
ObjectAttributes, DesiredAccess, PolicyHandle);
if(PolicyHandle) *PolicyHandle = (LSA_HANDLE)0xcafe;
return STATUS_SUCCESS;
}