~ubuntu-branches/ubuntu/vivid/samba/vivid

« back to all changes in this revision

Viewing changes to source3/librpc/gen_ndr/ndr_eventlog6_s.c

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2011-12-21 13:18:04 UTC
  • mfrom: (0.39.21 sid)
  • Revision ID: package-import@ubuntu.com-20111221131804-xtlr39wx6njehxxr
Tags: 2:3.6.1-3ubuntu1
* Merge from Debian testing.  Remaining changes:
  + debian/patches/VERSION.patch:
    - set SAMBA_VERSION_SUFFIX to Ubuntu.
  + debian/patches/error-trans.fix-276472:
    - Add the translation of Unix Error code -ENOTSUP to NT Error Code
    - NT_STATUS_NOT_SUPPORTED to prevent the Permission denied error.
  + debian/smb.conf:
    - add "(Samba, Ubuntu)" to server string.
    - comment out the default [homes] share, and add a comment about
      "valid users = %S" to show users how to restrict access to
      \\server\username to only username.
    - Set 'usershare allow guests', so that usershare admins are 
      allowed to create public shares in addition to authenticated
      ones.
    - add map to guest = Bad user, maps bad username to guest access.
  + debian/samba-common.config:
    - Do not change priority to high if dhclient3 is installed.
    - Use priority medium instead of high for the workgroup question.
  + debian/control:
    - Don't build against or suggest ctdb.
    - Add dependency on samba-common-bin to samba.
  + Add ufw integration:
    - Created debian/samba.ufw.profile
    - debian/rules, debian/samba.dirs, debian/samba.files: install
      profile
    - debian/control: have samba suggest ufw
  + Add apport hook:
    - Created debian/source_samba.py.
    - debian/rules, debian/samba.dirs, debian/samba-common-bin.files: install
  + Switch to upstart:
    - Add debian/samba.{nmbd,smbd}.upstart.
  + debian/samba.logrotate, debian/samba-common.dhcp, debian/samba.if-up:
    - Make them upstart compatible
  + debian/samba.postinst: 
    - Avoid scary pdbedit warnings on first import.
  + debian/samba-common.postinst: Add more informative error message for
    the case where smb.conf was manually deleted
  + debian/patches/fix-debuglevel-name-conflict.patch: don't use 'debug_level'
    as a global variable name in an NSS module 
  + Dropped:
    - debian/patches/error-trans.fix-276472
    - debian/patches/fix-debuglevel-name-conflict.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/* server functions auto-generated by pidl */
 
2
#include "librpc/gen_ndr/ndr_eventlog6.h"
 
3
 
 
4
/* eventlog6 - dcerpc server boilerplate generated by pidl */
 
5
 
 
6
 
 
7
static NTSTATUS eventlog6__op_bind(struct dcesrv_call_state *dce_call, const struct dcesrv_interface *iface, uint32_t if_version)
 
8
{
 
9
#ifdef DCESRV_INTERFACE_EVENTLOG6_BIND
 
10
        return DCESRV_INTERFACE_EVENTLOG6_BIND(dce_call,iface);
 
11
#else
 
12
        return NT_STATUS_OK;
 
13
#endif
 
14
}
 
15
 
 
16
static void eventlog6__op_unbind(struct dcesrv_connection_context *context, const struct dcesrv_interface *iface)
 
17
{
 
18
#ifdef DCESRV_INTERFACE_EVENTLOG6_UNBIND
 
19
        DCESRV_INTERFACE_EVENTLOG6_UNBIND(context, iface);
 
20
#else
 
21
        return;
 
22
#endif
 
23
}
 
24
 
 
25
static NTSTATUS eventlog6__op_ndr_pull(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_pull *pull, void **r)
 
26
{
 
27
        enum ndr_err_code ndr_err;
 
28
        uint16_t opnum = dce_call->pkt.u.request.opnum;
 
29
 
 
30
        dce_call->fault_code = 0;
 
31
 
 
32
        if (opnum >= ndr_table_eventlog6.num_calls) {
 
33
                dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
 
34
                return NT_STATUS_NET_WRITE_FAULT;
 
35
        }
 
36
 
 
37
        *r = talloc_named(mem_ctx,
 
38
                          ndr_table_eventlog6.calls[opnum].struct_size,
 
39
                          "struct %s",
 
40
                          ndr_table_eventlog6.calls[opnum].name);
 
41
        NT_STATUS_HAVE_NO_MEMORY(*r);
 
42
 
 
43
        /* unravel the NDR for the packet */
 
44
        ndr_err = ndr_table_eventlog6.calls[opnum].ndr_pull(pull, NDR_IN, *r);
 
45
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 
46
                dcerpc_log_packet(dce_call->conn->packet_log_dir, 
 
47
                                  &ndr_table_eventlog6, opnum, NDR_IN,
 
48
                                  &dce_call->pkt.u.request.stub_and_verifier);
 
49
                dce_call->fault_code = DCERPC_FAULT_NDR;
 
50
                return NT_STATUS_NET_WRITE_FAULT;
 
51
        }
 
52
 
 
53
        return NT_STATUS_OK;
 
54
}
 
55
 
 
56
static NTSTATUS eventlog6__op_dispatch(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
 
57
{
 
58
        uint16_t opnum = dce_call->pkt.u.request.opnum;
 
59
 
 
60
        switch (opnum) {
 
61
        case 0: {
 
62
                struct eventlog6_EvtRpcRegisterRemoteSubscription *r2 = (struct eventlog6_EvtRpcRegisterRemoteSubscription *)r;
 
63
                if (DEBUGLEVEL >= 10) {
 
64
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterRemoteSubscription, NDR_IN, r2);
 
65
                }
 
66
                r2->out.result = dcesrv_eventlog6_EvtRpcRegisterRemoteSubscription(dce_call, mem_ctx, r2);
 
67
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
68
                        DEBUG(5,("function eventlog6_EvtRpcRegisterRemoteSubscription will reply async\n"));
 
69
                }
 
70
                break;
 
71
        }
 
72
        case 1: {
 
73
                struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *)r;
 
74
                if (DEBUGLEVEL >= 10) {
 
75
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionNextAsync, NDR_IN, r2);
 
76
                }
 
77
                r2->out.result = dcesrv_eventlog6_EvtRpcRemoteSubscriptionNextAsync(dce_call, mem_ctx, r2);
 
78
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
79
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionNextAsync will reply async\n"));
 
80
                }
 
81
                break;
 
82
        }
 
83
        case 2: {
 
84
                struct eventlog6_EvtRpcRemoteSubscriptionNext *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionNext *)r;
 
85
                if (DEBUGLEVEL >= 10) {
 
86
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionNext, NDR_IN, r2);
 
87
                }
 
88
                r2->out.result = dcesrv_eventlog6_EvtRpcRemoteSubscriptionNext(dce_call, mem_ctx, r2);
 
89
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
90
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionNext will reply async\n"));
 
91
                }
 
92
                break;
 
93
        }
 
94
        case 3: {
 
95
                struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *)r;
 
96
                if (DEBUGLEVEL >= 10) {
 
97
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionWaitAsync, NDR_IN, r2);
 
98
                }
 
99
                r2->out.result = dcesrv_eventlog6_EvtRpcRemoteSubscriptionWaitAsync(dce_call, mem_ctx, r2);
 
100
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
101
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionWaitAsync will reply async\n"));
 
102
                }
 
103
                break;
 
104
        }
 
105
        case 4: {
 
106
                struct eventlog6_EvtRpcRegisterControllableOperation *r2 = (struct eventlog6_EvtRpcRegisterControllableOperation *)r;
 
107
                if (DEBUGLEVEL >= 10) {
 
108
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterControllableOperation, NDR_IN, r2);
 
109
                }
 
110
                r2->out.result = dcesrv_eventlog6_EvtRpcRegisterControllableOperation(dce_call, mem_ctx, r2);
 
111
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
112
                        DEBUG(5,("function eventlog6_EvtRpcRegisterControllableOperation will reply async\n"));
 
113
                }
 
114
                break;
 
115
        }
 
116
        case 5: {
 
117
                struct eventlog6_EvtRpcRegisterLogQuery *r2 = (struct eventlog6_EvtRpcRegisterLogQuery *)r;
 
118
                if (DEBUGLEVEL >= 10) {
 
119
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterLogQuery, NDR_IN, r2);
 
120
                }
 
121
                r2->out.result = dcesrv_eventlog6_EvtRpcRegisterLogQuery(dce_call, mem_ctx, r2);
 
122
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
123
                        DEBUG(5,("function eventlog6_EvtRpcRegisterLogQuery will reply async\n"));
 
124
                }
 
125
                break;
 
126
        }
 
127
        case 6: {
 
128
                struct eventlog6_EvtRpcClearLog *r2 = (struct eventlog6_EvtRpcClearLog *)r;
 
129
                if (DEBUGLEVEL >= 10) {
 
130
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcClearLog, NDR_IN, r2);
 
131
                }
 
132
                r2->out.result = dcesrv_eventlog6_EvtRpcClearLog(dce_call, mem_ctx, r2);
 
133
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
134
                        DEBUG(5,("function eventlog6_EvtRpcClearLog will reply async\n"));
 
135
                }
 
136
                break;
 
137
        }
 
138
        case 7: {
 
139
                struct eventlog6_EvtRpcExportLog *r2 = (struct eventlog6_EvtRpcExportLog *)r;
 
140
                if (DEBUGLEVEL >= 10) {
 
141
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcExportLog, NDR_IN, r2);
 
142
                }
 
143
                r2->out.result = dcesrv_eventlog6_EvtRpcExportLog(dce_call, mem_ctx, r2);
 
144
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
145
                        DEBUG(5,("function eventlog6_EvtRpcExportLog will reply async\n"));
 
146
                }
 
147
                break;
 
148
        }
 
149
        case 8: {
 
150
                struct eventlog6_EvtRpcLocalizeExportLog *r2 = (struct eventlog6_EvtRpcLocalizeExportLog *)r;
 
151
                if (DEBUGLEVEL >= 10) {
 
152
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcLocalizeExportLog, NDR_IN, r2);
 
153
                }
 
154
                r2->out.result = dcesrv_eventlog6_EvtRpcLocalizeExportLog(dce_call, mem_ctx, r2);
 
155
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
156
                        DEBUG(5,("function eventlog6_EvtRpcLocalizeExportLog will reply async\n"));
 
157
                }
 
158
                break;
 
159
        }
 
160
        case 9: {
 
161
                struct eventlog6_EvtRpcMessageRender *r2 = (struct eventlog6_EvtRpcMessageRender *)r;
 
162
                if (DEBUGLEVEL >= 10) {
 
163
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcMessageRender, NDR_IN, r2);
 
164
                }
 
165
                r2->out.result = dcesrv_eventlog6_EvtRpcMessageRender(dce_call, mem_ctx, r2);
 
166
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
167
                        DEBUG(5,("function eventlog6_EvtRpcMessageRender will reply async\n"));
 
168
                }
 
169
                break;
 
170
        }
 
171
        case 10: {
 
172
                struct eventlog6_EvtRpcMessageRenderDefault *r2 = (struct eventlog6_EvtRpcMessageRenderDefault *)r;
 
173
                if (DEBUGLEVEL >= 10) {
 
174
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcMessageRenderDefault, NDR_IN, r2);
 
175
                }
 
176
                r2->out.result = dcesrv_eventlog6_EvtRpcMessageRenderDefault(dce_call, mem_ctx, r2);
 
177
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
178
                        DEBUG(5,("function eventlog6_EvtRpcMessageRenderDefault will reply async\n"));
 
179
                }
 
180
                break;
 
181
        }
 
182
        case 11: {
 
183
                struct eventlog6_EvtRpcQueryNext *r2 = (struct eventlog6_EvtRpcQueryNext *)r;
 
184
                if (DEBUGLEVEL >= 10) {
 
185
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcQueryNext, NDR_IN, r2);
 
186
                }
 
187
                r2->out.result = dcesrv_eventlog6_EvtRpcQueryNext(dce_call, mem_ctx, r2);
 
188
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
189
                        DEBUG(5,("function eventlog6_EvtRpcQueryNext will reply async\n"));
 
190
                }
 
191
                break;
 
192
        }
 
193
        case 12: {
 
194
                struct eventlog6_EvtRpcQuerySeek *r2 = (struct eventlog6_EvtRpcQuerySeek *)r;
 
195
                if (DEBUGLEVEL >= 10) {
 
196
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcQuerySeek, NDR_IN, r2);
 
197
                }
 
198
                r2->out.result = dcesrv_eventlog6_EvtRpcQuerySeek(dce_call, mem_ctx, r2);
 
199
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
200
                        DEBUG(5,("function eventlog6_EvtRpcQuerySeek will reply async\n"));
 
201
                }
 
202
                break;
 
203
        }
 
204
        case 13: {
 
205
                struct eventlog6_EvtRpcClose *r2 = (struct eventlog6_EvtRpcClose *)r;
 
206
                if (DEBUGLEVEL >= 10) {
 
207
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcClose, NDR_IN, r2);
 
208
                }
 
209
                r2->out.result = dcesrv_eventlog6_EvtRpcClose(dce_call, mem_ctx, r2);
 
210
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
211
                        DEBUG(5,("function eventlog6_EvtRpcClose will reply async\n"));
 
212
                }
 
213
                break;
 
214
        }
 
215
        case 14: {
 
216
                struct eventlog6_EvtRpcCancel *r2 = (struct eventlog6_EvtRpcCancel *)r;
 
217
                if (DEBUGLEVEL >= 10) {
 
218
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcCancel, NDR_IN, r2);
 
219
                }
 
220
                r2->out.result = dcesrv_eventlog6_EvtRpcCancel(dce_call, mem_ctx, r2);
 
221
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
222
                        DEBUG(5,("function eventlog6_EvtRpcCancel will reply async\n"));
 
223
                }
 
224
                break;
 
225
        }
 
226
        case 15: {
 
227
                struct eventlog6_EvtRpcAssertConfig *r2 = (struct eventlog6_EvtRpcAssertConfig *)r;
 
228
                if (DEBUGLEVEL >= 10) {
 
229
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcAssertConfig, NDR_IN, r2);
 
230
                }
 
231
                r2->out.result = dcesrv_eventlog6_EvtRpcAssertConfig(dce_call, mem_ctx, r2);
 
232
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
233
                        DEBUG(5,("function eventlog6_EvtRpcAssertConfig will reply async\n"));
 
234
                }
 
235
                break;
 
236
        }
 
237
        case 16: {
 
238
                struct eventlog6_EvtRpcRetractConfig *r2 = (struct eventlog6_EvtRpcRetractConfig *)r;
 
239
                if (DEBUGLEVEL >= 10) {
 
240
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRetractConfig, NDR_IN, r2);
 
241
                }
 
242
                r2->out.result = dcesrv_eventlog6_EvtRpcRetractConfig(dce_call, mem_ctx, r2);
 
243
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
244
                        DEBUG(5,("function eventlog6_EvtRpcRetractConfig will reply async\n"));
 
245
                }
 
246
                break;
 
247
        }
 
248
        case 17: {
 
249
                struct eventlog6_EvtRpcOpenLogHandle *r2 = (struct eventlog6_EvtRpcOpenLogHandle *)r;
 
250
                if (DEBUGLEVEL >= 10) {
 
251
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcOpenLogHandle, NDR_IN, r2);
 
252
                }
 
253
                r2->out.result = dcesrv_eventlog6_EvtRpcOpenLogHandle(dce_call, mem_ctx, r2);
 
254
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
255
                        DEBUG(5,("function eventlog6_EvtRpcOpenLogHandle will reply async\n"));
 
256
                }
 
257
                break;
 
258
        }
 
259
        case 18: {
 
260
                struct eventlog6_EvtRpcGetLogFileInfo *r2 = (struct eventlog6_EvtRpcGetLogFileInfo *)r;
 
261
                if (DEBUGLEVEL >= 10) {
 
262
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetLogFileInfo, NDR_IN, r2);
 
263
                }
 
264
                r2->out.result = dcesrv_eventlog6_EvtRpcGetLogFileInfo(dce_call, mem_ctx, r2);
 
265
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
266
                        DEBUG(5,("function eventlog6_EvtRpcGetLogFileInfo will reply async\n"));
 
267
                }
 
268
                break;
 
269
        }
 
270
        case 19: {
 
271
                struct eventlog6_EvtRpcGetChannelList *r2 = (struct eventlog6_EvtRpcGetChannelList *)r;
 
272
                if (DEBUGLEVEL >= 10) {
 
273
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetChannelList, NDR_IN, r2);
 
274
                }
 
275
                r2->out.result = dcesrv_eventlog6_EvtRpcGetChannelList(dce_call, mem_ctx, r2);
 
276
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
277
                        DEBUG(5,("function eventlog6_EvtRpcGetChannelList will reply async\n"));
 
278
                }
 
279
                break;
 
280
        }
 
281
        case 20: {
 
282
                struct eventlog6_EvtRpcGetChannelConfig *r2 = (struct eventlog6_EvtRpcGetChannelConfig *)r;
 
283
                if (DEBUGLEVEL >= 10) {
 
284
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetChannelConfig, NDR_IN, r2);
 
285
                }
 
286
                r2->out.result = dcesrv_eventlog6_EvtRpcGetChannelConfig(dce_call, mem_ctx, r2);
 
287
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
288
                        DEBUG(5,("function eventlog6_EvtRpcGetChannelConfig will reply async\n"));
 
289
                }
 
290
                break;
 
291
        }
 
292
        case 21: {
 
293
                struct eventlog6_EvtRpcPutChannelConfig *r2 = (struct eventlog6_EvtRpcPutChannelConfig *)r;
 
294
                if (DEBUGLEVEL >= 10) {
 
295
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcPutChannelConfig, NDR_IN, r2);
 
296
                }
 
297
                r2->out.result = dcesrv_eventlog6_EvtRpcPutChannelConfig(dce_call, mem_ctx, r2);
 
298
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
299
                        DEBUG(5,("function eventlog6_EvtRpcPutChannelConfig will reply async\n"));
 
300
                }
 
301
                break;
 
302
        }
 
303
        case 22: {
 
304
                struct eventlog6_EvtRpcGetPublisherList *r2 = (struct eventlog6_EvtRpcGetPublisherList *)r;
 
305
                if (DEBUGLEVEL >= 10) {
 
306
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherList, NDR_IN, r2);
 
307
                }
 
308
                r2->out.result = dcesrv_eventlog6_EvtRpcGetPublisherList(dce_call, mem_ctx, r2);
 
309
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
310
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherList will reply async\n"));
 
311
                }
 
312
                break;
 
313
        }
 
314
        case 23: {
 
315
                struct eventlog6_EvtRpcGetPublisherListForChannel *r2 = (struct eventlog6_EvtRpcGetPublisherListForChannel *)r;
 
316
                if (DEBUGLEVEL >= 10) {
 
317
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherListForChannel, NDR_IN, r2);
 
318
                }
 
319
                r2->out.result = dcesrv_eventlog6_EvtRpcGetPublisherListForChannel(dce_call, mem_ctx, r2);
 
320
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
321
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherListForChannel will reply async\n"));
 
322
                }
 
323
                break;
 
324
        }
 
325
        case 24: {
 
326
                struct eventlog6_EvtRpcGetPublisherMetadata *r2 = (struct eventlog6_EvtRpcGetPublisherMetadata *)r;
 
327
                if (DEBUGLEVEL >= 10) {
 
328
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherMetadata, NDR_IN, r2);
 
329
                }
 
330
                r2->out.result = dcesrv_eventlog6_EvtRpcGetPublisherMetadata(dce_call, mem_ctx, r2);
 
331
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
332
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherMetadata will reply async\n"));
 
333
                }
 
334
                break;
 
335
        }
 
336
        case 25: {
 
337
                struct eventlog6_EvtRpcGetPublisherResourceMetadata *r2 = (struct eventlog6_EvtRpcGetPublisherResourceMetadata *)r;
 
338
                if (DEBUGLEVEL >= 10) {
 
339
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherResourceMetadata, NDR_IN, r2);
 
340
                }
 
341
                r2->out.result = dcesrv_eventlog6_EvtRpcGetPublisherResourceMetadata(dce_call, mem_ctx, r2);
 
342
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
343
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherResourceMetadata will reply async\n"));
 
344
                }
 
345
                break;
 
346
        }
 
347
        case 26: {
 
348
                struct eventlog6_EvtRpcGetEventMetadataEnum *r2 = (struct eventlog6_EvtRpcGetEventMetadataEnum *)r;
 
349
                if (DEBUGLEVEL >= 10) {
 
350
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetEventMetadataEnum, NDR_IN, r2);
 
351
                }
 
352
                r2->out.result = dcesrv_eventlog6_EvtRpcGetEventMetadataEnum(dce_call, mem_ctx, r2);
 
353
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
354
                        DEBUG(5,("function eventlog6_EvtRpcGetEventMetadataEnum will reply async\n"));
 
355
                }
 
356
                break;
 
357
        }
 
358
        case 27: {
 
359
                struct eventlog6_EvtRpcGetNextEventMetadata *r2 = (struct eventlog6_EvtRpcGetNextEventMetadata *)r;
 
360
                if (DEBUGLEVEL >= 10) {
 
361
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetNextEventMetadata, NDR_IN, r2);
 
362
                }
 
363
                r2->out.result = dcesrv_eventlog6_EvtRpcGetNextEventMetadata(dce_call, mem_ctx, r2);
 
364
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
365
                        DEBUG(5,("function eventlog6_EvtRpcGetNextEventMetadata will reply async\n"));
 
366
                }
 
367
                break;
 
368
        }
 
369
        case 28: {
 
370
                struct eventlog6_EvtRpcGetClassicLogDisplayName *r2 = (struct eventlog6_EvtRpcGetClassicLogDisplayName *)r;
 
371
                if (DEBUGLEVEL >= 10) {
 
372
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetClassicLogDisplayName, NDR_IN, r2);
 
373
                }
 
374
                r2->out.result = dcesrv_eventlog6_EvtRpcGetClassicLogDisplayName(dce_call, mem_ctx, r2);
 
375
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
376
                        DEBUG(5,("function eventlog6_EvtRpcGetClassicLogDisplayName will reply async\n"));
 
377
                }
 
378
                break;
 
379
        }
 
380
 
 
381
        default:
 
382
                dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
 
383
                break;
 
384
        }
 
385
 
 
386
        if (dce_call->fault_code != 0) {
 
387
                dcerpc_log_packet(dce_call->conn->packet_log_dir, 
 
388
                          &ndr_table_eventlog6, opnum, NDR_IN,
 
389
                                  &dce_call->pkt.u.request.stub_and_verifier);
 
390
                return NT_STATUS_NET_WRITE_FAULT;
 
391
        }
 
392
 
 
393
        return NT_STATUS_OK;
 
394
}
 
395
 
 
396
static NTSTATUS eventlog6__op_reply(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, void *r)
 
397
{
 
398
        uint16_t opnum = dce_call->pkt.u.request.opnum;
 
399
 
 
400
        switch (opnum) {
 
401
        case 0: {
 
402
                struct eventlog6_EvtRpcRegisterRemoteSubscription *r2 = (struct eventlog6_EvtRpcRegisterRemoteSubscription *)r;
 
403
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
404
                        DEBUG(5,("function eventlog6_EvtRpcRegisterRemoteSubscription replied async\n"));
 
405
                }
 
406
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
407
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterRemoteSubscription, NDR_OUT | NDR_SET_VALUES, r2);
 
408
                }
 
409
                if (dce_call->fault_code != 0) {
 
410
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRegisterRemoteSubscription\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
411
                }
 
412
                break;
 
413
        }
 
414
        case 1: {
 
415
                struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionNextAsync *)r;
 
416
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
417
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionNextAsync replied async\n"));
 
418
                }
 
419
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
420
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionNextAsync, NDR_OUT | NDR_SET_VALUES, r2);
 
421
                }
 
422
                if (dce_call->fault_code != 0) {
 
423
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRemoteSubscriptionNextAsync\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
424
                }
 
425
                break;
 
426
        }
 
427
        case 2: {
 
428
                struct eventlog6_EvtRpcRemoteSubscriptionNext *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionNext *)r;
 
429
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
430
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionNext replied async\n"));
 
431
                }
 
432
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
433
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionNext, NDR_OUT | NDR_SET_VALUES, r2);
 
434
                }
 
435
                if (dce_call->fault_code != 0) {
 
436
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRemoteSubscriptionNext\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
437
                }
 
438
                break;
 
439
        }
 
440
        case 3: {
 
441
                struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *r2 = (struct eventlog6_EvtRpcRemoteSubscriptionWaitAsync *)r;
 
442
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
443
                        DEBUG(5,("function eventlog6_EvtRpcRemoteSubscriptionWaitAsync replied async\n"));
 
444
                }
 
445
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
446
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRemoteSubscriptionWaitAsync, NDR_OUT | NDR_SET_VALUES, r2);
 
447
                }
 
448
                if (dce_call->fault_code != 0) {
 
449
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRemoteSubscriptionWaitAsync\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
450
                }
 
451
                break;
 
452
        }
 
453
        case 4: {
 
454
                struct eventlog6_EvtRpcRegisterControllableOperation *r2 = (struct eventlog6_EvtRpcRegisterControllableOperation *)r;
 
455
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
456
                        DEBUG(5,("function eventlog6_EvtRpcRegisterControllableOperation replied async\n"));
 
457
                }
 
458
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
459
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterControllableOperation, NDR_OUT | NDR_SET_VALUES, r2);
 
460
                }
 
461
                if (dce_call->fault_code != 0) {
 
462
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRegisterControllableOperation\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
463
                }
 
464
                break;
 
465
        }
 
466
        case 5: {
 
467
                struct eventlog6_EvtRpcRegisterLogQuery *r2 = (struct eventlog6_EvtRpcRegisterLogQuery *)r;
 
468
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
469
                        DEBUG(5,("function eventlog6_EvtRpcRegisterLogQuery replied async\n"));
 
470
                }
 
471
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
472
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRegisterLogQuery, NDR_OUT | NDR_SET_VALUES, r2);
 
473
                }
 
474
                if (dce_call->fault_code != 0) {
 
475
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRegisterLogQuery\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
476
                }
 
477
                break;
 
478
        }
 
479
        case 6: {
 
480
                struct eventlog6_EvtRpcClearLog *r2 = (struct eventlog6_EvtRpcClearLog *)r;
 
481
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
482
                        DEBUG(5,("function eventlog6_EvtRpcClearLog replied async\n"));
 
483
                }
 
484
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
485
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcClearLog, NDR_OUT | NDR_SET_VALUES, r2);
 
486
                }
 
487
                if (dce_call->fault_code != 0) {
 
488
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcClearLog\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
489
                }
 
490
                break;
 
491
        }
 
492
        case 7: {
 
493
                struct eventlog6_EvtRpcExportLog *r2 = (struct eventlog6_EvtRpcExportLog *)r;
 
494
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
495
                        DEBUG(5,("function eventlog6_EvtRpcExportLog replied async\n"));
 
496
                }
 
497
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
498
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcExportLog, NDR_OUT | NDR_SET_VALUES, r2);
 
499
                }
 
500
                if (dce_call->fault_code != 0) {
 
501
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcExportLog\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
502
                }
 
503
                break;
 
504
        }
 
505
        case 8: {
 
506
                struct eventlog6_EvtRpcLocalizeExportLog *r2 = (struct eventlog6_EvtRpcLocalizeExportLog *)r;
 
507
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
508
                        DEBUG(5,("function eventlog6_EvtRpcLocalizeExportLog replied async\n"));
 
509
                }
 
510
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
511
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcLocalizeExportLog, NDR_OUT | NDR_SET_VALUES, r2);
 
512
                }
 
513
                if (dce_call->fault_code != 0) {
 
514
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcLocalizeExportLog\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
515
                }
 
516
                break;
 
517
        }
 
518
        case 9: {
 
519
                struct eventlog6_EvtRpcMessageRender *r2 = (struct eventlog6_EvtRpcMessageRender *)r;
 
520
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
521
                        DEBUG(5,("function eventlog6_EvtRpcMessageRender replied async\n"));
 
522
                }
 
523
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
524
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcMessageRender, NDR_OUT | NDR_SET_VALUES, r2);
 
525
                }
 
526
                if (dce_call->fault_code != 0) {
 
527
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcMessageRender\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
528
                }
 
529
                break;
 
530
        }
 
531
        case 10: {
 
532
                struct eventlog6_EvtRpcMessageRenderDefault *r2 = (struct eventlog6_EvtRpcMessageRenderDefault *)r;
 
533
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
534
                        DEBUG(5,("function eventlog6_EvtRpcMessageRenderDefault replied async\n"));
 
535
                }
 
536
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
537
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcMessageRenderDefault, NDR_OUT | NDR_SET_VALUES, r2);
 
538
                }
 
539
                if (dce_call->fault_code != 0) {
 
540
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcMessageRenderDefault\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
541
                }
 
542
                break;
 
543
        }
 
544
        case 11: {
 
545
                struct eventlog6_EvtRpcQueryNext *r2 = (struct eventlog6_EvtRpcQueryNext *)r;
 
546
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
547
                        DEBUG(5,("function eventlog6_EvtRpcQueryNext replied async\n"));
 
548
                }
 
549
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
550
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcQueryNext, NDR_OUT | NDR_SET_VALUES, r2);
 
551
                }
 
552
                if (dce_call->fault_code != 0) {
 
553
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcQueryNext\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
554
                }
 
555
                break;
 
556
        }
 
557
        case 12: {
 
558
                struct eventlog6_EvtRpcQuerySeek *r2 = (struct eventlog6_EvtRpcQuerySeek *)r;
 
559
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
560
                        DEBUG(5,("function eventlog6_EvtRpcQuerySeek replied async\n"));
 
561
                }
 
562
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
563
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcQuerySeek, NDR_OUT | NDR_SET_VALUES, r2);
 
564
                }
 
565
                if (dce_call->fault_code != 0) {
 
566
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcQuerySeek\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
567
                }
 
568
                break;
 
569
        }
 
570
        case 13: {
 
571
                struct eventlog6_EvtRpcClose *r2 = (struct eventlog6_EvtRpcClose *)r;
 
572
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
573
                        DEBUG(5,("function eventlog6_EvtRpcClose replied async\n"));
 
574
                }
 
575
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
576
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcClose, NDR_OUT | NDR_SET_VALUES, r2);
 
577
                }
 
578
                if (dce_call->fault_code != 0) {
 
579
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcClose\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
580
                }
 
581
                break;
 
582
        }
 
583
        case 14: {
 
584
                struct eventlog6_EvtRpcCancel *r2 = (struct eventlog6_EvtRpcCancel *)r;
 
585
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
586
                        DEBUG(5,("function eventlog6_EvtRpcCancel replied async\n"));
 
587
                }
 
588
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
589
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcCancel, NDR_OUT | NDR_SET_VALUES, r2);
 
590
                }
 
591
                if (dce_call->fault_code != 0) {
 
592
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcCancel\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
593
                }
 
594
                break;
 
595
        }
 
596
        case 15: {
 
597
                struct eventlog6_EvtRpcAssertConfig *r2 = (struct eventlog6_EvtRpcAssertConfig *)r;
 
598
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
599
                        DEBUG(5,("function eventlog6_EvtRpcAssertConfig replied async\n"));
 
600
                }
 
601
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
602
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcAssertConfig, NDR_OUT | NDR_SET_VALUES, r2);
 
603
                }
 
604
                if (dce_call->fault_code != 0) {
 
605
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcAssertConfig\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
606
                }
 
607
                break;
 
608
        }
 
609
        case 16: {
 
610
                struct eventlog6_EvtRpcRetractConfig *r2 = (struct eventlog6_EvtRpcRetractConfig *)r;
 
611
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
612
                        DEBUG(5,("function eventlog6_EvtRpcRetractConfig replied async\n"));
 
613
                }
 
614
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
615
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcRetractConfig, NDR_OUT | NDR_SET_VALUES, r2);
 
616
                }
 
617
                if (dce_call->fault_code != 0) {
 
618
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcRetractConfig\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
619
                }
 
620
                break;
 
621
        }
 
622
        case 17: {
 
623
                struct eventlog6_EvtRpcOpenLogHandle *r2 = (struct eventlog6_EvtRpcOpenLogHandle *)r;
 
624
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
625
                        DEBUG(5,("function eventlog6_EvtRpcOpenLogHandle replied async\n"));
 
626
                }
 
627
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
628
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcOpenLogHandle, NDR_OUT | NDR_SET_VALUES, r2);
 
629
                }
 
630
                if (dce_call->fault_code != 0) {
 
631
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcOpenLogHandle\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
632
                }
 
633
                break;
 
634
        }
 
635
        case 18: {
 
636
                struct eventlog6_EvtRpcGetLogFileInfo *r2 = (struct eventlog6_EvtRpcGetLogFileInfo *)r;
 
637
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
638
                        DEBUG(5,("function eventlog6_EvtRpcGetLogFileInfo replied async\n"));
 
639
                }
 
640
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
641
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetLogFileInfo, NDR_OUT | NDR_SET_VALUES, r2);
 
642
                }
 
643
                if (dce_call->fault_code != 0) {
 
644
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetLogFileInfo\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
645
                }
 
646
                break;
 
647
        }
 
648
        case 19: {
 
649
                struct eventlog6_EvtRpcGetChannelList *r2 = (struct eventlog6_EvtRpcGetChannelList *)r;
 
650
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
651
                        DEBUG(5,("function eventlog6_EvtRpcGetChannelList replied async\n"));
 
652
                }
 
653
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
654
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetChannelList, NDR_OUT | NDR_SET_VALUES, r2);
 
655
                }
 
656
                if (dce_call->fault_code != 0) {
 
657
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetChannelList\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
658
                }
 
659
                break;
 
660
        }
 
661
        case 20: {
 
662
                struct eventlog6_EvtRpcGetChannelConfig *r2 = (struct eventlog6_EvtRpcGetChannelConfig *)r;
 
663
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
664
                        DEBUG(5,("function eventlog6_EvtRpcGetChannelConfig replied async\n"));
 
665
                }
 
666
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
667
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetChannelConfig, NDR_OUT | NDR_SET_VALUES, r2);
 
668
                }
 
669
                if (dce_call->fault_code != 0) {
 
670
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetChannelConfig\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
671
                }
 
672
                break;
 
673
        }
 
674
        case 21: {
 
675
                struct eventlog6_EvtRpcPutChannelConfig *r2 = (struct eventlog6_EvtRpcPutChannelConfig *)r;
 
676
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
677
                        DEBUG(5,("function eventlog6_EvtRpcPutChannelConfig replied async\n"));
 
678
                }
 
679
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
680
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcPutChannelConfig, NDR_OUT | NDR_SET_VALUES, r2);
 
681
                }
 
682
                if (dce_call->fault_code != 0) {
 
683
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcPutChannelConfig\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
684
                }
 
685
                break;
 
686
        }
 
687
        case 22: {
 
688
                struct eventlog6_EvtRpcGetPublisherList *r2 = (struct eventlog6_EvtRpcGetPublisherList *)r;
 
689
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
690
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherList replied async\n"));
 
691
                }
 
692
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
693
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherList, NDR_OUT | NDR_SET_VALUES, r2);
 
694
                }
 
695
                if (dce_call->fault_code != 0) {
 
696
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetPublisherList\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
697
                }
 
698
                break;
 
699
        }
 
700
        case 23: {
 
701
                struct eventlog6_EvtRpcGetPublisherListForChannel *r2 = (struct eventlog6_EvtRpcGetPublisherListForChannel *)r;
 
702
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
703
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherListForChannel replied async\n"));
 
704
                }
 
705
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
706
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherListForChannel, NDR_OUT | NDR_SET_VALUES, r2);
 
707
                }
 
708
                if (dce_call->fault_code != 0) {
 
709
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetPublisherListForChannel\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
710
                }
 
711
                break;
 
712
        }
 
713
        case 24: {
 
714
                struct eventlog6_EvtRpcGetPublisherMetadata *r2 = (struct eventlog6_EvtRpcGetPublisherMetadata *)r;
 
715
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
716
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherMetadata replied async\n"));
 
717
                }
 
718
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
719
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherMetadata, NDR_OUT | NDR_SET_VALUES, r2);
 
720
                }
 
721
                if (dce_call->fault_code != 0) {
 
722
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetPublisherMetadata\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
723
                }
 
724
                break;
 
725
        }
 
726
        case 25: {
 
727
                struct eventlog6_EvtRpcGetPublisherResourceMetadata *r2 = (struct eventlog6_EvtRpcGetPublisherResourceMetadata *)r;
 
728
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
729
                        DEBUG(5,("function eventlog6_EvtRpcGetPublisherResourceMetadata replied async\n"));
 
730
                }
 
731
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
732
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetPublisherResourceMetadata, NDR_OUT | NDR_SET_VALUES, r2);
 
733
                }
 
734
                if (dce_call->fault_code != 0) {
 
735
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetPublisherResourceMetadata\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
736
                }
 
737
                break;
 
738
        }
 
739
        case 26: {
 
740
                struct eventlog6_EvtRpcGetEventMetadataEnum *r2 = (struct eventlog6_EvtRpcGetEventMetadataEnum *)r;
 
741
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
742
                        DEBUG(5,("function eventlog6_EvtRpcGetEventMetadataEnum replied async\n"));
 
743
                }
 
744
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
745
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetEventMetadataEnum, NDR_OUT | NDR_SET_VALUES, r2);
 
746
                }
 
747
                if (dce_call->fault_code != 0) {
 
748
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetEventMetadataEnum\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
749
                }
 
750
                break;
 
751
        }
 
752
        case 27: {
 
753
                struct eventlog6_EvtRpcGetNextEventMetadata *r2 = (struct eventlog6_EvtRpcGetNextEventMetadata *)r;
 
754
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
755
                        DEBUG(5,("function eventlog6_EvtRpcGetNextEventMetadata replied async\n"));
 
756
                }
 
757
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
758
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetNextEventMetadata, NDR_OUT | NDR_SET_VALUES, r2);
 
759
                }
 
760
                if (dce_call->fault_code != 0) {
 
761
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetNextEventMetadata\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
762
                }
 
763
                break;
 
764
        }
 
765
        case 28: {
 
766
                struct eventlog6_EvtRpcGetClassicLogDisplayName *r2 = (struct eventlog6_EvtRpcGetClassicLogDisplayName *)r;
 
767
                if (dce_call->state_flags & DCESRV_CALL_STATE_FLAG_ASYNC) {
 
768
                        DEBUG(5,("function eventlog6_EvtRpcGetClassicLogDisplayName replied async\n"));
 
769
                }
 
770
                if (DEBUGLEVEL >= 10 && dce_call->fault_code == 0) {
 
771
                        NDR_PRINT_FUNCTION_DEBUG(eventlog6_EvtRpcGetClassicLogDisplayName, NDR_OUT | NDR_SET_VALUES, r2);
 
772
                }
 
773
                if (dce_call->fault_code != 0) {
 
774
                        DEBUG(2,("dcerpc_fault %s in eventlog6_EvtRpcGetClassicLogDisplayName\n", dcerpc_errstr(mem_ctx, dce_call->fault_code)));
 
775
                }
 
776
                break;
 
777
        }
 
778
 
 
779
        default:
 
780
                dce_call->fault_code = DCERPC_FAULT_OP_RNG_ERROR;
 
781
                break;
 
782
        }
 
783
 
 
784
        if (dce_call->fault_code != 0) {
 
785
                dcerpc_log_packet(dce_call->conn->packet_log_dir,
 
786
                          &ndr_table_eventlog6, opnum, NDR_IN,
 
787
                                  &dce_call->pkt.u.request.stub_and_verifier);
 
788
                return NT_STATUS_NET_WRITE_FAULT;
 
789
        }
 
790
 
 
791
        return NT_STATUS_OK;
 
792
}
 
793
 
 
794
static NTSTATUS eventlog6__op_ndr_push(struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct ndr_push *push, const void *r)
 
795
{
 
796
        enum ndr_err_code ndr_err;
 
797
        uint16_t opnum = dce_call->pkt.u.request.opnum;
 
798
 
 
799
        ndr_err = ndr_table_eventlog6.calls[opnum].ndr_push(push, NDR_OUT, r);
 
800
        if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
 
801
                dce_call->fault_code = DCERPC_FAULT_NDR;
 
802
                return NT_STATUS_NET_WRITE_FAULT;
 
803
        }
 
804
 
 
805
        return NT_STATUS_OK;
 
806
}
 
807
 
 
808
const struct dcesrv_interface dcesrv_eventlog6_interface = {
 
809
        .name           = "eventlog6",
 
810
        .syntax_id  = {{0xf6beaff7,0x1e19,0x4fbb,{0x9f,0x8f},{0xb8,0x9e,0x20,0x18,0x33,0x7c}},1.0},
 
811
        .bind           = eventlog6__op_bind,
 
812
        .unbind         = eventlog6__op_unbind,
 
813
        .ndr_pull       = eventlog6__op_ndr_pull,
 
814
        .dispatch       = eventlog6__op_dispatch,
 
815
        .reply          = eventlog6__op_reply,
 
816
        .ndr_push       = eventlog6__op_ndr_push
 
817
};
 
818
 
 
819
 
 
820
static NTSTATUS eventlog6__op_init_server(struct dcesrv_context *dce_ctx, const struct dcesrv_endpoint_server *ep_server)
 
821
{
 
822
        int i;
 
823
 
 
824
        for (i=0;i<ndr_table_eventlog6.endpoints->count;i++) {
 
825
                NTSTATUS ret;
 
826
                const char *name = ndr_table_eventlog6.endpoints->names[i];
 
827
 
 
828
                ret = dcesrv_interface_register(dce_ctx, name, &dcesrv_eventlog6_interface, NULL);
 
829
                if (!NT_STATUS_IS_OK(ret)) {
 
830
                        DEBUG(1,("eventlog6_op_init_server: failed to register endpoint '%s'\n",name));
 
831
                        return ret;
 
832
                }
 
833
        }
 
834
 
 
835
        return NT_STATUS_OK;
 
836
}
 
837
 
 
838
static bool eventlog6__op_interface_by_uuid(struct dcesrv_interface *iface, const struct GUID *uuid, uint32_t if_version)
 
839
{
 
840
        if (dcesrv_eventlog6_interface.syntax_id.if_version == if_version &&
 
841
                GUID_equal(&dcesrv_eventlog6_interface.syntax_id.uuid, uuid)) {
 
842
                memcpy(iface,&dcesrv_eventlog6_interface, sizeof(*iface));
 
843
                return true;
 
844
        }
 
845
 
 
846
        return false;
 
847
}
 
848
 
 
849
static bool eventlog6__op_interface_by_name(struct dcesrv_interface *iface, const char *name)
 
850
{
 
851
        if (strcmp(dcesrv_eventlog6_interface.name, name)==0) {
 
852
                memcpy(iface, &dcesrv_eventlog6_interface, sizeof(*iface));
 
853
                return true;
 
854
        }
 
855
 
 
856
        return false;   
 
857
}
 
858
        
 
859
NTSTATUS dcerpc_server_eventlog6_init(void)
 
860
{
 
861
        NTSTATUS ret;
 
862
        struct dcesrv_endpoint_server ep_server;
 
863
 
 
864
        /* fill in our name */
 
865
        ep_server.name = "eventlog6";
 
866
 
 
867
        /* fill in all the operations */
 
868
        ep_server.init_server = eventlog6__op_init_server;
 
869
 
 
870
        ep_server.interface_by_uuid = eventlog6__op_interface_by_uuid;
 
871
        ep_server.interface_by_name = eventlog6__op_interface_by_name;
 
872
 
 
873
        /* register ourselves with the DCERPC subsystem. */
 
874
        ret = dcerpc_register_ep_server(&ep_server);
 
875
 
 
876
        if (!NT_STATUS_IS_OK(ret)) {
 
877
                DEBUG(0,("Failed to register 'eventlog6' endpoint server!\n"));
 
878
                return ret;
 
879
        }
 
880
 
 
881
        return ret;
 
882
}
 
883