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
29 #include "ms-wkssvc.h"
30 #include "AFS_component_version_number.h"
32 #define PLATFORM_ID_AFS 800
34 #pragma warning( disable: 4027 ) /* func w/o formal parameter list */
36 unsigned long NetrWkstaGetInfo(
37 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
38 /* [in] */ unsigned long Level,
39 /* [switch_is][out] */ LPWKSTA_INFO WkstaInfo)
41 osi_Log1(afsd_logp, "NetrWkstaGetInfo level %u", Level);
44 * How much space do we need and do we have that much room?
45 * For now, just assume we can return everything in one shot
46 * because the reality is that in this function call we do
47 * not know the max size of the RPC response.
51 WkstaInfo->WkstaInfo100 = calloc(1, sizeof(WKSTA_INFO_100));
55 if (WkstaInfo->WkstaInfo100 == NULL) {
56 return ERROR_NOT_ENOUGH_MEMORY;
61 WkstaInfo->WkstaInfo100->wki100_platform_id = PLATFORM_ID_AFS;
62 WkstaInfo->WkstaInfo100->wki100_computername = wcsdup(ServerName);
63 WkstaInfo->WkstaInfo100->wki100_ver_major = AFSPRODUCT_VERSION_MAJOR;
64 WkstaInfo->WkstaInfo100->wki100_ver_major = AFSPRODUCT_VERSION_MINOR;
71 return ERROR_INVALID_LEVEL;
75 unsigned long NetrWkstaSetInfo(
76 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
77 /* [in] */ unsigned long Level,
78 /* [switch_is][in] */ LPWKSTA_INFO WkstaInfo,
79 /* [unique][out][in] */ unsigned long *ErrorParameter)
81 osi_Log0(afsd_logp, "NetrWkstaSetInfo not supported");
82 return ERROR_NOT_SUPPORTED;
85 unsigned long NetrWkstaUserEnum(
86 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
87 /* [out][in] */ LPWKSTA_USER_ENUM_STRUCT UserInfo,
88 /* [in] */ unsigned long PreferredMaximumLength,
89 /* [out] */ unsigned long *TotalEntries,
90 /* [unique][out][in] */ unsigned long *ResumeHandle)
92 osi_Log0(afsd_logp, "NetrWkstaUserEnum not supported");
93 return ERROR_NOT_SUPPORTED;
96 unsigned long NetrWkstaTransportEnum(
97 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
98 /* [out][in] */ LPWKSTA_TRANSPORT_ENUM_STRUCT TransportInfo,
99 /* [in] */ unsigned long PreferredMaximumLength,
100 /* [out] */ unsigned long *TotalEntries,
101 /* [unique][out][in] */ unsigned long *ResumeHandle)
103 osi_Log0(afsd_logp, "NetrWkstaTransportEnum not supported");
104 return ERROR_NOT_SUPPORTED;
107 unsigned long NetrWkstaTransportAdd(
108 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
109 /* [in] */ unsigned long Level,
110 /* [in] */ LPWKSTA_TRANSPORT_INFO_0 TransportInfo,
111 /* [unique][out][in] */ unsigned long *ErrorParameter)
113 osi_Log0(afsd_logp, "NetrWkstaTransportAdd not supported");
114 return ERROR_NOT_SUPPORTED;
117 unsigned long NetrWkstaTransportDel(
118 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
119 /* [unique][string][in] */ wchar_t *TransportName,
120 /* [in] */ unsigned long ForceLevel)
122 osi_Log0(afsd_logp, "NetrWkstaTransportDel not supported");
123 return ERROR_NOT_SUPPORTED;
126 unsigned long NetrWorkstationStatisticsGet(
127 /* [unique][string][in] */ WKSSVC_IDENTIFY_HANDLE ServerName,
128 /* [unique][string][in] */ wchar_t *ServiceName,
129 /* [in] */ unsigned long Level,
130 /* [in] */ unsigned long Options,
131 /* [out] */ LPSTAT_WORKSTATION_0 *Buffer)
133 osi_Log0(afsd_logp, "NetrWorkstationStatisticsGet not supported");
134 return ERROR_NOT_SUPPORTED;
137 unsigned long NetrGetJoinInformation(
138 /* [unique][string][in] */ WKSSVC_IMPERSONATE_HANDLE ServerName,
139 /* [string][out][in] */ wchar_t **NameBuffer,
140 /* [out] */ PNETSETUP_JOIN_STATUS BufferType)
142 osi_Log0(afsd_logp, "NetrGetJoinInformation not supported");
143 return ERROR_NOT_SUPPORTED;
146 unsigned long NetrJoinDomain2(
147 /* [in] */ handle_t RpcBindingHandle,
148 /* [unique][string][in] */ wchar_t *ServerName,
149 /* [string][in] */ wchar_t *DomainName,
150 /* [unique][string][in] */ wchar_t *MachineAccountOU,
151 /* [unique][string][in] */ wchar_t *AccountName,
152 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
153 /* [in] */ unsigned long Options)
155 osi_Log0(afsd_logp, "NetrJoinDomain2 not supported");
156 return ERROR_NOT_SUPPORTED;
159 unsigned long NetrUnjoinDomain2(
160 /* [in] */ handle_t RpcBindingHandle,
161 /* [unique][string][in] */ wchar_t *ServerName,
162 /* [unique][string][in] */ wchar_t *AccountName,
163 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
164 /* [in] */ unsigned long Options)
166 osi_Log0(afsd_logp, "NetrUnjoinDomain2 not supported");
167 return ERROR_NOT_SUPPORTED;
170 unsigned long NetrRenameMachineInDomain2(
171 /* [in] */ handle_t RpcBindingHandle,
172 /* [unique][string][in] */ wchar_t *ServerName,
173 /* [unique][string][in] */ wchar_t *MachineName,
174 /* [unique][string][in] */ wchar_t *AccountName,
175 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
176 /* [in] */ unsigned long Options)
178 osi_Log0(afsd_logp, "NetrRenameMachineInDomain2 not supported");
179 return ERROR_NOT_SUPPORTED;
182 unsigned long NetrValidateName2(
183 /* [in] */ handle_t RpcBindingHandle,
184 /* [unique][string][in] */ wchar_t *ServerName,
185 /* [string][in] */ wchar_t *NameToValidate,
186 /* [unique][string][in] */ wchar_t *AccountName,
187 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
188 /* [in] */ NETSETUP_NAME_TYPE NameType)
190 osi_Log0(afsd_logp, "NetrValidateName2 not supported");
191 return ERROR_NOT_SUPPORTED;
194 unsigned long NetrGetJoinableOUs2(
195 /* [in] */ handle_t RpcBindingHandle,
196 /* [unique][string][in] */ wchar_t *ServerName,
197 /* [string][in] */ wchar_t *DomainName,
198 /* [unique][string][in] */ wchar_t *AccountName,
199 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD Password,
200 /* [out][in] */ unsigned long *OUCount,
201 /* [size_is][size_is][string][out] */ wchar_t ***OUs)
203 osi_Log0(afsd_logp, "NetrGetJoinableOUs2 not supported");
204 return ERROR_NOT_SUPPORTED;
207 unsigned long NetrAddAlternateComputerName(
208 /* [in] */ handle_t RpcBindingHandle,
209 /* [unique][string][in] */ wchar_t *ServerName,
210 /* [unique][string][in] */ wchar_t *AlternateName,
211 /* [unique][string][in] */ wchar_t *DomainAccount,
212 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
213 /* [in] */ unsigned long Reserved)
215 osi_Log0(afsd_logp, "NetrAddAlternateComputerName not supported");
216 return ERROR_NOT_SUPPORTED;
219 unsigned long NetrRemoveAlternateComputerName(
220 /* [in] */ handle_t RpcBindingHandle,
221 /* [unique][string][in] */ wchar_t *ServerName,
222 /* [unique][string][in] */ wchar_t *AlternateName,
223 /* [unique][string][in] */ wchar_t *DomainAccount,
224 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
225 /* [in] */ unsigned long Reserved)
227 osi_Log0(afsd_logp, "NetrRemoveAlternateComputerName not supported");
228 return ERROR_NOT_SUPPORTED;
231 unsigned long NetrSetPrimaryComputerName(
232 /* [in] */ handle_t RpcBindingHandle,
233 /* [unique][string][in] */ wchar_t *ServerName,
234 /* [unique][string][in] */ wchar_t *PrimaryName,
235 /* [unique][string][in] */ wchar_t *DomainAccount,
236 /* [unique][in] */ PJOINPR_ENCRYPTED_USER_PASSWORD EncryptedPassword,
237 /* [in] */ unsigned long Reserved)
239 osi_Log0(afsd_logp, "NetrSetPrimaryComputerName not supported");
240 return ERROR_NOT_SUPPORTED;
243 unsigned long NetrEnumerateComputerNames(
244 /* [unique][string][in] */ WKSSVC_IMPERSONATE_HANDLE ServerName,
245 /* [in] */ NET_COMPUTER_NAME_TYPE NameType,
246 /* [in] */ unsigned long Reserved,
247 /* [out] */ PNET_COMPUTER_NAME_ARRAY *ComputerNames)
249 osi_Log0(afsd_logp, "NetrEnumerateComputerName not supported");
250 return ERROR_NOT_SUPPORTED;
253 /* [nocode] */ void Opnum3NotUsedOnWire(
254 /* [in] */ handle_t IDL_handle)
258 /* [nocode] */ void Opnum4NotUsedOnWire(
259 /* [in] */ handle_t IDL_handle)
263 /* [nocode] */ void Opnum8NotUsedOnWire(
264 /* [in] */ handle_t IDL_handle)
268 /* [nocode] */ void Opnum9NotUsedOnWire(
269 /* [in] */ handle_t IDL_handle)
273 /* [nocode] */ void Opnum10NotUsedOnWire(
274 /* [in] */ handle_t IDL_handle)
278 /* [nocode] */ void Opnum11NotUsedOnWire(
279 /* [in] */ handle_t IDL_handle)
283 /* [nocode] */ void Opnum12NotUsedOnWire(
284 /* [in] */ handle_t IDL_handle)
289 /* [nocode] */ void Opnum14NotUsedOnWire(
290 /* [in] */ handle_t IDL_handle)
294 /* [nocode] */ void Opnum15NotUsedOnWire(
295 /* [in] */ handle_t IDL_handle)
299 /* [nocode] */ void Opnum16NotUsedOnWire(
300 /* [in] */ handle_t IDL_handle)
304 /* [nocode] */ void Opnum17NotUsedOnWire(
305 /* [in] */ handle_t IDL_handle)
309 /* [nocode] */ void Opnum18NotUsedOnWire(
310 /* [in] */ handle_t IDL_handle)
314 /* [nocode] */ void Opnum19NotUsedOnWire(
315 /* [in] */ handle_t IDL_handle)
320 /* [nocode] */ void Opnum21NotUsedOnWire(
321 /* [in] */ handle_t IDL_handle)