12dcf5b7381c89a1dd87b79dfac4391875de5597
[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         if (r->in.level != 100)
670                 return WERR_UNKNOWN_LEVEL;
671
672         r->out.info.info100 = talloc_p(mem_ctx, struct srvsvc_NetSrvInfo100);
673         if (r->out.info.info100 == NULL)
674                 return WERR_NOMEM;
675
676         r->out.info.info100->platform_id = 500; /* W2k3 returns this */
677         r->out.info.info100->server_unc = lp_netbios_name();
678         return WERR_OK;
679 }
680
681
682 /* 
683   srvsvc_NetSrvSetInfo 
684 */
685 static WERROR srvsvc_NetSrvSetInfo(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
686                        struct srvsvc_NetSrvSetInfo *r)
687 {
688         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
689 }
690
691
692 /* 
693   srvsvc_NetDiskEnum 
694 */
695 static WERROR srvsvc_NetDiskEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
696                        struct srvsvc_NetDiskEnum *r)
697 {
698         r->out.count = 0;
699         r->out.ctr0 = NULL;
700         r->out.totalentries = 0;
701         r->out.resume_handle = NULL;
702
703         switch (r->in.level) {
704         case 0: {
705                 r->out.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetDiskCtr0);
706                 WERR_TALLOC_CHECK(r->out.ctr0);
707
708                 r->out.ctr0->unknown = 0x1;
709                 r->out.ctr0->count = 0;
710                 r->out.ctr0->array = NULL;
711
712                 return WERR_NOT_SUPPORTED;
713                 break;
714                 }
715         default:
716                 return WERR_UNKNOWN_LEVEL;
717                 break;
718         }
719
720         return WERR_OK;
721 }
722
723
724 /* 
725   srvsvc_NETRSERVERSTATISTICSGET 
726 */
727 static WERROR srvsvc_NETRSERVERSTATISTICSGET(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
728                                              struct srvsvc_NETRSERVERSTATISTICSGET *r)
729 {
730         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
731 }
732
733
734 /* 
735   srvsvc_NETRSERVERTRANSPORTADD 
736 */
737 static WERROR srvsvc_NETRSERVERTRANSPORTADD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
738                        struct srvsvc_NETRSERVERTRANSPORTADD *r)
739 {
740         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
741 }
742
743
744 /* 
745   srvsvc_NetTransportEnum 
746 */
747 static WERROR srvsvc_NetTransportEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
748                        struct srvsvc_NetTransportEnum *r)
749 {
750         r->out.level = r->in.level;
751         r->out.totalentries = 0;
752         r->out.resume_handle = NULL;
753
754         switch (r->in.level) {
755         case 0: {
756                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr0);
757                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
758
759                 r->out.ctr.ctr0->count = 0;
760                 r->out.ctr.ctr0->array = NULL;
761
762                 return WERR_NOT_SUPPORTED;
763                 break;
764                 }
765         case 1: {
766                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr1);
767                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
768
769                 r->out.ctr.ctr1->count = 0;
770                 r->out.ctr.ctr1->array = NULL;
771
772                 return WERR_NOT_SUPPORTED;
773                 break;
774                 }
775         case 2: {
776                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr2);
777                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
778
779                 r->out.ctr.ctr2->count = 0;
780                 r->out.ctr.ctr2->array = NULL;
781
782                 return WERR_NOT_SUPPORTED;
783                 break;
784                 }
785         case 3: {
786                 r->out.ctr.ctr3 = talloc_p(mem_ctx, struct srvsvc_NetTransportCtr3);
787                 WERR_TALLOC_CHECK(r->out.ctr.ctr3);
788
789                 r->out.ctr.ctr3->count = 0;
790                 r->out.ctr.ctr3->array = NULL;
791
792                 return WERR_NOT_SUPPORTED;
793                 break;
794                 }
795         default:
796                 return WERR_UNKNOWN_LEVEL;
797                 break;
798         }
799
800         return WERR_OK;
801 }
802
803
804 /* 
805   srvsvc_NETRSERVERTRANSPORTDEL 
806 */
807 static WERROR srvsvc_NETRSERVERTRANSPORTDEL(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
808                        struct srvsvc_NETRSERVERTRANSPORTDEL *r)
809 {
810         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
811 }
812
813
814 /* 
815   srvsvc_NetRemoteTOD 
816 */
817 static WERROR srvsvc_NetRemoteTOD(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
818                        struct srvsvc_NetRemoteTOD *r)
819 {
820         struct timeval tval;
821         time_t t;
822         struct tm tm;
823
824         r->out.info = talloc_p(mem_ctx, struct srvsvc_NetRemoteTODInfo);
825         WERR_TALLOC_CHECK(r->out.info);
826
827         GetTimeOfDay(&tval);
828         t = tval.tv_sec;
829
830         gmtime_r(&t, &tm);
831
832         r->out.info->elapsed    = t;
833         /* fake the uptime: just return the milliseconds till 0:00:00 today */
834         r->out.info->msecs      = (tm.tm_hour*60*60*1000)
835                                 + (tm.tm_min*60*1000)
836                                 + (tm.tm_sec*1000)
837                                 + (tval.tv_usec/1000);
838         r->out.info->hours      = tm.tm_hour;
839         r->out.info->mins       = tm.tm_min;
840         r->out.info->secs       = tm.tm_sec;
841         r->out.info->hunds      = tval.tv_usec/10000;
842         r->out.info->timezone   = get_time_zone(t)/60;
843         r->out.info->tinterval  = 310; /* just return the same as windows */
844         r->out.info->day        = tm.tm_mday;
845         r->out.info->month      = tm.tm_mon + 1;
846         r->out.info->year       = tm.tm_year + 1900;
847         r->out.info->weekday    = tm.tm_wday;
848
849         return WERR_OK;
850 }
851
852
853 /* 
854   srvsvc_NETRSERVERSETSERVICEBITS 
855 */
856 static WERROR srvsvc_NETRSERVERSETSERVICEBITS(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
857                        struct srvsvc_NETRSERVERSETSERVICEBITS *r)
858 {
859         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
860 }
861
862
863 /* 
864   srvsvc_NETRPRPATHTYPE 
865 */
866 static WERROR srvsvc_NETRPRPATHTYPE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
867                        struct srvsvc_NETRPRPATHTYPE *r)
868 {
869         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
870 }
871
872
873 /* 
874   srvsvc_NETRPRPATHCANONICALIZE 
875 */
876 static WERROR srvsvc_NETRPRPATHCANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
877                        struct srvsvc_NETRPRPATHCANONICALIZE *r)
878 {
879         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
880 }
881
882
883 /* 
884   srvsvc_NETRPRPATHCOMPARE 
885 */
886 static WERROR srvsvc_NETRPRPATHCOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
887                        struct srvsvc_NETRPRPATHCOMPARE *r)
888 {
889         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
890 }
891
892
893 /* 
894   srvsvc_NET_NAME_VALIDATE 
895 */
896 static WERROR srvsvc_NET_NAME_VALIDATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
897                        struct srvsvc_NET_NAME_VALIDATE *r)
898 {
899         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
900 }
901
902
903 /* 
904   srvsvc_NETRPRNAMECANONICALIZE 
905 */
906 static WERROR srvsvc_NETRPRNAMECANONICALIZE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
907                        struct srvsvc_NETRPRNAMECANONICALIZE *r)
908 {
909         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
910 }
911
912
913 /* 
914   srvsvc_NETRPRNAMECOMPARE 
915 */
916 static WERROR srvsvc_NETRPRNAMECOMPARE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
917                        struct srvsvc_NETRPRNAMECOMPARE *r)
918 {
919         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
920 }
921
922
923 /* 
924   srvsvc_NetShareEnum 
925 */
926 static WERROR srvsvc_NetShareEnum(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
927                        struct srvsvc_NetShareEnum *r)
928 {
929         struct dcesrv_context *dce_ctx = dce_call->conn->dce_ctx;
930         r->out.level = r->in.level;
931         r->out.totalentries = 0;
932         r->out.resume_handle = NULL;
933
934         switch (r->in.level) {
935         case 0: {
936                 int i;
937
938                 r->out.ctr.ctr0 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr0);
939                 WERR_TALLOC_CHECK(r->out.ctr.ctr0);
940
941                 r->out.ctr.ctr0->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
942                 r->out.ctr.ctr0->array = NULL;
943
944                 if (r->out.ctr.ctr0->count == 0) break;
945
946                 r->out.ctr.ctr0->array = talloc_array_p(mem_ctx, 
947                                                         struct srvsvc_NetShareInfo0, 
948                                                         r->out.ctr.ctr0->count);
949                 WERR_TALLOC_CHECK(r->out.ctr.ctr0->array);
950
951                 for (i=0;i<r->out.ctr.ctr0->count;i++) {
952                         r->out.ctr.ctr0->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
953                         WERR_TALLOC_CHECK(r->out.ctr.ctr0->array[i].name);
954                 }
955
956                 r->out.totalentries = r->out.ctr.ctr0->count;
957
958                 break;
959                 }
960         case 1: {
961                 int i;
962                 r->out.ctr.ctr1 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr1);
963                 WERR_TALLOC_CHECK(r->out.ctr.ctr1);
964
965                 r->out.ctr.ctr1->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
966                 r->out.ctr.ctr1->array = NULL;
967
968                 if (r->out.ctr.ctr1->count == 0) break;
969
970                 r->out.ctr.ctr1->array = talloc_array_p(mem_ctx, 
971                                                         struct srvsvc_NetShareInfo1, 
972                                                         r->out.ctr.ctr1->count);
973                 WERR_TALLOC_CHECK(r->out.ctr.ctr1->array);
974
975                 for (i=0;i<r->out.ctr.ctr1->count;i++) {
976                         r->out.ctr.ctr1->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
977                         r->out.ctr.ctr1->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
978                         r->out.ctr.ctr1->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
979                 }
980
981                 r->out.totalentries = r->out.ctr.ctr1->count;
982
983                 break;
984                 }
985         case 2: {
986                 int i;
987                 r->out.ctr.ctr2 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr2);
988                 WERR_TALLOC_CHECK(r->out.ctr.ctr2);
989
990                 r->out.ctr.ctr2->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
991                 r->out.ctr.ctr2->array = NULL;
992
993                 if (r->out.ctr.ctr2->count == 0) break;
994
995                 r->out.ctr.ctr2->array = talloc_array_p(mem_ctx, 
996                                                         struct srvsvc_NetShareInfo2,
997                                                         r->out.ctr.ctr2->count);
998                 WERR_TALLOC_CHECK(r->out.ctr.ctr2->array);
999
1000                 for (i=0;i<r->out.ctr.ctr2->count;i++) {
1001                         r->out.ctr.ctr2->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
1002                         r->out.ctr.ctr2->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
1003                         r->out.ctr.ctr2->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
1004                         r->out.ctr.ctr2->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
1005                         r->out.ctr.ctr2->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
1006                         r->out.ctr.ctr2->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
1007                         r->out.ctr.ctr2->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
1008                         r->out.ctr.ctr2->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
1009                 }
1010
1011                 r->out.totalentries = r->out.ctr.ctr2->count;
1012
1013                 break;
1014                 }
1015         case 501:{
1016                 int i;
1017                 r->out.ctr.ctr501 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr501);
1018                 WERR_TALLOC_CHECK(r->out.ctr.ctr501);
1019
1020                 r->out.ctr.ctr501->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
1021                 r->out.ctr.ctr501->array = NULL;
1022
1023                 if (r->out.ctr.ctr501->count == 0) break;
1024
1025                 r->out.ctr.ctr501->array = talloc_array_p(mem_ctx, 
1026                                                           struct srvsvc_NetShareInfo501,
1027                                                           r->out.ctr.ctr501->count);
1028                 WERR_TALLOC_CHECK(r->out.ctr.ctr501->array);
1029
1030                 for (i=0;i<r->out.ctr.ctr501->count;i++) {
1031                         r->out.ctr.ctr501->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
1032                         r->out.ctr.ctr501->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
1033                         r->out.ctr.ctr501->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
1034                         r->out.ctr.ctr501->array[i].csc_policy = dcesrv_common_get_share_csc_policy(mem_ctx, dce_ctx, i);
1035                 }
1036
1037                 r->out.totalentries = r->out.ctr.ctr501->count;
1038
1039                 break;
1040                 }
1041         case 502:{
1042                 int i;
1043                 r->out.ctr.ctr502 = talloc_p(mem_ctx, struct srvsvc_NetShareCtr502);
1044                 WERR_TALLOC_CHECK(r->out.ctr.ctr502);
1045
1046                 r->out.ctr.ctr502->count = dcesrv_common_get_count_of_shares(mem_ctx, dce_ctx);
1047                 r->out.ctr.ctr502->array = NULL;
1048
1049                 if (r->out.ctr.ctr502->count == 0) break;
1050
1051                 r->out.ctr.ctr502->array = talloc_array_p(mem_ctx, 
1052                                                           struct srvsvc_NetShareInfo502,
1053                                                           r->out.ctr.ctr502->count);
1054                 WERR_TALLOC_CHECK(r->out.ctr.ctr502->array);
1055
1056                 for (i=0;i<r->out.ctr.ctr502->count;i++) {
1057                         r->out.ctr.ctr502->array[i].name = dcesrv_common_get_share_name(mem_ctx, dce_ctx, i);
1058                         r->out.ctr.ctr502->array[i].type = dcesrv_common_get_share_type(mem_ctx, dce_ctx, i);
1059                         r->out.ctr.ctr502->array[i].comment = dcesrv_common_get_share_comment(mem_ctx, dce_ctx, i);
1060                         r->out.ctr.ctr502->array[i].permissions = dcesrv_common_get_share_permissions(mem_ctx, dce_ctx, i);
1061                         r->out.ctr.ctr502->array[i].max_users = dcesrv_common_get_share_max_users(mem_ctx, dce_ctx, i);
1062                         r->out.ctr.ctr502->array[i].current_users = dcesrv_common_get_share_current_users(mem_ctx, dce_ctx, i);
1063                         r->out.ctr.ctr502->array[i].path = dcesrv_common_get_share_path(mem_ctx, dce_ctx, i);
1064                         r->out.ctr.ctr502->array[i].password = dcesrv_common_get_share_password(mem_ctx, dce_ctx, i);
1065                         r->out.ctr.ctr502->array[i].unknown = dcesrv_common_get_share_unknown(mem_ctx, dce_ctx, i);
1066                         r->out.ctr.ctr502->array[i].sd = dcesrv_common_get_security_descriptor(mem_ctx, dce_ctx, i);
1067                 }
1068
1069                 r->out.totalentries = r->out.ctr.ctr502->count;
1070
1071                 break;
1072                 }
1073         default:
1074                 return WERR_UNKNOWN_LEVEL;
1075                 break;
1076         }
1077
1078         return WERR_OK;
1079 }
1080
1081
1082 /* 
1083   srvsvc_NETRSHAREDELSTART 
1084 */
1085 static WERROR srvsvc_NETRSHAREDELSTART(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1086                        struct srvsvc_NETRSHAREDELSTART *r)
1087 {
1088         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1089 }
1090
1091
1092 /* 
1093   srvsvc_NETRSHAREDELCOMMIT 
1094 */
1095 static WERROR srvsvc_NETRSHAREDELCOMMIT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1096                        struct srvsvc_NETRSHAREDELCOMMIT *r)
1097 {
1098         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1099 }
1100
1101
1102 /* 
1103   srvsvc_NET_FILE_QUERY_SECDESC 
1104 */
1105 static WERROR srvsvc_NET_FILE_QUERY_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1106                        struct srvsvc_NET_FILE_QUERY_SECDESC *r)
1107 {
1108         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1109 }
1110
1111
1112 /* 
1113   srvsvc_NET_FILE_SET_SECDESC 
1114 */
1115 static WERROR srvsvc_NET_FILE_SET_SECDESC(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1116                        struct srvsvc_NET_FILE_SET_SECDESC *r)
1117 {
1118         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1119 }
1120
1121
1122 /* 
1123   srvsvc_NETRSERVERTRANSPORTADDEX 
1124 */
1125 static WERROR srvsvc_NETRSERVERTRANSPORTADDEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1126                        struct srvsvc_NETRSERVERTRANSPORTADDEX *r)
1127 {
1128         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1129 }
1130
1131
1132 /* 
1133   srvsvc_NETRSERVERSETSERVICEBITSEX 
1134 */
1135 static WERROR srvsvc_NETRSERVERSETSERVICEBITSEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1136                        struct srvsvc_NETRSERVERSETSERVICEBITSEX *r)
1137 {
1138         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1139 }
1140
1141
1142 /* 
1143   srvsvc_NETRDFSGETVERSION 
1144 */
1145 static WERROR srvsvc_NETRDFSGETVERSION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1146                        struct srvsvc_NETRDFSGETVERSION *r)
1147 {
1148         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1149 }
1150
1151
1152 /* 
1153   srvsvc_NETRDFSCREATELOCALPARTITION 
1154 */
1155 static WERROR srvsvc_NETRDFSCREATELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1156                        struct srvsvc_NETRDFSCREATELOCALPARTITION *r)
1157 {
1158         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1159 }
1160
1161
1162 /* 
1163   srvsvc_NETRDFSDELETELOCALPARTITION 
1164 */
1165 static WERROR srvsvc_NETRDFSDELETELOCALPARTITION(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1166                        struct srvsvc_NETRDFSDELETELOCALPARTITION *r)
1167 {
1168         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1169 }
1170
1171
1172 /* 
1173   srvsvc_NETRDFSSETLOCALVOLUMESTATE 
1174 */
1175 static WERROR srvsvc_NETRDFSSETLOCALVOLUMESTATE(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1176                        struct srvsvc_NETRDFSSETLOCALVOLUMESTATE *r)
1177 {
1178         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1179 }
1180
1181
1182 /* 
1183   srvsvc_NETRDFSSETSERVERINFO 
1184 */
1185 static WERROR srvsvc_NETRDFSSETSERVERINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1186                        struct srvsvc_NETRDFSSETSERVERINFO *r)
1187 {
1188         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1189 }
1190
1191
1192 /* 
1193   srvsvc_NETRDFSCREATEEXITPOINT 
1194 */
1195 static WERROR srvsvc_NETRDFSCREATEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1196                        struct srvsvc_NETRDFSCREATEEXITPOINT *r)
1197 {
1198         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1199 }
1200
1201
1202 /* 
1203   srvsvc_NETRDFSDELETEEXITPOINT 
1204 */
1205 static WERROR srvsvc_NETRDFSDELETEEXITPOINT(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1206                        struct srvsvc_NETRDFSDELETEEXITPOINT *r)
1207 {
1208         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1209 }
1210
1211
1212 /* 
1213   srvsvc_NETRDFSMODIFYPREFIX 
1214 */
1215 static WERROR srvsvc_NETRDFSMODIFYPREFIX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1216                        struct srvsvc_NETRDFSMODIFYPREFIX *r)
1217 {
1218         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1219 }
1220
1221
1222 /* 
1223   srvsvc_NETRDFSFIXLOCALVOLUME 
1224 */
1225 static WERROR srvsvc_NETRDFSFIXLOCALVOLUME(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1226                        struct srvsvc_NETRDFSFIXLOCALVOLUME *r)
1227 {
1228         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1229 }
1230
1231
1232 /* 
1233   srvsvc_NETRDFSMANAGERREPORTSITEINFO 
1234 */
1235 static WERROR srvsvc_NETRDFSMANAGERREPORTSITEINFO(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1236                        struct srvsvc_NETRDFSMANAGERREPORTSITEINFO *r)
1237 {
1238         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1239 }
1240
1241
1242 /* 
1243   srvsvc_NETRSERVERTRANSPORTDELEX 
1244 */
1245 static WERROR srvsvc_NETRSERVERTRANSPORTDELEX(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx,
1246                        struct srvsvc_NETRSERVERTRANSPORTDELEX *r)
1247 {
1248         DCESRV_FAULT(DCERPC_FAULT_OP_RNG_ERROR);
1249 }
1250
1251
1252 /* include the generated boilerplate */
1253 #include "librpc/gen_ndr/ndr_srvsvc_s.c"