2 * Copyright (c) 2009 Secure Endpoints Inc.
4 * Permission is hereby granted, free of charge, to any person
5 * obtaining a copy of this software and associated documentation
6 * files (the "Software"), to deal in the Software without
7 * restriction, including without limitation the rights to use, copy,
8 * modify, merge, publish, distribute, sublicense, and/or sell copies
9 * of the Software, and to permit persons to whom the Software is
10 * furnished to do so, subject to the following conditions:
12 * The above copyright notice and this permission notice shall be
13 * included in all copies or substantial portions of the Software.
15 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
16 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
17 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
18 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
19 * BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
20 * ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
21 * CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
28 #include "ms-wkssvc.h"
29 #include "AFS_component_version_number.h"
31 #define PLATFORM_ID_AFS 800
33 #pragma warning( disable: 4027 ) /* func w/o formal parameter list */
35 unsigned long NetrWkstaGetInfo(
36 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
37 /* [in] */ unsigned long Level,
38 /* [switch_is][out] */ LPWKSTA_INFO WkstaInfo)
41 * How much space do we need and do we have that much room?
42 * For now, just assume we can return everything in one shot
43 * because the reality is that in this function call we do
44 * not know the max size of the RPC response.
48 WkstaInfo->WkstaInfo100 = calloc(1, sizeof(WKSTA_INFO_100));
52 if (WkstaInfo->WkstaInfo100 == NULL) {
53 return ERROR_NOT_ENOUGH_MEMORY;
58 WkstaInfo->WkstaInfo100->wki100_platform_id = PLATFORM_ID_AFS;
59 WkstaInfo->WkstaInfo100->wki100_computername = wcsdup(ServerName);
60 WkstaInfo->WkstaInfo100->wki100_ver_major = AFSPRODUCT_VERSION_MAJOR;
61 WkstaInfo->WkstaInfo100->wki100_ver_major = AFSPRODUCT_VERSION_MINOR;
68 return ERROR_INVALID_LEVEL;
72 unsigned long NetrWkstaSetInfo(
73 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
74 /* [in] */ unsigned long Level,
75 /* [switch_is][in] */ LPWKSTA_INFO WkstaInfo,
76 /* [unique][out][in] */ unsigned long *ErrorParameter)
78 return ERROR_NOT_SUPPORTED;
81 unsigned long NetrWkstaUserEnum(
82 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
83 /* [out][in] */ LPWKSTA_USER_ENUM_STRUCT UserInfo,
84 /* [in] */ unsigned long PreferredMaximumLength,
85 /* [out] */ unsigned long *TotalEntries,
86 /* [unique][out][in] */ unsigned long *ResumeHandle)
88 return ERROR_NOT_SUPPORTED;
91 unsigned long NetrWkstaTransportEnum(
92 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
93 /* [out][in] */ LPWKSTA_TRANSPORT_ENUM_STRUCT TransportInfo,
94 /* [in] */ unsigned long PreferredMaximumLength,
95 /* [out] */ unsigned long *TotalEntries,
96 /* [unique][out][in] */ unsigned long *ResumeHandle)
98 return ERROR_NOT_SUPPORTED;
101 unsigned long NetrWkstaTransportAdd(
102 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
103 /* [in] */ unsigned long Level,
104 /* [in] */ LPWKSTA_TRANSPORT_INFO_0 TransportInfo,
105 /* [unique][out][in] */ unsigned long *ErrorParameter)
107 return ERROR_NOT_SUPPORTED;
110 unsigned long NetrWkstaTransportDel(
111 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
112 /* [unique][string][in] */ wchar_t *TransportName,
113 /* [in] */ unsigned long ForceLevel)
115 return ERROR_NOT_SUPPORTED;
118 unsigned long NetrWorkstationStatisticsGet(
119 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
120 /* [unique][string][in] */ wchar_t *ServiceName,
121 /* [in] */ unsigned long Level,
122 /* [in] */ unsigned long Options,
123 /* [out] */ LPSTAT_WORKSTATION_0 *Buffer)
125 return ERROR_NOT_SUPPORTED;
128 unsigned long NetrGetJoinInformation(
129 /* [unique][string][in] */ WKSSVC_IMPERSONATE_HANDLE ServerName,
130 /* [string][out][in] */ wchar_t **NameBuffer,
131 /* [out] */ PNETSETUP_JOIN_STATUS BufferType)
133 return ERROR_NOT_SUPPORTED;
136 unsigned long NetrJoinDomain2(
137 /* [in] */ handle_t RpcBindingHandle,
138 /* [unique][string][in] */ wchar_t *ServerName,
139 /* [string][in] */ wchar_t *DomainName,
140 /* [unique][string][in] */ wchar_t *MachineAccountOU,
141 /* [unique][string][in] */ wchar_t *AccountName,
142 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
143 /* [in] */ unsigned long Options)
145 return ERROR_NOT_SUPPORTED;
148 unsigned long NetrUnjoinDomain2(
149 /* [in] */ handle_t RpcBindingHandle,
150 /* [unique][string][in] */ wchar_t *ServerName,
151 /* [unique][string][in] */ wchar_t *AccountName,
152 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
153 /* [in] */ unsigned long Options)
155 return ERROR_NOT_SUPPORTED;
158 unsigned long NetrRenameMachineInDomain2(
159 /* [in] */ handle_t RpcBindingHandle,
160 /* [unique][string][in] */ wchar_t *ServerName,
161 /* [unique][string][in] */ wchar_t *MachineName,
162 /* [unique][string][in] */ wchar_t *AccountName,
163 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
164 /* [in] */ unsigned long Options)
166 return ERROR_NOT_SUPPORTED;
169 unsigned long NetrValidateName2(
170 /* [in] */ handle_t RpcBindingHandle,
171 /* [unique][string][in] */ wchar_t *ServerName,
172 /* [string][in] */ wchar_t *NameToValidate,
173 /* [unique][string][in] */ wchar_t *AccountName,
174 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
175 /* [in] */ NETSETUP_NAME_TYPE NameType)
177 return ERROR_NOT_SUPPORTED;
180 unsigned long NetrGetJoinableOUs2(
181 /* [in] */ handle_t RpcBindingHandle,
182 /* [unique][string][in] */ wchar_t *ServerName,
183 /* [string][in] */ wchar_t *DomainName,
184 /* [unique][string][in] */ wchar_t *AccountName,
185 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
186 /* [out][in] */ unsigned long *OUCount,
187 /* [size_is][size_is][string][out] */ wchar_t ***OUs)
189 return ERROR_NOT_SUPPORTED;
192 unsigned long NetrAddAlternateComputerName(
193 /* [in] */ handle_t RpcBindingHandle,
194 /* [unique][string][in] */ wchar_t *ServerName,
195 /* [unique][string][in] */ wchar_t *AlternateName,
196 /* [unique][string][in] */ wchar_t *DomainAccount,
197 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
198 /* [in] */ unsigned long Reserved)
200 return ERROR_NOT_SUPPORTED;
203 unsigned long NetrRemoveAlternateComputerName(
204 /* [in] */ handle_t RpcBindingHandle,
205 /* [unique][string][in] */ wchar_t *ServerName,
206 /* [unique][string][in] */ wchar_t *AlternateName,
207 /* [unique][string][in] */ wchar_t *DomainAccount,
208 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
209 /* [in] */ unsigned long Reserved)
211 return ERROR_NOT_SUPPORTED;
214 unsigned long NetrSetPrimaryComputerName(
215 /* [in] */ handle_t RpcBindingHandle,
216 /* [unique][string][in] */ wchar_t *ServerName,
217 /* [unique][string][in] */ wchar_t *PrimaryName,
218 /* [unique][string][in] */ wchar_t *DomainAccount,
219 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
220 /* [in] */ unsigned long Reserved)
222 return ERROR_NOT_SUPPORTED;
225 unsigned long NetrEnumerateComputerNames(
226 /* [unique][string][in] */ WKSSVC_IMPERSONATE_HANDLE ServerName,
227 /* [in] */ NET_COMPUTER_NAME_TYPE NameType,
228 /* [in] */ unsigned long Reserved,
229 /* [out] */ PNET_COMPUTER_NAME_ARRAY *ComputerNames)
231 return ERROR_NOT_SUPPORTED;
234 /* [nocode] */ void Opnum3NotUsedOnWire(
235 /* [in] */ handle_t IDL_handle)
239 /* [nocode] */ void Opnum4NotUsedOnWire(
240 /* [in] */ handle_t IDL_handle)
244 /* [nocode] */ void Opnum8NotUsedOnWire(
245 /* [in] */ handle_t IDL_handle)
249 /* [nocode] */ void Opnum9NotUsedOnWire(
250 /* [in] */ handle_t IDL_handle)
254 /* [nocode] */ void Opnum10NotUsedOnWire(
255 /* [in] */ handle_t IDL_handle)
259 /* [nocode] */ void Opnum11NotUsedOnWire(
260 /* [in] */ handle_t IDL_handle)
264 /* [nocode] */ void Opnum12NotUsedOnWire(
265 /* [in] */ handle_t IDL_handle)
270 /* [nocode] */ void Opnum14NotUsedOnWire(
271 /* [in] */ handle_t IDL_handle)
275 /* [nocode] */ void Opnum15NotUsedOnWire(
276 /* [in] */ handle_t IDL_handle)
280 /* [nocode] */ void Opnum16NotUsedOnWire(
281 /* [in] */ handle_t IDL_handle)
285 /* [nocode] */ void Opnum17NotUsedOnWire(
286 /* [in] */ handle_t IDL_handle)
290 /* [nocode] */ void Opnum18NotUsedOnWire(
291 /* [in] */ handle_t IDL_handle)
295 /* [nocode] */ void Opnum19NotUsedOnWire(
296 /* [in] */ handle_t IDL_handle)
301 /* [nocode] */ void Opnum21NotUsedOnWire(
302 /* [in] */ handle_t IDL_handle)