pyldb: avoid segfault when adding an element with no name
[kai/samba-autobuild/.git] / source4 / rpc_server / winreg / rpc_winreg.c
1 /*
2    Unix SMB/CIFS implementation.
3
4    endpoint server for the winreg pipe
5
6    Copyright (C) 2004 Jelmer Vernooij, jelmer@samba.org
7    Copyright (C) 2008 Matthias Dieter Wallnöfer, mwallnoefer@yahoo.de
8
9    This program is free software; you can redistribute it and/or modify
10    it under the terms of the GNU General Public License as published by
11    the Free Software Foundation; either version 3 of the License, or
12    (at your option) any later version.
13
14    This program is distributed in the hope that it will be useful,
15    but WITHOUT ANY WARRANTY; without even the implied warranty of
16    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17    GNU General Public License for more details.
18
19    You should have received a copy of the GNU General Public License
20    along with this program.  If not, see <http://www.gnu.org/licenses/>.
21 */
22
23 #include "includes.h"
24 #include "rpc_server/dcerpc_server.h"
25 #include "lib/registry/registry.h"
26 #include "librpc/gen_ndr/ndr_winreg.h"
27 #include "librpc/gen_ndr/ndr_security.h"
28 #include "libcli/security/session.h"
29
30 enum handle_types { HTYPE_REGVAL, HTYPE_REGKEY };
31
32 static WERROR dcesrv_winreg_openhive(struct dcesrv_call_state *dce_call,
33                                      TALLOC_CTX *mem_ctx, uint32_t hkey,
34                                      struct policy_handle **outh)
35 {
36         struct auth_session_info *session_info =
37                 dcesrv_call_session_info(dce_call);
38         struct registry_context *ctx = NULL;
39         struct dcesrv_handle *h;
40         WERROR result;
41
42         h = dcesrv_handle_create(dce_call, HTYPE_REGKEY);
43         W_ERROR_HAVE_NO_MEMORY(h);
44
45         result = reg_open_samba(h, &ctx,
46                                 dce_call->event_ctx,
47                                 dce_call->conn->dce_ctx->lp_ctx,
48                                 session_info,
49                                 NULL);
50         if (!W_ERROR_IS_OK(result)) {
51                 DEBUG(0, ("Error opening registry: %s\n", win_errstr(result)));
52                 return result;
53         }
54
55         result = reg_get_predefined_key(ctx, hkey,
56                                        (struct registry_key **)&h->data);
57         if (!W_ERROR_IS_OK(result)) {
58                 return result;
59         }
60         *outh = &h->wire_handle;
61
62         return result;
63 }
64
65 #define func_winreg_OpenHive(k,n) static WERROR dcesrv_winreg_Open ## k (struct dcesrv_call_state *dce_call, TALLOC_CTX *mem_ctx, struct winreg_Open ## k *r) \
66 { \
67         return dcesrv_winreg_openhive (dce_call, mem_ctx, n, &r->out.handle);\
68 }
69
70 func_winreg_OpenHive(HKCR,HKEY_CLASSES_ROOT)
71 func_winreg_OpenHive(HKCU,HKEY_CURRENT_USER)
72 func_winreg_OpenHive(HKLM,HKEY_LOCAL_MACHINE)
73 func_winreg_OpenHive(HKPD,HKEY_PERFORMANCE_DATA)
74 func_winreg_OpenHive(HKU,HKEY_USERS)
75 func_winreg_OpenHive(HKCC,HKEY_CURRENT_CONFIG)
76 func_winreg_OpenHive(HKDD,HKEY_DYN_DATA)
77 func_winreg_OpenHive(HKPT,HKEY_PERFORMANCE_TEXT)
78 func_winreg_OpenHive(HKPN,HKEY_PERFORMANCE_NLSTEXT)
79
80 /*
81   winreg_CloseKey
82 */
83 static WERROR dcesrv_winreg_CloseKey(struct dcesrv_call_state *dce_call,
84                                      TALLOC_CTX *mem_ctx,
85                                      struct winreg_CloseKey *r)
86 {
87         struct dcesrv_handle *h;
88
89         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
90
91         talloc_unlink(dce_call->context, h);
92
93         ZERO_STRUCTP(r->out.handle);
94
95         return WERR_OK;
96 }
97
98 /*
99   winreg_CreateKey
100 */
101 static WERROR dcesrv_winreg_CreateKey(struct dcesrv_call_state *dce_call,
102                                       TALLOC_CTX *mem_ctx,
103                                       struct winreg_CreateKey *r)
104 {
105         struct auth_session_info *session_info =
106                 dcesrv_call_session_info(dce_call);
107         struct dcesrv_handle *h, *newh;
108         struct security_descriptor sd;
109         struct registry_key *key;
110         WERROR result;
111
112         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
113         key = h->data;
114
115         newh = dcesrv_handle_create(dce_call, HTYPE_REGKEY);
116
117         switch (security_session_user_level(session_info, NULL))
118         {
119         case SECURITY_SYSTEM:
120         case SECURITY_ADMINISTRATOR:
121                 /* we support only non volatile keys */
122                 if (r->in.options != REG_OPTION_NON_VOLATILE) {
123                         return WERR_NOT_SUPPORTED;
124                 }
125
126                 /* the security descriptor is optional */
127                 if (r->in.secdesc != NULL) {
128                         DATA_BLOB sdblob;
129                         enum ndr_err_code ndr_err;
130                         sdblob.data = r->in.secdesc->sd.data;
131                         sdblob.length = r->in.secdesc->sd.len;
132                         if (sdblob.data == NULL) {
133                                 return WERR_INVALID_PARAMETER;
134                         }
135                         ndr_err = ndr_pull_struct_blob_all(&sdblob, mem_ctx, &sd,
136                                                            (ndr_pull_flags_fn_t)ndr_pull_security_descriptor);
137                         if (!NDR_ERR_CODE_IS_SUCCESS(ndr_err)) {
138                                 return WERR_INVALID_PARAMETER;
139                         }
140                 }
141                 
142                 result = reg_key_add_name(newh, key, r->in.name.name, NULL,
143                         r->in.secdesc?&sd:NULL, (struct registry_key **)&newh->data);
144
145                 r->out.action_taken = talloc(mem_ctx, enum winreg_CreateAction);
146                 if (r->out.action_taken == NULL) {
147                         talloc_free(newh);
148                         return WERR_NOT_ENOUGH_MEMORY;
149                 }
150                 *r->out.action_taken = REG_ACTION_NONE;
151
152                 if (W_ERROR_IS_OK(result)) {
153                         r->out.new_handle = &newh->wire_handle;
154                         *r->out.action_taken = REG_CREATED_NEW_KEY;
155                 } else {
156                         talloc_free(newh);
157                 }
158
159                 return result;
160         default:
161                 return WERR_ACCESS_DENIED;
162         }
163 }
164
165
166 /*
167   winreg_DeleteKey
168 */
169 static WERROR dcesrv_winreg_DeleteKey(struct dcesrv_call_state *dce_call,
170                                       TALLOC_CTX *mem_ctx,
171                                       struct winreg_DeleteKey *r)
172 {
173         struct auth_session_info *session_info =
174                 dcesrv_call_session_info(dce_call);
175         struct dcesrv_handle *h;
176         struct registry_key *key;
177         WERROR result;
178
179         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
180         key = h->data;
181
182         switch (security_session_user_level(session_info, NULL))
183         {
184         case SECURITY_SYSTEM:
185         case SECURITY_ADMINISTRATOR:
186                 result = reg_key_del(mem_ctx, key, r->in.key.name);
187                 talloc_unlink(dce_call->context, h);
188
189                 return result;
190         default:
191                 return WERR_ACCESS_DENIED;
192         }
193 }
194
195
196 /*
197   winreg_DeleteValue
198 */
199 static WERROR dcesrv_winreg_DeleteValue(struct dcesrv_call_state *dce_call,
200                                         TALLOC_CTX *mem_ctx,
201                                         struct winreg_DeleteValue *r)
202 {
203         struct auth_session_info *session_info =
204                 dcesrv_call_session_info(dce_call);
205         struct dcesrv_handle *h;
206         struct registry_key *key;
207
208         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
209         key = h->data;
210
211         switch (security_session_user_level(session_info, NULL))
212         {
213         case SECURITY_SYSTEM:
214         case SECURITY_ADMINISTRATOR:
215                 return reg_del_value(mem_ctx, key, r->in.value.name);
216         default:
217                 return WERR_ACCESS_DENIED;
218         }
219 }
220
221
222 /*
223   winreg_EnumKey
224 */
225 static WERROR dcesrv_winreg_EnumKey(struct dcesrv_call_state *dce_call,
226                                     TALLOC_CTX *mem_ctx,
227                                     struct winreg_EnumKey *r)
228 {
229         struct dcesrv_handle *h;
230         struct registry_key *key;
231         const char *name, *classname;
232         NTTIME last_mod;
233         WERROR result;
234
235         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
236         key = h->data;
237
238         result = reg_key_get_subkey_by_index(mem_ctx, 
239                 key, r->in.enum_index, &name, &classname, &last_mod);
240
241         if (2*strlen_m_term(name) > r->in.name->size) {
242                 return WERR_MORE_DATA;
243         }
244
245         if (name != NULL) {
246                 r->out.name->name = name;
247                 r->out.name->length = 2*strlen_m_term(name);
248         } else {
249                 r->out.name->name = r->in.name->name;
250                 r->out.name->length = r->in.name->length;
251         }
252         r->out.name->size = r->in.name->size;
253
254         r->out.keyclass = r->in.keyclass;
255         if (classname != NULL) {
256                 r->out.keyclass->name = classname;
257                 r->out.keyclass->length = 2*strlen_m_term(classname);
258         } else {
259                 r->out.keyclass->name = r->in.keyclass->name;
260                 r->out.keyclass->length = r->in.keyclass->length;
261         }
262         r->out.keyclass->size = r->in.keyclass->size;
263
264         if (r->in.last_changed_time != NULL)
265                 r->out.last_changed_time = &last_mod;
266
267         return result;
268 }
269
270
271 /*
272   winreg_EnumValue
273 */
274 static WERROR dcesrv_winreg_EnumValue(struct dcesrv_call_state *dce_call,
275                                       TALLOC_CTX *mem_ctx,
276                                       struct winreg_EnumValue *r)
277 {
278         struct dcesrv_handle *h;
279         struct registry_key *key;
280         const char *data_name;
281         uint32_t data_type;
282         DATA_BLOB data;
283         WERROR result;
284
285         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
286         key = h->data;
287
288         result = reg_key_get_value_by_index(mem_ctx, key,
289                 r->in.enum_index, &data_name, &data_type, &data);
290
291         if (!W_ERROR_IS_OK(result)) {
292                 /* if the lookup wasn't successful, send client query back */
293                 data_name = r->in.name->name;
294                 data_type = *r->in.type;
295                 data.data = r->in.value;
296                 data.length = *r->in.length;
297         }
298
299         /* "data_name" is NULL when we query the default attribute */
300         if (data_name != NULL) {
301                 r->out.name->name = data_name;
302                 r->out.name->length = 2*strlen_m_term(data_name);
303         } else {
304                 r->out.name->name = r->in.name->name;
305                 r->out.name->length = r->in.name->length;
306         }
307         r->out.name->size = r->in.name->size;
308
309         r->out.type = talloc(mem_ctx, enum winreg_Type);
310         if (!r->out.type) {
311                 return WERR_NOT_ENOUGH_MEMORY;
312         }
313         *r->out.type = (enum winreg_Type) data_type;
314
315         /* check the client has enough room for the value */
316         if (r->in.value != NULL &&
317             r->in.size != NULL &&
318             data.length > *r->in.size) {
319                 return WERR_MORE_DATA;
320         }
321
322         if (r->in.value != NULL) {
323                 r->out.value = data.data;
324         }
325
326         if (r->in.size != NULL) {
327                 r->out.size = talloc(mem_ctx, uint32_t);
328                 *r->out.size = data.length;
329                 r->out.length = r->out.size;
330         }
331
332         return result;
333 }
334
335
336 /*
337   winreg_FlushKey
338 */
339 static WERROR dcesrv_winreg_FlushKey(struct dcesrv_call_state *dce_call,
340                                      TALLOC_CTX *mem_ctx,
341                                      struct winreg_FlushKey *r)
342 {
343         struct auth_session_info *session_info =
344                 dcesrv_call_session_info(dce_call);
345         struct dcesrv_handle *h;
346         struct registry_key *key;
347
348         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
349         key = h->data;
350
351         switch (security_session_user_level(session_info, NULL))
352         {
353         case SECURITY_SYSTEM:
354         case SECURITY_ADMINISTRATOR:
355                 return reg_key_flush(key);
356         default:
357                 return WERR_ACCESS_DENIED;
358         }
359 }
360
361
362 /*
363   winreg_GetKeySecurity
364 */
365 static WERROR dcesrv_winreg_GetKeySecurity(struct dcesrv_call_state *dce_call,
366                                            TALLOC_CTX *mem_ctx,
367                                            struct winreg_GetKeySecurity *r)
368 {
369         struct dcesrv_handle *h;
370
371         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
372
373         return WERR_NOT_SUPPORTED;
374 }
375
376
377 /*
378   winreg_LoadKey
379 */
380 static WERROR dcesrv_winreg_LoadKey(struct dcesrv_call_state *dce_call,
381                                     TALLOC_CTX *mem_ctx,
382                                     struct winreg_LoadKey *r)
383 {
384         return WERR_NOT_SUPPORTED;
385 }
386
387
388 /*
389   winreg_NotifyChangeKeyValue
390 */
391 static WERROR dcesrv_winreg_NotifyChangeKeyValue(struct dcesrv_call_state *dce_call,
392                                                  TALLOC_CTX *mem_ctx,
393                                                  struct winreg_NotifyChangeKeyValue *r)
394 {
395         return WERR_NOT_SUPPORTED;
396 }
397
398
399 /*
400   winreg_OpenKey
401 */
402 static WERROR dcesrv_winreg_OpenKey(struct dcesrv_call_state *dce_call,
403                                     TALLOC_CTX *mem_ctx,
404                                     struct winreg_OpenKey *r)
405 {
406         struct auth_session_info *session_info =
407                 dcesrv_call_session_info(dce_call);
408         struct dcesrv_handle *h, *newh;
409         struct registry_key *key;
410         WERROR result;
411
412         DCESRV_PULL_HANDLE_FAULT(h, r->in.parent_handle, HTYPE_REGKEY);
413         key = h->data;
414
415         switch (security_session_user_level(session_info, NULL))
416         {
417         case SECURITY_SYSTEM:
418         case SECURITY_ADMINISTRATOR:
419         case SECURITY_USER:
420                 if (r->in.keyname.name && strcmp(r->in.keyname.name, "") == 0) {
421                         newh = talloc_reference(dce_call->context, h);
422                         result = WERR_OK;
423                 } else {
424                         newh = dcesrv_handle_create(dce_call, HTYPE_REGKEY);
425                         result = reg_open_key(newh, key, r->in.keyname.name,
426                                 (struct registry_key **)&newh->data);
427                 }
428                 
429                 if (W_ERROR_IS_OK(result)) {
430                         r->out.handle = &newh->wire_handle;
431                 } else {
432                         talloc_free(newh);
433                 }
434                 return result;
435         default:
436                 return WERR_ACCESS_DENIED;
437         }
438 }
439
440
441 /*
442   winreg_QueryInfoKey
443 */
444 static WERROR dcesrv_winreg_QueryInfoKey(struct dcesrv_call_state *dce_call,
445                                          TALLOC_CTX *mem_ctx,
446                                          struct winreg_QueryInfoKey *r)
447 {
448         struct auth_session_info *session_info =
449                 dcesrv_call_session_info(dce_call);
450         struct dcesrv_handle *h;
451         struct registry_key *key;
452         const char *classname = NULL;
453         WERROR result;
454
455         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
456         key = h->data;
457
458         switch (security_session_user_level(session_info, NULL))
459         {
460         case SECURITY_SYSTEM:
461         case SECURITY_ADMINISTRATOR:
462         case SECURITY_USER:
463                 result = reg_key_get_info(mem_ctx, key, &classname,
464                         r->out.num_subkeys, r->out.num_values,
465                         r->out.last_changed_time, r->out.max_subkeylen,
466                         r->out.max_valnamelen, r->out.max_valbufsize);
467
468                 if (r->out.max_subkeylen != NULL) {
469                         /* for UTF16 encoding */
470                         *r->out.max_subkeylen *= 2;
471                 }
472                 if (r->out.max_valnamelen != NULL) {
473                         /* for UTF16 encoding */
474                         *r->out.max_valnamelen *= 2;
475                 }
476
477                 if (classname != NULL) {
478                         r->out.classname->name = classname;
479                         r->out.classname->name_len = 2*strlen_m_term(classname);
480                 } else {
481                         r->out.classname->name = r->in.classname->name;
482                         r->out.classname->name_len = r->in.classname->name_len;
483                 }
484                 r->out.classname->name_size = r->in.classname->name_size;
485
486                 return result;
487         default:
488                 return WERR_ACCESS_DENIED;
489         }
490 }
491
492
493 /*
494   winreg_QueryValue
495 */
496 static WERROR dcesrv_winreg_QueryValue(struct dcesrv_call_state *dce_call,
497                                        TALLOC_CTX *mem_ctx,
498                                        struct winreg_QueryValue *r)
499 {
500         struct auth_session_info *session_info =
501                 dcesrv_call_session_info(dce_call);
502         struct dcesrv_handle *h;
503         struct registry_key *key;
504         uint32_t value_type;
505         DATA_BLOB value_data;
506         WERROR result;
507
508         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
509         key = h->data;
510
511         switch (security_session_user_level(session_info, NULL))
512         {
513         case SECURITY_SYSTEM:
514         case SECURITY_ADMINISTRATOR:
515         case SECURITY_USER:
516                 if ((r->in.type == NULL) || (r->in.data_length == NULL) ||
517                     (r->in.data_size == NULL)) {
518                         return WERR_INVALID_PARAMETER;
519                 }
520
521                 result = reg_key_get_value_by_name(mem_ctx, key, 
522                          r->in.value_name->name, &value_type, &value_data);
523                 
524                 if (!W_ERROR_IS_OK(result)) {
525                         /* if the lookup wasn't successful, send client query back */
526                         value_type = *r->in.type;
527                         value_data.data = r->in.data;
528                         value_data.length = *r->in.data_length;
529                 } else {
530                         if ((r->in.data != NULL)
531                             && (*r->in.data_size < value_data.length)) {
532                                 result = WERR_MORE_DATA;
533                         }
534                 }
535
536                 r->out.type = talloc(mem_ctx, enum winreg_Type);
537                 if (!r->out.type) {
538                         return WERR_NOT_ENOUGH_MEMORY;
539                 }
540                 *r->out.type = (enum winreg_Type) value_type;
541                 r->out.data_length = talloc(mem_ctx, uint32_t);
542                 if (!r->out.data_length) {
543                         return WERR_NOT_ENOUGH_MEMORY;
544                 }
545                 *r->out.data_length = value_data.length;
546                 r->out.data_size = talloc(mem_ctx, uint32_t);
547                 if (!r->out.data_size) {
548                         return WERR_NOT_ENOUGH_MEMORY;
549                 }
550                 *r->out.data_size = value_data.length;
551                 r->out.data = value_data.data;
552
553                 return result;
554         default:
555                 return WERR_ACCESS_DENIED;
556         }
557 }
558
559
560 /*
561   winreg_ReplaceKey
562 */
563 static WERROR dcesrv_winreg_ReplaceKey(struct dcesrv_call_state *dce_call,
564                                        TALLOC_CTX *mem_ctx,
565                                        struct winreg_ReplaceKey *r)
566 {
567         return WERR_NOT_SUPPORTED;
568 }
569
570
571 /*
572   winreg_RestoreKey
573 */
574 static WERROR dcesrv_winreg_RestoreKey(struct dcesrv_call_state *dce_call,
575                                        TALLOC_CTX *mem_ctx,
576                                        struct winreg_RestoreKey *r)
577 {
578         return WERR_NOT_SUPPORTED;
579 }
580
581
582 /*
583   winreg_SaveKey
584 */
585 static WERROR dcesrv_winreg_SaveKey(struct dcesrv_call_state *dce_call,
586                                     TALLOC_CTX *mem_ctx,
587                                     struct winreg_SaveKey *r)
588 {
589         return WERR_NOT_SUPPORTED;
590 }
591
592
593 /*
594   winreg_SetKeySecurity
595 */
596 static WERROR dcesrv_winreg_SetKeySecurity(struct dcesrv_call_state *dce_call,
597                                            TALLOC_CTX *mem_ctx,
598                                            struct winreg_SetKeySecurity *r)
599 {
600         return WERR_NOT_SUPPORTED;
601 }
602
603
604 /*
605   winreg_SetValue
606 */
607 static WERROR dcesrv_winreg_SetValue(struct dcesrv_call_state *dce_call,
608                                      TALLOC_CTX *mem_ctx,
609                                      struct winreg_SetValue *r)
610 {
611         struct auth_session_info *session_info =
612                 dcesrv_call_session_info(dce_call);
613         struct dcesrv_handle *h;
614         struct registry_key *key;
615         DATA_BLOB data;
616         WERROR result;
617
618         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
619         key = h->data;
620
621         switch (security_session_user_level(session_info, NULL))
622         {
623         case SECURITY_SYSTEM:
624         case SECURITY_ADMINISTRATOR:
625                 data.data = r->in.data;
626                 data.length = r->in.size;
627                 result = reg_val_set(key, r->in.name.name, r->in.type, data);
628                 return result;
629         default:
630                 return WERR_ACCESS_DENIED;
631         }
632 }
633
634
635 /*
636   winreg_UnLoadKey
637 */
638 static WERROR dcesrv_winreg_UnLoadKey(struct dcesrv_call_state *dce_call,
639                                       TALLOC_CTX *mem_ctx,
640                                       struct winreg_UnLoadKey *r)
641 {
642         return WERR_NOT_SUPPORTED;
643 }
644
645
646 /*
647   winreg_InitiateSystemShutdown
648 */
649 static WERROR dcesrv_winreg_InitiateSystemShutdown(struct dcesrv_call_state *dce_call,
650                                                    TALLOC_CTX *mem_ctx,
651                                                    struct winreg_InitiateSystemShutdown *r)
652 {
653         return WERR_NOT_SUPPORTED;
654 }
655
656
657 /*
658   winreg_AbortSystemShutdown
659 */
660 static WERROR dcesrv_winreg_AbortSystemShutdown(struct dcesrv_call_state *dce_call,
661                                                 TALLOC_CTX *mem_ctx,
662                                                 struct winreg_AbortSystemShutdown *r)
663 {
664         return WERR_NOT_SUPPORTED;
665 }
666
667
668 /*
669   winreg_GetVersion
670 */
671 static WERROR dcesrv_winreg_GetVersion(struct dcesrv_call_state *dce_call,
672                                        TALLOC_CTX *mem_ctx,
673                                        struct winreg_GetVersion *r)
674 {
675         struct dcesrv_handle *h;
676
677         DCESRV_PULL_HANDLE_FAULT(h, r->in.handle, HTYPE_REGKEY);
678
679         r->out.version = talloc(mem_ctx, uint32_t);
680         W_ERROR_HAVE_NO_MEMORY(r->out.version);
681
682         *r->out.version = 5;
683
684         return WERR_OK;
685 }
686
687
688 /*
689   winreg_QueryMultipleValues
690 */
691 static WERROR dcesrv_winreg_QueryMultipleValues(struct dcesrv_call_state *dce_call,
692                                                 TALLOC_CTX *mem_ctx,
693                                                 struct winreg_QueryMultipleValues *r)
694 {
695         return WERR_NOT_SUPPORTED;
696 }
697
698
699 /*
700   winreg_InitiateSystemShutdownEx
701 */
702 static WERROR dcesrv_winreg_InitiateSystemShutdownEx(struct dcesrv_call_state *dce_call,
703                                                      TALLOC_CTX *mem_ctx,
704                                                      struct winreg_InitiateSystemShutdownEx *r)
705 {
706         return WERR_NOT_SUPPORTED;
707 }
708
709
710 /*
711   winreg_SaveKeyEx
712 */
713 static WERROR dcesrv_winreg_SaveKeyEx(struct dcesrv_call_state *dce_call,
714                                       TALLOC_CTX *mem_ctx,
715                                       struct winreg_SaveKeyEx *r)
716 {
717         return WERR_NOT_SUPPORTED;
718 }
719
720
721 /*
722   winreg_QueryMultipleValues2
723 */
724 static WERROR dcesrv_winreg_QueryMultipleValues2(struct dcesrv_call_state *dce_call,
725                                                  TALLOC_CTX *mem_ctx,
726                                                  struct winreg_QueryMultipleValues2 *r)
727 {
728         return WERR_NOT_SUPPORTED;
729 }
730
731 /*
732   winreg_DeleteKeyEx
733 */
734 static WERROR dcesrv_winreg_DeleteKeyEx(struct dcesrv_call_state *dce_call,
735                                         TALLOC_CTX *mem_ctx,
736                                         struct winreg_DeleteKeyEx *r)
737 {
738         return WERR_NOT_SUPPORTED;
739 }
740
741 /* include the generated boilerplate */
742 #include "librpc/gen_ndr/ndr_winreg_s.c"