[NETAPI32]

Implement NetGetJoinableOUs and NetValidateName. These functions call their counterparts in the workstation service.


svn path=/trunk/; revision=75033
This commit is contained in:
Eric Kohl 2017-06-14 11:31:54 +00:00
parent 4747d6a5c1
commit 89eb252fb8
2 changed files with 84 additions and 2 deletions

View file

@ -151,7 +151,7 @@
@ stdcall NetGetDCName(wstr wstr ptr)
@ stub NetGetDisplayInformationIndex
@ stdcall NetGetJoinInformation(wstr ptr ptr)
@ stub NetGetJoinableOUs
@ stdcall NetGetJoinableOUs(wstr wstr wstr wstr ptr ptr)
@ stdcall NetGroupAdd(wstr long ptr ptr)
@ stdcall NetGroupAddUser(wstr wstr wstr)
@ stdcall NetGroupDel(wstr wstr)
@ -250,7 +250,7 @@
@ stdcall NetUserModalsSet(wstr long ptr ptr)
@ stdcall NetUserSetGroups(wstr wstr long ptr long)
@ stdcall NetUserSetInfo(wstr wstr long ptr ptr)
@ stub NetValidateName
@ stdcall NetValidateName(wstr wstr wstr wstr long)
@ stub NetValidatePasswordPolicy
@ stub NetValidatePasswordPolicyFree
@ stdcall NetWkstaGetInfo(wstr long ptr)

View file

@ -211,6 +211,48 @@ NetGetJoinInformation(
#endif
NET_API_STATUS
WINAPI
NetGetJoinableOUs(
_In_ LPCWSTR lpServer,
_In_ LPCWSTR lpDomain,
_In_ LPCWSTR lpAccount,
_In_ LPCWSTR lpPassword,
_Out_ DWORD *OUCount,
_Out_ LPWSTR **OUs)
{
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
handle_t BindingHandle;
NET_API_STATUS status;
TRACE("NetGetJoinableOUs(%s %s %s %s %p %p)\n",
debugstr_w(lpServer), debugstr_w(lpDomain), debugstr_w(lpAccount),
debugstr_w(lpPassword), OUCount, OUs);
/* FIXME */
BindingHandle = NULL;
EncryptedPassword = NULL;
RpcTryExcept
{
status = NetrGetJoinableOUs2(BindingHandle,
(PWSTR)lpServer,
(PWSTR)lpDomain,
(PWSTR)lpAccount,
EncryptedPassword,
OUCount,
OUs);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
status = I_RpcMapWin32Status(RpcExceptionCode());
}
RpcEndExcept;
return status;
}
NET_API_STATUS
WINAPI
NetJoinDomain(
@ -552,6 +594,46 @@ NetUseEnum(
}
NET_API_STATUS
WINAPI
NetValidateName(
_In_ LPCWSTR lpServer,
_In_ LPCWSTR lpName,
_In_ LPCWSTR lpAccount,
_In_ LPCWSTR lpPassword,
_In_ NETSETUP_NAME_TYPE NameType)
{
PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword;
handle_t BindingHandle;
NET_API_STATUS status;
TRACE("NetValidateName(%s %s %s %s %u)\n",
debugstr_w(lpServer), debugstr_w(lpName), debugstr_w(lpAccount),
debugstr_w(lpPassword), NameType);
/* FIXME */
BindingHandle = NULL;
EncryptedPassword = NULL;
RpcTryExcept
{
status = NetrValidateName2(BindingHandle,
(PWSTR)lpServer,
(PWSTR)lpName,
(PWSTR)lpAccount,
EncryptedPassword,
NameType);
}
RpcExcept(EXCEPTION_EXECUTE_HANDLER)
{
status = I_RpcMapWin32Status(RpcExceptionCode());
}
RpcEndExcept;
return status;
}
NET_API_STATUS
WINAPI
NetUseGetInfo(