8909fc17a76416d2fa68ed721cfed54cbca5451f
[samba.git] / source4 / rpc_server / srvsvc / dcesrv_srvsvc.c
1 /* 
2    Unix SMB/CIFS implementation.
3
4    endpoint server for the srvsvc pipe
5
6    Copyright (C) Stefan (metze) Metzmacher 2004
7    
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 2 of the License, or
11    (at your option) any later version.
12    
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.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #include "includes.h"
24 #include "rpc_server/dcerpc_server.h"
25 #include "librpc/gen_ndr/ndr_srvsvc.h"
26 #include "rpc_server/common/common.h"
27 #include "system/time.h"
28
29 /* 
30   srvsvc_NetCharDevEnum 
31 */
32 static WERROR srvsvc_NetCharDevEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
33                                       struct srvsvc_NetCharDevEnum *r)
34 {
35         r->out.level = r->in.level;
36         r->out.totalentries = 0;
37         r->out.resume_handle = NULL;
38
39         switch (r->in.level) {
40         case 0:
41                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevCtr0);
42                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
43
44                 r->out.ctr.ctr0->count = 0;
45                 r->out.ctr.ctr0->array = NULL;
46
47                 return WERR_NOT_SUPPORTED;
48
49         case 1:
50                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevCtr1);
51                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
52
53                 r->out.ctr.ctr1->count = 0;
54                 r->out.ctr.ctr1->array = NULL;
55
56                 return WERR_NOT_SUPPORTED;
57
58         default:
59                 return WERR_UNKNOWN_LEVEL;
60         }
61
62         return WERR_OK;
63 }
64
65
66 /* 
67   srvsvc_NetCharDevGetInfo 
68 */
69 static WERROR srvsvc_NetCharDevGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
70                        struct srvsvc_NetCharDevGetInfo *r)
71 {
72         switch (r->in.level) {
73         case 0:
74                 r->out.info.info0 = NULL;
75
76                 return WERR_NOT_SUPPORTED;
77
78         case 1:
79                 r->out.info.info1 = NULL;
80
81                 return WERR_NOT_SUPPORTED;
82
83         default:
84                 return WERR_UNKNOWN_LEVEL;
85         }
86
87         return WERR_OK;
88 }
89
90
91 /* 
92   srvsvc_NetCharDevControl 
93 */
94 static WERROR srvsvc_NetCharDevControl(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
95                        struct srvsvc_NetCharDevControl *r)
96 {
97         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
98 }
99
100
101 /* 
102   srvsvc_NetCharDevQEnum 
103 */
104 static WERROR srvsvc_NetCharDevQEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
105                                      struct srvsvc_NetCharDevQEnum *r)
106 {
107         r->out.level = r->in.level;
108         r->out.totalentries = 0;
109         r->out.resume_handle = NULL;
110
111         switch (r->in.level) {
112         case 0:
113                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQCtr0);
114                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
115
116                 r->out.ctr.ctr0->count = 0;
117                 r->out.ctr.ctr0->array = NULL;
118
119                 return WERR_NOT_SUPPORTED;
120
121         case 1:
122                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetCharDevQCtr1);
123                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
124
125                 r->out.ctr.ctr1->count = 0;
126                 r->out.ctr.ctr1->array = NULL;
127
128                 return WERR_NOT_SUPPORTED;
129
130         default:
131                 return WERR_UNKNOWN_LEVEL;
132         }
133
134         return WERR_OK;
135 }
136
137
138 /* 
139   srvsvc_NetCharDevQGetInfo 
140 */
141 static WERROR srvsvc_NetCharDevQGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
142                                         struct srvsvc_NetCharDevQGetInfo *r)
143 {
144         switch (r->in.level) {
145         case 0:
146                 r->out.info.info0 = NULL;
147
148                 return WERR_NOT_SUPPORTED;
149
150         case 1:
151                 r->out.info.info1 = NULL;
152
153                 return WERR_NOT_SUPPORTED;
154
155         default:
156                 return WERR_UNKNOWN_LEVEL;
157         }
158
159         return WERR_OK;
160 }
161
162
163 /* 
164   srvsvc_NetCharDevQSetInfo 
165 */
166 static WERROR srvsvc_NetCharDevQSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
167                        struct srvsvc_NetCharDevQSetInfo *r)
168 {
169         switch (r->in.level) {
170         case 0: 
171                 if (r->in.parm_error) {
172                         r->out.parm_error = r->in.parm_error;
173                 }
174                 return WERR_NOT_SUPPORTED;
175         case 1:
176                 if (r->in.parm_error) {
177                         r->out.parm_error = r->in.parm_error;
178                 }
179                 return WERR_NOT_SUPPORTED;
180         default:
181                 return WERR_UNKNOWN_LEVEL;
182         }
183
184         return WERR_OK;
185 }
186
187
188 /* 
189   srvsvc_NetCharDevQPurge 
190 */
191 static WERROR srvsvc_NetCharDevQPurge(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
192                        struct srvsvc_NetCharDevQPurge *r)
193 {
194         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
195 }
196
197
198 /* 
199   srvsvc_NetCharDevQPurgeSelf 
200 */
201 static WERROR srvsvc_NetCharDevQPurgeSelf(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
202                                           struct srvsvc_NetCharDevQPurgeSelf *r)
203 {
204         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);        
205 }
206
207
208 /* 
209   srvsvc_NetConnEnum 
210 */
211 static WERROR srvsvc_NetConnEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
212                        struct srvsvc_NetConnEnum *r)
213 {
214         r->out.level = r->in.level;
215         r->out.totalentries = 0;
216         r->out.resume_handle = NULL;
217
218         switch (r->in.level) {
219         case 0:
220                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr0);
221                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
222
223                 r->out.ctr.ctr0->count = 0;
224                 r->out.ctr.ctr0->array = NULL;
225
226                 return WERR_NOT_SUPPORTED;
227
228         case 1:
229                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetConnCtr1);
230                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
231
232                 r->out.ctr.ctr1->count = 0;
233                 r->out.ctr.ctr1->array = NULL;
234
235                 return WERR_NOT_SUPPORTED;
236
237         default:
238                 return WERR_UNKNOWN_LEVEL;
239         }
240
241         return WERR_OK;
242 }
243
244
245 /* 
246   srvsvc_NetFileEnum 
247 */
248 static WERROR srvsvc_NetFileEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
249                                  struct srvsvc_NetFileEnum *r)
250 {
251         r->out.level = r->in.level;
252         r->out.totalentries = 0;
253         r->out.resume_handle = NULL;
254
255         switch (r->in.level) {
256         case 2:
257                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr2);
258                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
259
260                 r->out.ctr.ctr2->count = 0;
261                 r->out.ctr.ctr2->array = NULL;
262
263                 return WERR_NOT_SUPPORTED;
264
265         case 3:
266                 r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetFileCtr3);
267                 WERR_TALLOC_CHECK(r->out.ctr.ctr3);
268
269                 r->out.ctr.ctr3->count = 0;
270                 r->out.ctr.ctr3->array = NULL;
271
272                 return WERR_NOT_SUPPORTED;
273
274         default:
275                 return WERR_UNKNOWN_LEVEL;
276         }
277
278         return WERR_OK;
279 }
280
281
282 /* 
283   srvsvc_NetFileGetInfo 
284 */
285 static WERROR srvsvc_NetFileGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
286                                     struct srvsvc_NetFileGetInfo *r)
287 {
288         switch (r->in.level) {
289         case 2:
290                 r->out.info.info2 = NULL;
291                 return WERR_NOT_SUPPORTED;
292
293         case 3:
294                 r->out.info.info3 = NULL;
295                 return WERR_NOT_SUPPORTED;
296
297         default:
298                 return WERR_UNKNOWN_LEVEL;
299         }
300
301         return WERR_OK;
302 }
303
304
305 /* 
306   srvsvc_NetFileClose 
307 */
308 static WERROR srvsvc_NetFileClose(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
309                        struct srvsvc_NetFileClose *r)
310 {
311         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
312 }
313
314
315 /* 
316   srvsvc_NetSessEnum 
317 */
318 static WERROR srvsvc_NetSessEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
319                        struct srvsvc_NetSessEnum *r)
320 {
321         r->out.level = r->in.level;
322         r->out.totalentries = 0;
323         r->out.resume_handle = NULL;
324
325         switch (r->in.level) {
326         case 0:
327                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr0);
328                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
329
330                 r->out.ctr.ctr0->count = 0;
331                 r->out.ctr.ctr0->array = NULL;
332
333                 return WERR_NOT_SUPPORTED;
334
335         case 1:
336                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr1);
337                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
338
339                 r->out.ctr.ctr1->count = 0;
340                 r->out.ctr.ctr1->array = NULL;
341
342                 return WERR_NOT_SUPPORTED;
343
344         case 2:
345                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr2);
346                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
347
348                 r->out.ctr.ctr2->count = 0;
349                 r->out.ctr.ctr2->array = NULL;
350
351                 return WERR_NOT_SUPPORTED;
352
353         case 10:
354                 r->out.ctr.ctr10 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr10);
355                 WERR_TALLOC_CHECK(r->out.ctr.ctr10);
356
357                 r->out.ctr.ctr2->count = 0;
358                 r->out.ctr.ctr2->array = NULL;
359
360                 return WERR_NOT_SUPPORTED;
361
362         case 502:
363                 r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetSessCtr502);
364                 WERR_TALLOC_CHECK(r->out.ctr.ctr502);
365
366                 r->out.ctr.ctr2->count = 0;
367                 r->out.ctr.ctr2->array = NULL;
368
369                 return WERR_NOT_SUPPORTED;
370
371         default:
372                 return WERR_UNKNOWN_LEVEL;
373         }
374
375         return WERR_OK;
376 }
377
378
379 /* 
380   srvsvc_NetSessDel 
381 */
382 static WERROR srvsvc_NetSessDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
383                        struct srvsvc_NetSessDel *r)
384 {
385         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
386 }
387
388
389 /* 
390   srvsvc_NetShareAdd 
391 */
392 static WERROR srvsvc_NetShareAdd(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
393                        struct srvsvc_NetShareAdd *r)
394 {
395         switch (r->in.level) {
396         case 0: 
397                 if (r->in.parm_error) {
398                         r->out.parm_error = r->in.parm_error;
399                 }
400                 return WERR_NOT_SUPPORTED;
401
402         case 1:
403                 if (r->in.parm_error) {
404                         r->out.parm_error = r->in.parm_error;
405                 }
406                 return WERR_NOT_SUPPORTED;
407
408         case 2:
409                 if (r->in.parm_error) {
410                         r->out.parm_error = r->in.parm_error;
411                 }
412                 return WERR_NOT_SUPPORTED;
413
414         case 501:
415                 if (r->in.parm_error) {
416                         r->out.parm_error = r->in.parm_error;
417                 }
418                 return WERR_NOT_SUPPORTED;
419
420         case 502:
421                 if (r->in.parm_error) {
422                         r->out.parm_error = r->in.parm_error;
423                 }
424                 return WERR_NOT_SUPPORTED;
425
426         default:
427                 return WERR_UNKNOWN_LEVEL;
428         }
429
430         return WERR_OK;
431 }
432
433
434 /* 
435   srvsvc_NetShareEnumAll
436 */
437 static WERROR srvsvc_NetShareEnumAll(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
438                        struct srvsvc_NetShareEnumAll *r)
439 {
440         struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
441         r->out.level = r->in.level;
442         r->out.totalentries = 0;
443         r->out.resume_handle = NULL;
444
445         switch (r->in.level) {
446         case 0: {
447                 int i;
448
449                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr0);
450                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
451
452                 r->out.ctr.ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
453                 r->out.ctr.ctr0->array = NULL;
454
455                 if (r->out.ctr.ctr0->count == 0) break;
456
457                 r->out.ctr.ctr0->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo0, r->out.ctr.ctr0->count);
458                 WERR_TALLOC_CHECK(r->out.ctr.ctr0->array);
459
460                 for (i=0;i<r->out.ctr.ctr0->count;i++) {
461                         r->out.ctr.ctr0->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
462                         WERR_TALLOC_CHECK(r->out.ctr.ctr0->array[i].name);
463                 }
464
465                 r->out.totalentries = r->out.ctr.ctr0->count;
466
467                 break;
468                 }
469         case 1: {
470                 int i;
471                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr1);
472                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
473
474                 r->out.ctr.ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
475                 r->out.ctr.ctr1->array = NULL;
476
477                 if (r->out.ctr.ctr1->count == 0) break;
478
479                 r->out.ctr.ctr1->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo1, r->out.ctr.ctr1->count);
480                 WERR_TALLOC_CHECK(r->out.ctr.ctr1->array);
481
482                 for (i=0;i<r->out.ctr.ctr1->count;i++) {
483                         r->out.ctr.ctr1->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
484                         r->out.ctr.ctr1->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
485                         r->out.ctr.ctr1->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
486                 }
487
488                 r->out.totalentries = r->out.ctr.ctr1->count;
489
490                 break;
491                 }
492         case 2: {
493                 int i;
494                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr2);
495                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
496
497                 r->out.ctr.ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
498                 r->out.ctr.ctr2->array = NULL;
499
500                 if (r->out.ctr.ctr2->count == 0) break;
501
502                 r->out.ctr.ctr2->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo2, r->out.ctr.ctr2->count);
503                 WERR_TALLOC_CHECK(r->out.ctr.ctr2->array);
504
505                 for (i=0;i<r->out.ctr.ctr2->count;i++) {
506                         r->out.ctr.ctr2->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
507                         r->out.ctr.ctr2->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
508                         r->out.ctr.ctr2->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
509                         r->out.ctr.ctr2->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
510                         r->out.ctr.ctr2->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
511                         r->out.ctr.ctr2->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
512                         r->out.ctr.ctr2->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
513                         r->out.ctr.ctr2->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
514                 }
515
516                 r->out.totalentries = r->out.ctr.ctr2->count;
517
518                 break;
519                 }
520         case 501:{
521                 int i;
522                 r->out.ctr.ctr501 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr501);
523                 WERR_TALLOC_CHECK(r->out.ctr.ctr501);
524
525                 r->out.ctr.ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
526                 r->out.ctr.ctr501->array = NULL;
527
528                 if (r->out.ctr.ctr501->count == 0) break;
529
530                 r->out.ctr.ctr501->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo501, r->out.ctr.ctr501->count);
531                 WERR_TALLOC_CHECK(r->out.ctr.ctr501->array);
532
533                 for (i=0;i<r->out.ctr.ctr501->count;i++) {
534                         r->out.ctr.ctr501->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
535                         r->out.ctr.ctr501->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
536                         r->out.ctr.ctr501->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
537                         r->out.ctr.ctr501->array[i].csc_policy = dcesrv_common_get_share_csc_policy(mem_ctx, dce_ctx, i);
538                 }
539
540                 r->out.totalentries = r->out.ctr.ctr501->count;
541
542                 break;
543                 }
544         case 502:{
545                 int i;
546                 r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr502);
547                 WERR_TALLOC_CHECK(r->out.ctr.ctr502);
548
549                 r->out.ctr.ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
550                 r->out.ctr.ctr502->array = NULL;
551
552                 if (r->out.ctr.ctr502->count == 0) break;
553
554                 r->out.ctr.ctr502->array = talloc_array_p(mem_ctx, struct srvsvc_NetShareInfo502, r->out.ctr.ctr502->count);
555                 WERR_TALLOC_CHECK(r->out.ctr.ctr502->array);
556
557                 for (i=0;i<r->out.ctr.ctr502->count;i++) {
558                         r->out.ctr.ctr502->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
559                         r->out.ctr.ctr502->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
560                         r->out.ctr.ctr502->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
561                         r->out.ctr.ctr502->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
562                         r->out.ctr.ctr502->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
563                         r->out.ctr.ctr502->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
564                         r->out.ctr.ctr502->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
565                         r->out.ctr.ctr502->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
566                         r->out.ctr.ctr502->array[i].unknown = dcesrv_common_get_share_unknown(mem_ctx, dce_ctx, i);
567                         r->out.ctr.ctr502->array[i].sd = dcesrv_common_get_security_descriptor(mem_ctx, dce_ctx, i);
568                 }
569
570                 r->out.totalentries = r->out.ctr.ctr502->count;
571
572                 break;
573                 }
574         default:
575                 return WERR_UNKNOWN_LEVEL;
576         }
577
578         return WERR_OK;
579 }
580
581
582 /* 
583   srvsvc_NetShareGetInfo 
584 */
585 static WERROR srvsvc_NetShareGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
586                        struct srvsvc_NetShareGetInfo *r)
587 {
588         switch (r->in.level) {
589         case 0:
590                 r->out.info.info0 = NULL;
591
592                 return WERR_NOT_SUPPORTED;
593
594         case 1:
595                 r->out.info.info0 = NULL;
596
597                 return WERR_NOT_SUPPORTED;
598
599         case 2:
600                 r->out.info.info0 = NULL;
601
602                 return WERR_NOT_SUPPORTED;
603
604         case 501:
605                 r->out.info.info0 = NULL;
606
607                 return WERR_NOT_SUPPORTED;
608
609         case 502:
610                 r->out.info.info0 = NULL;
611
612                 return WERR_NOT_SUPPORTED;
613
614         default:
615                 return WERR_UNKNOWN_LEVEL;
616                 break;
617         }
618
619         return WERR_OK;
620 }
621
622
623 /* 
624   srvsvc_NetShareSetInfo 
625 */
626 static WERROR srvsvc_NetShareSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
627                        struct srvsvc_NetShareSetInfo *r)
628 {
629         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
630 }
631
632
633 /* 
634   srvsvc_NetShareDel 
635 */
636 static WERROR srvsvc_NetShareDel(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
637                        struct srvsvc_NetShareDel *r)
638 {
639         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
640 }
641
642
643 /* 
644   srvsvc_NetShareDelSticky 
645 */
646 static WERROR srvsvc_NetShareDelSticky(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
647                        struct srvsvc_NetShareDelSticky *r)
648 {
649         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
650 }
651
652
653 /* 
654   srvsvc_NetShareCheck 
655 */
656 static WERROR srvsvc_NetShareCheck(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
657                        struct srvsvc_NetShareCheck *r)
658 {
659         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
660 }
661
662
663 /* 
664   srvsvc_NetSrvGetInfo 
665 */
666 static WERROR srvsvc_NetSrvGetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
667                        struct srvsvc_NetSrvGetInfo *r)
668 {
669         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
670 }
671
672
673 /* 
674   srvsvc_NetSrvSetInfo 
675 */
676 static WERROR srvsvc_NetSrvSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
677                        struct srvsvc_NetSrvSetInfo *r)
678 {
679         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
680 }
681
682
683 /* 
684   srvsvc_NetDiskEnum 
685 */
686 static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
687                        struct srvsvc_NetDiskEnum *r)
688 {
689         r->out.count = 0;
690         r->out.ctr0 = NULL;
691         r->out.totalentries = 0;
692         r->out.resume_handle = NULL;
693
694         switch (r->in.level) {
695         case 0: {
696                 r->out.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetDiskCtr0);
697                 WERR_TALLOC_CHECK(r->out.ctr0);
698
699                 r->out.ctr0->unknown = 0x1;
700                 r->out.ctr0->count = 0;
701                 r->out.ctr0->array = NULL;
702
703                 return WERR_NOT_SUPPORTED;
704                 break;
705                 }
706         default:
707                 return WERR_UNKNOWN_LEVEL;
708                 break;
709         }
710
711         return WERR_OK;
712 }
713
714
715 /* 
716   srvsvc_NETRSERVERSTATISTICSGET 
717 */
718 static WERROR srvsvc_NETRSERVERSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
719                                              struct srvsvc_NETRSERVERSTATISTICSGET *r)
720 {
721         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
722 }
723
724
725 /* 
726   srvsvc_NETRSERVERTRANSPORTADD 
727 */
728 static WERROR srvsvc_NETRSERVERTRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
729                        struct srvsvc_NETRSERVERTRANSPORTADD *r)
730 {
731         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
732 }
733
734
735 /* 
736   srvsvc_NetTransportEnum 
737 */
738 static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
739                        struct srvsvc_NetTransportEnum *r)
740 {
741         r->out.level = r->in.level;
742         r->out.totalentries = 0;
743         r->out.resume_handle = NULL;
744
745         switch (r->in.level) {
746         case 0: {
747                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr0);
748                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
749
750                 r->out.ctr.ctr0->count = 0;
751                 r->out.ctr.ctr0->array = NULL;
752
753                 return WERR_NOT_SUPPORTED;
754                 break;
755                 }
756         case 1: {
757                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr1);
758                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
759
760                 r->out.ctr.ctr1->count = 0;
761                 r->out.ctr.ctr1->array = NULL;
762
763                 return WERR_NOT_SUPPORTED;
764                 break;
765                 }
766         case 2: {
767                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr2);
768                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
769
770                 r->out.ctr.ctr2->count = 0;
771                 r->out.ctr.ctr2->array = NULL;
772
773                 return WERR_NOT_SUPPORTED;
774                 break;
775                 }
776         case 3: {
777                 r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr3);
778                 WERR_TALLOC_CHECK(r->out.ctr.ctr3);
779
780                 r->out.ctr.ctr3->count = 0;
781                 r->out.ctr.ctr3->array = NULL;
782
783                 return WERR_NOT_SUPPORTED;
784                 break;
785                 }
786         default:
787                 return WERR_UNKNOWN_LEVEL;
788                 break;
789         }
790
791         return WERR_OK;
792 }
793
794
795 /* 
796   srvsvc_NETRSERVERTRANSPORTDEL 
797 */
798 static WERROR srvsvc_NETRSERVERTRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
799                        struct srvsvc_NETRSERVERTRANSPORTDEL *r)
800 {
801         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
802 }
803
804
805 /* 
806   srvsvc_NetRemoteTOD 
807 */
808 static WERROR srvsvc_NetRemoteTOD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
809                        struct srvsvc_NetRemoteTOD *r)
810 {
811         struct timeval tval;
812         time_t t;
813         struct tm tm;
814
815         r->out.info = talloc_p(mem_ctx, struct srvsvc_NetRemoteTODInfo);
816         WERR_TALLOC_CHECK(r->out.info);
817
818         GetTimeOfDay(&tval);
819         t = tval.tv_sec;
820
821         gmtime_r(&t, &tm);
822
823         r->out.info->elapsed    = t;
824         /* fake the uptime: just return the milliseconds till 0:00:00 today */
825         r->out.info->msecs      = (tm.tm_hour*60*60*1000)
826                                 + (tm.tm_min*60*1000)
827                                 + (tm.tm_sec*1000)
828                                 + (tval.tv_usec/1000);
829         r->out.info->hours      = tm.tm_hour;
830         r->out.info->mins       = tm.tm_min;
831         r->out.info->secs       = tm.tm_sec;
832         r->out.info->hunds      = tval.tv_usec/10000;
833         r->out.info->timezone   = get_time_zone(t)/60;
834         r->out.info->tinterval  = 310; /* just return the same as windows */
835         r->out.info->day        = tm.tm_mday;
836         r->out.info->month      = tm.tm_mon + 1;
837         r->out.info->year       = tm.tm_year + 1900;
838         r->out.info->weekday    = tm.tm_wday;
839
840         return WERR_OK;
841 }
842
843
844 /* 
845   srvsvc_NETRSERVERSETSERVICEBITS 
846 */
847 static WERROR srvsvc_NETRSERVERSETSERVICEBITS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
848                        struct srvsvc_NETRSERVERSETSERVICEBITS *r)
849 {
850         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
851 }
852
853
854 /* 
855   srvsvc_NETRPRPATHTYPE 
856 */
857 static WERROR srvsvc_NETRPRPATHTYPE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
858                        struct srvsvc_NETRPRPATHTYPE *r)
859 {
860         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
861 }
862
863
864 /* 
865   srvsvc_NETRPRPATHCANONICALIZE 
866 */
867 static WERROR srvsvc_NETRPRPATHCANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
868                        struct srvsvc_NETRPRPATHCANONICALIZE *r)
869 {
870         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
871 }
872
873
874 /* 
875   srvsvc_NETRPRPATHCOMPARE 
876 */
877 static WERROR srvsvc_NETRPRPATHCOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
878                        struct srvsvc_NETRPRPATHCOMPARE *r)
879 {
880         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
881 }
882
883
884 /* 
885   srvsvc_NET_NAME_VALIDATE 
886 */
887 static WERROR srvsvc_NET_NAME_VALIDATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
888                        struct srvsvc_NET_NAME_VALIDATE *r)
889 {
890         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
891 }
892
893
894 /* 
895   srvsvc_NETRPRNAMECANONICALIZE 
896 */
897 static WERROR srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
898                        struct srvsvc_NETRPRNAMECANONICALIZE *r)
899 {
900         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
901 }
902
903
904 /* 
905   srvsvc_NETRPRNAMECOMPARE 
906 */
907 static WERROR srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
908                        struct srvsvc_NETRPRNAMECOMPARE *r)
909 {
910         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
911 }
912
913
914 /* 
915   srvsvc_NetShareEnum 
916 */
917 static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
918                        struct srvsvc_NetShareEnum *r)
919 {
920         struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
921         r->out.level = r->in.level;
922         r->out.totalentries = 0;
923         r->out.resume_handle = NULL;
924
925         switch (r->in.level) {
926         case 0: {
927                 int i;
928
929                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr0);
930                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
931
932                 r->out.ctr.ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
933                 r->out.ctr.ctr0->array = NULL;
934
935                 if (r->out.ctr.ctr0->count == 0) break;
936
937                 r->out.ctr.ctr0->array = talloc_array_p(mem_ctx, 
938                                                         struct srvsvc_NetShareInfo0, 
939                                                         r->out.ctr.ctr0->count);
940                 WERR_TALLOC_CHECK(r->out.ctr.ctr0->array);
941
942                 for (i=0;i<r->out.ctr.ctr0->count;i++) {
943                         r->out.ctr.ctr0->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
944                         WERR_TALLOC_CHECK(r->out.ctr.ctr0->array[i].name);
945                 }
946
947                 r->out.totalentries = r->out.ctr.ctr0->count;
948
949                 break;
950                 }
951         case 1: {
952                 int i;
953                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr1);
954                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
955
956                 r->out.ctr.ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
957                 r->out.ctr.ctr1->array = NULL;
958
959                 if (r->out.ctr.ctr1->count == 0) break;
960
961                 r->out.ctr.ctr1->array = talloc_array_p(mem_ctx, 
962                                                         struct srvsvc_NetShareInfo1, 
963                                                         r->out.ctr.ctr1->count);
964                 WERR_TALLOC_CHECK(r->out.ctr.ctr1->array);
965
966                 for (i=0;i<r->out.ctr.ctr1->count;i++) {
967                         r->out.ctr.ctr1->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
968                         r->out.ctr.ctr1->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
969                         r->out.ctr.ctr1->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
970                 }
971
972                 r->out.totalentries = r->out.ctr.ctr1->count;
973
974                 break;
975                 }
976         case 2: {
977                 int i;
978                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr2);
979                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
980
981                 r->out.ctr.ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
982                 r->out.ctr.ctr2->array = NULL;
983
984                 if (r->out.ctr.ctr2->count == 0) break;
985
986                 r->out.ctr.ctr2->array = talloc_array_p(mem_ctx, 
987                                                         struct srvsvc_NetShareInfo2,
988                                                         r->out.ctr.ctr2->count);
989                 WERR_TALLOC_CHECK(r->out.ctr.ctr2->array);
990
991                 for (i=0;i<r->out.ctr.ctr2->count;i++) {
992                         r->out.ctr.ctr2->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
993                         r->out.ctr.ctr2->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
994                         r->out.ctr.ctr2->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
995                         r->out.ctr.ctr2->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
996                         r->out.ctr.ctr2->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
997                         r->out.ctr.ctr2->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
998                         r->out.ctr.ctr2->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
999                         r->out.ctr.ctr2->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
1000                 }
1001
1002                 r->out.totalentries = r->out.ctr.ctr2->count;
1003
1004                 break;
1005                 }
1006         case 501:{
1007                 int i;
1008                 r->out.ctr.ctr501 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr501);
1009                 WERR_TALLOC_CHECK(r->out.ctr.ctr501);
1010
1011                 r->out.ctr.ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
1012                 r->out.ctr.ctr501->array = NULL;
1013
1014                 if (r->out.ctr.ctr501->count == 0) break;
1015
1016                 r->out.ctr.ctr501->array = talloc_array_p(mem_ctx, 
1017                                                           struct srvsvc_NetShareInfo501,
1018                                                           r->out.ctr.ctr501->count);
1019                 WERR_TALLOC_CHECK(r->out.ctr.ctr501->array);
1020
1021                 for (i=0;i<r->out.ctr.ctr501->count;i++) {
1022                         r->out.ctr.ctr501->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
1023                         r->out.ctr.ctr501->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
1024                         r->out.ctr.ctr501->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
1025                         r->out.ctr.ctr501->array[i].csc_policy = dcesrv_common_get_share_csc_policy(mem_ctx, dce_ctx, i);
1026                 }
1027
1028                 r->out.totalentries = r->out.ctr.ctr501->count;
1029
1030                 break;
1031                 }
1032         case 502:{
1033                 int i;
1034                 r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr502);
1035                 WERR_TALLOC_CHECK(r->out.ctr.ctr502);
1036
1037                 r->out.ctr.ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
1038                 r->out.ctr.ctr502->array = NULL;
1039
1040                 if (r->out.ctr.ctr502->count == 0) break;
1041
1042                 r->out.ctr.ctr502->array = talloc_array_p(mem_ctx, 
1043                                                           struct srvsvc_NetShareInfo502,
1044                                                           r->out.ctr.ctr502->count);
1045                 WERR_TALLOC_CHECK(r->out.ctr.ctr502->array);
1046
1047                 for (i=0;i<r->out.ctr.ctr502->count;i++) {
1048                         r->out.ctr.ctr502->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
1049                         r->out.ctr.ctr502->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
1050                         r->out.ctr.ctr502->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
1051                         r->out.ctr.ctr502->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
1052                         r->out.ctr.ctr502->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
1053                         r->out.ctr.ctr502->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
1054                         r->out.ctr.ctr502->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
1055                         r->out.ctr.ctr502->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
1056                         r->out.ctr.ctr502->array[i].unknown = dcesrv_common_get_share_unknown(mem_ctx, dce_ctx, i);
1057                         r->out.ctr.ctr502->array[i].sd = dcesrv_common_get_security_descriptor(mem_ctx, dce_ctx, i);
1058                 }
1059
1060                 r->out.totalentries = r->out.ctr.ctr502->count;
1061
1062                 break;
1063                 }
1064         default:
1065                 return WERR_UNKNOWN_LEVEL;
1066                 break;
1067         }
1068
1069         return WERR_OK;
1070 }
1071
1072
1073 /* 
1074   srvsvc_NETRSHAREDELSTART 
1075 */
1076 static WERROR srvsvc_NETRSHAREDELSTART(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1077                        struct srvsvc_NETRSHAREDELSTART *r)
1078 {
1079         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1080 }
1081
1082
1083 /* 
1084   srvsvc_NETRSHAREDELCOMMIT 
1085 */
1086 static WERROR srvsvc_NETRSHAREDELCOMMIT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1087                        struct srvsvc_NETRSHAREDELCOMMIT *r)
1088 {
1089         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1090 }
1091
1092
1093 /* 
1094   srvsvc_NET_FILE_QUERY_SECDESC 
1095 */
1096 static WERROR srvsvc_NET_FILE_QUERY_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1097                        struct srvsvc_NET_FILE_QUERY_SECDESC *r)
1098 {
1099         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1100 }
1101
1102
1103 /* 
1104   srvsvc_NET_FILE_SET_SECDESC 
1105 */
1106 static WERROR srvsvc_NET_FILE_SET_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1107                        struct srvsvc_NET_FILE_SET_SECDESC *r)
1108 {
1109         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1110 }
1111
1112
1113 /* 
1114   srvsvc_NETRSERVERTRANSPORTADDEX 
1115 */
1116 static WERROR srvsvc_NETRSERVERTRANSPORTADDEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1117                        struct srvsvc_NETRSERVERTRANSPORTADDEX *r)
1118 {
1119         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1120 }
1121
1122
1123 /* 
1124   srvsvc_NETRSERVERSETSERVICEBITSEX 
1125 */
1126 static WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1127                        struct srvsvc_NETRSERVERSETSERVICEBITSEX *r)
1128 {
1129         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1130 }
1131
1132
1133 /* 
1134   srvsvc_NETRDFSGETVERSION 
1135 */
1136 static WERROR srvsvc_NETRDFSGETVERSION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1137                        struct srvsvc_NETRDFSGETVERSION *r)
1138 {
1139         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1140 }
1141
1142
1143 /* 
1144   srvsvc_NETRDFSCREATELOCALPARTITION 
1145 */
1146 static WERROR srvsvc_NETRDFSCREATELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1147                        struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
1148 {
1149         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1150 }
1151
1152
1153 /* 
1154   srvsvc_NETRDFSDELETELOCALPARTITION 
1155 */
1156 static WERROR srvsvc_NETRDFSDELETELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1157                        struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
1158 {
1159         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1160 }
1161
1162
1163 /* 
1164   srvsvc_NETRDFSSETLOCALVOLUMESTATE 
1165 */
1166 static WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1167                        struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
1168 {
1169         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1170 }
1171
1172
1173 /* 
1174   srvsvc_NETRDFSSETSERVERINFO 
1175 */
1176 static WERROR srvsvc_NETRDFSSETSERVERINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1177                        struct srvsvc_NETRDFSSETSERVERINFO *r)
1178 {
1179         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1180 }
1181
1182
1183 /* 
1184   srvsvc_NETRDFSCREATEEXITPOINT 
1185 */
1186 static WERROR srvsvc_NETRDFSCREATEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1187                        struct srvsvc_NETRDFSCREATEEXITPOINT *r)
1188 {
1189         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1190 }
1191
1192
1193 /* 
1194   srvsvc_NETRDFSDELETEEXITPOINT 
1195 */
1196 static WERROR srvsvc_NETRDFSDELETEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1197                        struct srvsvc_NETRDFSDELETEEXITPOINT *r)
1198 {
1199         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1200 }
1201
1202
1203 /* 
1204   srvsvc_NETRDFSMODIFYPREFIX 
1205 */
1206 static WERROR srvsvc_NETRDFSMODIFYPREFIX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1207                        struct srvsvc_NETRDFSMODIFYPREFIX *r)
1208 {
1209         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1210 }
1211
1212
1213 /* 
1214   srvsvc_NETRDFSFIXLOCALVOLUME 
1215 */
1216 static WERROR srvsvc_NETRDFSFIXLOCALVOLUME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1217                        struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
1218 {
1219         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1220 }
1221
1222
1223 /* 
1224   srvsvc_NETRDFSMANAGERREPORTSITEINFO 
1225 */
1226 static WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1227                        struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
1228 {
1229         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1230 }
1231
1232
1233 /* 
1234   srvsvc_NETRSERVERTRANSPORTDELEX 
1235 */
1236 static WERROR srvsvc_NETRSERVERTRANSPORTDELEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1237                        struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
1238 {
1239         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1240 }
1241
1242
1243 /* include the generated boilerplate */
1244 #include "librpc/gen_ndr/ndr_srvsvc_s.c"