2 * Unix SMB/CIFS implementation.
3 * RPC Pipe client / server routines
5 * Copyright (C) Andrew Tridgell 1992-1997,
6 * Copyright (C) Gerald (Jerry) Carter 2006.
8 * This program is free software; you can redistribute it and/or modify
9 * it under the terms of the GNU General Public License as published by
10 * the Free Software Foundation; either version 3 of the License, or
11 * (at your option) any later version.
13 * This program is distributed in the hope that it will be useful,
14 * but WITHOUT ANY WARRANTY; without even the implied warranty of
15 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 * GNU General Public License for more details.
18 * You should have received a copy of the GNU General Public License
19 * along with this program; if not, see <http://www.gnu.org/licenses/>.
22 /* This is the implementation of the wks interface. */
27 #define DBGC_CLASS DBGC_RPC_SRV
29 /*******************************************************************
30 Fill in the valiues for the struct wkssvc_NetWkstaInfo100.
31 ********************************************************************/
33 static void create_wks_info_100(struct wkssvc_NetWkstaInfo100
*info100
)
38 pstrcpy (my_name
, global_myname());
41 pstrcpy (domain
, lp_workgroup());
44 info100
->platform_id
= 0x000001f4; /* unknown */
45 info100
->version_major
= lp_major_announce_version();
46 info100
->version_minor
= lp_minor_announce_version();
48 info100
->server_name
= talloc_strdup( info100
, my_name
);
49 info100
->domain_name
= talloc_strdup( info100
, domain
);
54 /********************************************************************
55 only supports info level 100 at the moment.
56 ********************************************************************/
58 WERROR
_wkssvc_NetWkstaGetInfo( pipes_struct
*p
, struct wkssvc_NetWkstaGetInfo
*r
)
60 struct wkssvc_NetWkstaInfo100
*wks100
= NULL
;
62 /* We only support info level 100 currently */
64 if ( r
->in
.level
!= 100 ) {
65 return WERR_UNKNOWN_LEVEL
;
68 if ( (wks100
= TALLOC_ZERO_P(p
->mem_ctx
, struct wkssvc_NetWkstaInfo100
)) == NULL
) {
72 create_wks_info_100( wks100
);
74 r
->out
.info
->info100
= wks100
;
79 /********************************************************************
80 ********************************************************************/
82 WERROR
_wkssvc_NetWkstaSetInfo( pipes_struct
*p
, struct wkssvc_NetWkstaSetInfo
*r
)
84 /* FIXME: Add implementation code here */
85 p
->rng_fault_state
= True
;
86 return WERR_NOT_SUPPORTED
;
89 /********************************************************************
90 ********************************************************************/
92 WERROR
_wkssvc_NetWkstaEnumUsers( pipes_struct
*p
, struct wkssvc_NetWkstaEnumUsers
*r
)
94 /* FIXME: Add implementation code here */
95 p
->rng_fault_state
= True
;
96 return WERR_NOT_SUPPORTED
;
99 /********************************************************************
100 ********************************************************************/
102 WERROR
_WKSSVC_NETRWKSTAUSERGETINFO( pipes_struct
*p
, struct WKSSVC_NETRWKSTAUSERGETINFO
*r
)
104 /* FIXME: Add implementation code here */
105 p
->rng_fault_state
= True
;
106 return WERR_NOT_SUPPORTED
;
109 /********************************************************************
110 ********************************************************************/
112 WERROR
_WKSSVC_NETRWKSTAUSERSETINFO( pipes_struct
*p
, struct WKSSVC_NETRWKSTAUSERSETINFO
*r
)
114 /* FIXME: Add implementation code here */
115 p
->rng_fault_state
= True
;
116 return WERR_NOT_SUPPORTED
;
119 /********************************************************************
120 ********************************************************************/
122 WERROR
_wkssvc_NetWkstaTransportEnum( pipes_struct
*p
, struct wkssvc_NetWkstaTransportEnum
*r
)
124 /* FIXME: Add implementation code here */
125 p
->rng_fault_state
= True
;
126 return WERR_NOT_SUPPORTED
;
129 /********************************************************************
130 ********************************************************************/
132 WERROR
_WKSSVC_NETRWKSTATRANSPORTADD( pipes_struct
*p
, struct WKSSVC_NETRWKSTATRANSPORTADD
*r
)
134 /* FIXME: Add implementation code here */
135 p
->rng_fault_state
= True
;
136 return WERR_NOT_SUPPORTED
;
139 /********************************************************************
140 ********************************************************************/
142 WERROR
_WKSSVC_NETRWKSTATRANSPORTDEL( pipes_struct
*p
, struct WKSSVC_NETRWKSTATRANSPORTDEL
*r
)
144 /* FIXME: Add implementation code here */
145 p
->rng_fault_state
= True
;
146 return WERR_NOT_SUPPORTED
;
149 /********************************************************************
150 ********************************************************************/
152 WERROR
_WKSSVC_NETRUSEADD( pipes_struct
*p
, struct WKSSVC_NETRUSEADD
*r
)
154 /* FIXME: Add implementation code here */
155 p
->rng_fault_state
= True
;
156 return WERR_NOT_SUPPORTED
;
159 /********************************************************************
160 ********************************************************************/
162 WERROR
_WKSSVC_NETRUSEGETINFO( pipes_struct
*p
, struct WKSSVC_NETRUSEGETINFO
*r
)
164 /* FIXME: Add implementation code here */
165 p
->rng_fault_state
= True
;
166 return WERR_NOT_SUPPORTED
;
169 /********************************************************************
170 ********************************************************************/
172 WERROR
_WKSSVC_NETRUSEDEL( pipes_struct
*p
, struct WKSSVC_NETRUSEDEL
*r
)
174 /* FIXME: Add implementation code here */
175 p
->rng_fault_state
= True
;
176 return WERR_NOT_SUPPORTED
;
179 /********************************************************************
180 ********************************************************************/
182 WERROR
_WKSSVC_NETRUSEENUM( pipes_struct
*p
, struct WKSSVC_NETRUSEENUM
*r
)
184 /* FIXME: Add implementation code here */
185 p
->rng_fault_state
= True
;
186 return WERR_NOT_SUPPORTED
;
189 /********************************************************************
190 ********************************************************************/
192 WERROR
_WKSSVC_NETRMESSAGEBUFFERSEND( pipes_struct
*p
, struct WKSSVC_NETRMESSAGEBUFFERSEND
*r
)
194 /* FIXME: Add implementation code here */
195 p
->rng_fault_state
= True
;
196 return WERR_NOT_SUPPORTED
;
199 /********************************************************************
200 ********************************************************************/
202 WERROR
_WKSSVC_NETRWORKSTATIONSTATISTICSGET( pipes_struct
*p
, struct WKSSVC_NETRWORKSTATIONSTATISTICSGET
*r
)
204 /* FIXME: Add implementation code here */
205 p
->rng_fault_state
= True
;
206 return WERR_NOT_SUPPORTED
;
209 /********************************************************************
210 ********************************************************************/
212 WERROR
_WKSSVC_NETRLOGONDOMAINNAMEADD( pipes_struct
*p
, struct WKSSVC_NETRLOGONDOMAINNAMEADD
*r
)
214 /* FIXME: Add implementation code here */
215 p
->rng_fault_state
= True
;
216 return WERR_NOT_SUPPORTED
;
219 /********************************************************************
220 ********************************************************************/
222 WERROR
_WKSSVC_NETRLOGONDOMAINNAMEDEL( pipes_struct
*p
, struct WKSSVC_NETRLOGONDOMAINNAMEDEL
*r
)
224 /* FIXME: Add implementation code here */
225 p
->rng_fault_state
= True
;
226 return WERR_NOT_SUPPORTED
;
229 /********************************************************************
230 ********************************************************************/
232 WERROR
_WKSSVC_NETRJOINDOMAIN( pipes_struct
*p
, struct WKSSVC_NETRJOINDOMAIN
*r
)
234 /* FIXME: Add implementation code here */
235 p
->rng_fault_state
= True
;
236 return WERR_NOT_SUPPORTED
;
239 /********************************************************************
240 ********************************************************************/
242 WERROR
_WKSSVC_NETRUNJOINDOMAIN( pipes_struct
*p
, struct WKSSVC_NETRUNJOINDOMAIN
*r
)
244 /* FIXME: Add implementation code here */
245 p
->rng_fault_state
= True
;
246 return WERR_NOT_SUPPORTED
;
249 /********************************************************************
250 ********************************************************************/
252 WERROR
_WKSSVC_NETRRENAMEMACHINEINDOMAIN( pipes_struct
*p
, struct WKSSVC_NETRRENAMEMACHINEINDOMAIN
*r
)
254 /* FIXME: Add implementation code here */
255 p
->rng_fault_state
= True
;
256 return WERR_NOT_SUPPORTED
;
259 /********************************************************************
260 ********************************************************************/
262 WERROR
_WKSSVC_NETRVALIDATENAME( pipes_struct
*p
, struct WKSSVC_NETRVALIDATENAME
*r
)
264 /* FIXME: Add implementation code here */
265 p
->rng_fault_state
= True
;
266 return WERR_NOT_SUPPORTED
;
269 /********************************************************************
270 ********************************************************************/
272 WERROR
_WKSSVC_NETRGETJOININFORMATION( pipes_struct
*p
, struct WKSSVC_NETRGETJOININFORMATION
*r
)
274 /* FIXME: Add implementation code here */
275 p
->rng_fault_state
= True
;
276 return WERR_NOT_SUPPORTED
;
279 /********************************************************************
280 ********************************************************************/
282 WERROR
_WKSSVC_NETRGETJOINABLEOUS( pipes_struct
*p
, struct WKSSVC_NETRGETJOINABLEOUS
*r
)
284 /* FIXME: Add implementation code here */
285 p
->rng_fault_state
= True
;
286 return WERR_NOT_SUPPORTED
;
289 /********************************************************************
290 ********************************************************************/
292 WERROR
_wkssvc_NetrJoinDomain2(pipes_struct
*p
, struct wkssvc_NetrJoinDomain2
*r
)
294 /* FIXME: Add implementation code here */
295 p
->rng_fault_state
= True
;
296 return WERR_NOT_SUPPORTED
;
299 /********************************************************************
300 ********************************************************************/
302 WERROR
_wkssvc_NetrUnjoinDomain2(pipes_struct
*p
, struct wkssvc_NetrUnjoinDomain2
*r
)
304 /* FIXME: Add implementation code here */
305 p
->rng_fault_state
= True
;
306 return WERR_NOT_SUPPORTED
;
309 /********************************************************************
310 ********************************************************************/
312 WERROR
_wkssvc_NetrRenameMachineInDomain2(pipes_struct
*p
, struct wkssvc_NetrRenameMachineInDomain2
*r
)
314 /* FIXME: Add implementation code here */
315 p
->rng_fault_state
= True
;
316 return WERR_NOT_SUPPORTED
;
319 /********************************************************************
320 ********************************************************************/
322 WERROR
_WKSSVC_NETRVALIDATENAME2( pipes_struct
*p
, struct WKSSVC_NETRVALIDATENAME2
*r
)
324 /* FIXME: Add implementation code here */
325 p
->rng_fault_state
= True
;
326 return WERR_NOT_SUPPORTED
;
329 /********************************************************************
330 ********************************************************************/
332 WERROR
_WKSSVC_NETRGETJOINABLEOUS2( pipes_struct
*p
, struct WKSSVC_NETRGETJOINABLEOUS2
*r
)
334 /* FIXME: Add implementation code here */
335 p
->rng_fault_state
= True
;
336 return WERR_NOT_SUPPORTED
;
339 /********************************************************************
340 ********************************************************************/
342 WERROR
_wkssvc_NetrAddAlternateComputerName(pipes_struct
*p
, struct wkssvc_NetrAddAlternateComputerName
*r
)
344 /* FIXME: Add implementation code here */
345 p
->rng_fault_state
= True
;
346 return WERR_NOT_SUPPORTED
;
349 /********************************************************************
350 ********************************************************************/
352 WERROR
_wkssvc_NetrRemoveAlternateComputerName(pipes_struct
*p
, struct wkssvc_NetrRemoveAlternateComputerName
*r
)
354 /* FIXME: Add implementation code here */
355 p
->rng_fault_state
= True
;
356 return WERR_NOT_SUPPORTED
;
359 /********************************************************************
360 ********************************************************************/
362 WERROR
_WKSSVC_NETRSETPRIMARYCOMPUTERNAME( pipes_struct
*p
, struct WKSSVC_NETRSETPRIMARYCOMPUTERNAME
*r
)
364 /* FIXME: Add implementation code here */
365 p
->rng_fault_state
= True
;
366 return WERR_NOT_SUPPORTED
;
369 /********************************************************************
370 ********************************************************************/
372 WERROR
_WKSSVC_NETRENUMERATECOMPUTERNAMES( pipes_struct
*p
, struct WKSSVC_NETRENUMERATECOMPUTERNAMES
*r
)
374 /* FIXME: Add implementation code here */
375 p
->rng_fault_state
= True
;
376 return WERR_NOT_SUPPORTED
;