Author: ekohl Date: Wed Jun 14 11:31:54 2017 New Revision: 75033
URL: http://svn.reactos.org/svn/reactos?rev=75033&view=rev Log: [NETAPI32] Implement NetGetJoinableOUs and NetValidateName. These functions call their counterparts in the workstation service.
Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec trunk/reactos/dll/win32/netapi32/wksta_new.c
Modified: trunk/reactos/dll/win32/netapi32/netapi32.spec URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/netapi32... ============================================================================== --- trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/netapi32.spec [iso-8859-1] Wed Jun 14 11:31:54 2017 @@ -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)
Modified: trunk/reactos/dll/win32/netapi32/wksta_new.c URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/netapi32/wksta_ne... ============================================================================== --- trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/netapi32/wksta_new.c [iso-8859-1] Wed Jun 14 11:31:54 2017 @@ -209,6 +209,48 @@ return status; } #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 @@ -541,6 +583,46 @@ break; } } + } + RpcExcept(EXCEPTION_EXECUTE_HANDLER) + { + status = I_RpcMapWin32Status(RpcExceptionCode()); + } + RpcEndExcept; + + return status; +} + + +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) {