s3-rpc_client: Move client pipe functions to own header.
[samba.git] / source3 / rpcclient / cmd_drsuapi.c
1 /*
2    Unix SMB/CIFS implementation.
3    RPC pipe client
4
5    Copyright (C) Guenther Deschner 2008
6
7    This program is free software; you can redistribute it and/or modify
8    it under the terms of the GNU General Public License as published by
9    the Free Software Foundation; either version 3 of the License, or
10    (at your option) any later version.
11
12    This program is distributed in the hope that it will be useful,
13    but WITHOUT ANY WARRANTY; without even the implied warranty of
14    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15    GNU General Public License for more details.
16
17    You should have received a copy of the GNU General Public License
18    along with this program.  If not, see <http://www.gnu.org/licenses/>.
19 */
20
21 #include "includes.h"
22 #include "rpcclient.h"
23 #include "rpc_client/cli_pipe.h"
24 #include "../librpc/gen_ndr/ndr_drsuapi_c.h"
25
26 static WERROR cracknames(struct rpc_pipe_client *cli,
27                          TALLOC_CTX *mem_ctx,
28                          struct policy_handle *bind_handle,
29                          enum drsuapi_DsNameFormat format_offered,
30                          enum drsuapi_DsNameFormat format_desired,
31                          int argc,
32                          const char **argv,
33                          union drsuapi_DsNameCtr *ctr)
34 {
35         NTSTATUS status;
36         WERROR werr;
37         int i;
38         uint32_t level = 1;
39         union drsuapi_DsNameRequest req;
40         uint32_t level_out;
41         struct drsuapi_DsNameString *names;
42         struct dcerpc_binding_handle *b = cli->binding_handle;
43
44         names = TALLOC_ZERO_ARRAY(mem_ctx, struct drsuapi_DsNameString, argc);
45         W_ERROR_HAVE_NO_MEMORY(names);
46
47         for (i=0; i<argc; i++) {
48                 names[i].str = argv[i];
49         }
50
51         req.req1.codepage       = 1252; /* german */
52         req.req1.language       = 0x00000407; /* german */
53         req.req1.count          = argc;
54         req.req1.names          = names;
55         req.req1.format_flags   = DRSUAPI_DS_NAME_FLAG_NO_FLAGS;
56         req.req1.format_offered = format_offered;
57         req.req1.format_desired = format_desired;
58
59         status = dcerpc_drsuapi_DsCrackNames(b, mem_ctx,
60                                              bind_handle,
61                                              level,
62                                              &req,
63                                              &level_out,
64                                              ctr,
65                                              &werr);
66         if (!NT_STATUS_IS_OK(status)) {
67                 return ntstatus_to_werror(status);
68         }
69
70         if (!W_ERROR_IS_OK(werr)) {
71                 return werr;
72         }
73
74         return WERR_OK;
75 }
76
77 static WERROR cmd_drsuapi_cracknames(struct rpc_pipe_client *cli,
78                                      TALLOC_CTX *mem_ctx, int argc,
79                                      const char **argv)
80 {
81         NTSTATUS status;
82         WERROR werr;
83         int i;
84
85         struct GUID bind_guid;
86         struct policy_handle bind_handle;
87         struct dcerpc_binding_handle *b = cli->binding_handle;
88
89         union drsuapi_DsNameCtr ctr;
90
91         if (argc < 2) {
92                 printf("usage: %s name\n", argv[0]);
93                 return WERR_OK;
94         }
95
96         GUID_from_string(DRSUAPI_DS_BIND_GUID, &bind_guid);
97
98         status = dcerpc_drsuapi_DsBind(b, mem_ctx,
99                                        &bind_guid,
100                                        NULL,
101                                        &bind_handle,
102                                        &werr);
103
104         if (!NT_STATUS_IS_OK(status)) {
105                 return ntstatus_to_werror(status);
106         }
107
108         if (!W_ERROR_IS_OK(werr)) {
109                 return werr;
110         }
111
112         werr = cracknames(cli, mem_ctx,
113                           &bind_handle,
114                           DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
115                           DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
116                           1,
117                           argv+1,
118                           &ctr);
119
120         if (!W_ERROR_IS_OK(werr)) {
121                 goto out;
122         }
123
124         for (i=0; i < ctr.ctr1->count; i++) {
125                 printf("status: %d\n",
126                         ctr.ctr1->array[i].status);
127                 printf("dns_domain_name: %s\n",
128                         ctr.ctr1->array[i].dns_domain_name);
129                 printf("result_name: %s\n",
130                         ctr.ctr1->array[i].result_name);
131         }
132
133  out:
134         if (is_valid_policy_hnd(&bind_handle)) {
135                 WERROR _werr;
136                 dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &_werr);
137         }
138
139         return werr;
140 }
141
142 static void display_domain_controller_info_01(struct drsuapi_DsGetDCConnection01 *r)
143 {
144         printf("client_ip_address:\t%s\n", r->client_ip_address);
145         printf("unknown2:\t%d\n", r->unknown2);
146         printf("connection_time:\t%d\n", r->connection_time);
147         printf("unknown4:\t%d\n", r->unknown4);
148         printf("unknown5:\t%d\n", r->unknown5);
149         printf("unknown6:\t%d\n", r->unknown6);
150         printf("client_account:\t%s\n", r->client_account);
151 }
152
153 static void display_domain_controller_info_1(struct drsuapi_DsGetDCInfo1 *r)
154 {
155         printf("netbios_name:\t%s\n", r->netbios_name);
156         printf("dns_name:\t%s\n", r->dns_name);
157         printf("site_name:\t%s\n", r->site_name);
158         printf("computer_dn:\t%s\n", r->computer_dn);
159         printf("server_dn:\t%s\n", r->server_dn);
160         printf("is_pdc:\t\t%s\n", r->is_pdc ? "true" : "false");
161         printf("is_enabled:\t%s\n", r->is_enabled ? "true" : "false");
162 }
163
164 static void display_domain_controller_info_2(struct drsuapi_DsGetDCInfo2 *r)
165 {
166         printf("netbios_name:\t%s\n", r->netbios_name);
167         printf("dns_name:\t%s\n", r->dns_name);
168         printf("site_name:\t%s\n", r->site_name);
169         printf("site_dn:\t%s\n", r->site_dn);
170         printf("computer_dn:\t%s\n", r->computer_dn);
171         printf("server_dn:\t%s\n", r->server_dn);
172         printf("ntds_dn:\t%s\n", r->ntds_dn);
173         printf("is_pdc:\t\t%s\n", r->is_pdc ? "true" : "false");
174         printf("is_enabled:\t%s\n", r->is_enabled ? "true" : "false");
175         printf("is_gc:\t\t%s\n", r->is_gc ? "true" : "false");
176         printf("site_guid:\t%s\n", GUID_string(talloc_tos(), &r->site_guid));
177         printf("computer_guid:\t%s\n", GUID_string(talloc_tos(), &r->computer_guid));
178         printf("server_guid:\t%s\n", GUID_string(talloc_tos(), &r->server_guid));
179         printf("ntds_guid:\t%s\n", GUID_string(talloc_tos(), &r->ntds_guid));
180 }
181
182 static void display_domain_controller_info_3(struct drsuapi_DsGetDCInfo3 *r)
183 {
184         printf("netbios_name:\t%s\n", r->netbios_name);
185         printf("dns_name:\t%s\n", r->dns_name);
186         printf("site_name:\t%s\n", r->site_name);
187         printf("site_dn:\t%s\n", r->site_dn);
188         printf("computer_dn:\t%s\n", r->computer_dn);
189         printf("server_dn:\t%s\n", r->server_dn);
190         printf("ntds_dn:\t%s\n", r->ntds_dn);
191         printf("is_pdc:\t\t%s\n", r->is_pdc ? "true" : "false");
192         printf("is_enabled:\t%s\n", r->is_enabled ? "true" : "false");
193         printf("is_gc:\t\t%s\n", r->is_gc ? "true" : "false");
194         printf("is_rodc:\t%s\n", r->is_rodc ? "true" : "false");
195         printf("site_guid:\t%s\n", GUID_string(talloc_tos(), &r->site_guid));
196         printf("computer_guid:\t%s\n", GUID_string(talloc_tos(), &r->computer_guid));
197         printf("server_guid:\t%s\n", GUID_string(talloc_tos(), &r->server_guid));
198         printf("ntds_guid:\t%s\n", GUID_string(talloc_tos(), &r->ntds_guid));
199 }
200
201 static void display_domain_controller_info(int32_t level,
202                                            union drsuapi_DsGetDCInfoCtr *ctr)
203 {
204         int i;
205
206         switch (level) {
207                 case DRSUAPI_DC_CONNECTION_CTR_01:
208                         for (i=0; i<ctr->ctr01.count; i++) {
209                                 printf("----------\n");
210                                 display_domain_controller_info_01(&ctr->ctr01.array[i]);
211                         }
212                         break;
213                 case DRSUAPI_DC_INFO_CTR_1:
214                         for (i=0; i<ctr->ctr1.count; i++) {
215                                 printf("----------\n");
216                                 display_domain_controller_info_1(&ctr->ctr1.array[i]);
217                         }
218                         break;
219                 case DRSUAPI_DC_INFO_CTR_2:
220                         for (i=0; i<ctr->ctr2.count; i++) {
221                                 printf("----------\n");
222                                 display_domain_controller_info_2(&ctr->ctr2.array[i]);
223                         }
224                         break;
225                 case DRSUAPI_DC_INFO_CTR_3:
226                         for (i=0; i<ctr->ctr3.count; i++) {
227                                 printf("----------\n");
228                                 display_domain_controller_info_3(&ctr->ctr3.array[i]);
229                         }
230                         break;
231                 default:
232                         break;
233         }
234 }
235
236 static WERROR cmd_drsuapi_getdcinfo(struct rpc_pipe_client *cli,
237                                     TALLOC_CTX *mem_ctx, int argc,
238                                     const char **argv)
239 {
240         NTSTATUS status;
241         WERROR werr;
242
243         struct GUID bind_guid;
244         struct policy_handle bind_handle;
245         struct dcerpc_binding_handle *b = cli->binding_handle;
246
247         const char *domain = NULL;
248         int32_t level = 1;
249         int32_t level_out;
250         union drsuapi_DsGetDCInfoRequest req;
251         union drsuapi_DsGetDCInfoCtr ctr;
252
253         if (argc < 2) {
254                 printf("usage: %s domain [level]\n", argv[0]);
255                 return WERR_OK;
256         }
257
258         domain = argv[1];
259         if (argc >= 3) {
260                 level = atoi(argv[2]);
261         }
262
263         GUID_from_string(DRSUAPI_DS_BIND_GUID, &bind_guid);
264
265         status = dcerpc_drsuapi_DsBind(b, mem_ctx,
266                                        &bind_guid,
267                                        NULL,
268                                        &bind_handle,
269                                        &werr);
270
271         if (!NT_STATUS_IS_OK(status)) {
272                 return ntstatus_to_werror(status);
273         }
274
275         if (!W_ERROR_IS_OK(werr)) {
276                 return werr;
277         }
278
279         req.req1.domain_name = domain;
280         req.req1.level = level;
281
282         status = dcerpc_drsuapi_DsGetDomainControllerInfo(b, mem_ctx,
283                                                           &bind_handle,
284                                                           1,
285                                                           &req,
286                                                           &level_out,
287                                                           &ctr,
288                                                           &werr);
289         if (!NT_STATUS_IS_OK(status)) {
290                 werr = ntstatus_to_werror(status);
291                 goto out;
292         }
293
294         if (!W_ERROR_IS_OK(werr)) {
295                 goto out;
296         }
297
298         display_domain_controller_info(level_out, &ctr);
299  out:
300         if (is_valid_policy_hnd(&bind_handle)) {
301                 WERROR _werr;
302                 dcerpc_drsuapi_DsUnbind(b, mem_ctx, &bind_handle, &_werr);
303         }
304
305         return werr;
306 }
307
308 static WERROR cmd_drsuapi_getncchanges(struct rpc_pipe_client *cli,
309                                        TALLOC_CTX *mem_ctx, int argc,
310                                        const char **argv)
311 {
312         NTSTATUS status;
313         WERROR werr;
314
315         struct policy_handle bind_handle;
316         struct dcerpc_binding_handle *b = cli->binding_handle;
317
318         struct GUID bind_guid;
319         struct drsuapi_DsBindInfoCtr bind_info;
320         struct drsuapi_DsBindInfo28 info28;
321
322         const char *nc_dn = NULL;
323
324         DATA_BLOB session_key;
325
326         uint32_t level = 8;
327         bool single = false;
328         uint32_t level_out = 0;
329         union drsuapi_DsGetNCChangesRequest req;
330         union drsuapi_DsGetNCChangesCtr ctr;
331         struct drsuapi_DsReplicaObjectIdentifier nc;
332         struct dom_sid null_sid;
333
334         struct drsuapi_DsGetNCChangesCtr1 *ctr1 = NULL;
335         struct drsuapi_DsGetNCChangesCtr6 *ctr6 = NULL;
336         uint32_t out_level = 0;
337         int y;
338
339         uint32_t supported_extensions = 0;
340         uint32_t replica_flags  = DRSUAPI_DRS_WRIT_REP |
341                                   DRSUAPI_DRS_INIT_SYNC |
342                                   DRSUAPI_DRS_PER_SYNC |
343                                   DRSUAPI_DRS_GET_ANC |
344                                   DRSUAPI_DRS_NEVER_SYNCED;
345
346         if (argc > 3) {
347                 printf("usage: %s [naming_context_or_object_dn [single]]\n", argv[0]);
348                 return WERR_OK;
349         }
350
351         if (argc >= 2) {
352                 nc_dn = argv[1];
353         }
354
355         if (argc == 3) {
356                 if (strequal(argv[2], "single")) {
357                         single = true;
358                 } else {
359                         printf("warning: ignoring unknown argument '%s'\n",
360                                argv[2]);
361                 }
362         }
363
364         ZERO_STRUCT(info28);
365
366         ZERO_STRUCT(null_sid);
367         ZERO_STRUCT(req);
368
369         GUID_from_string(DRSUAPI_DS_BIND_GUID, &bind_guid);
370
371         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_BASE;
372         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_ASYNC_REPLICATION;
373         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_REMOVEAPI;
374         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_MOVEREQ_V2;
375         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHG_COMPRESS;
376         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V1;
377         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_RESTORE_USN_OPTIMIZATION;
378         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_KCC_EXECUTE;
379         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRY_V2;
380         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_LINKED_VALUE_REPLICATION;
381         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V2;
382         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_INSTANCE_TYPE_NOT_REQ_ON_MOD;
383         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_CRYPTO_BIND;
384         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GET_REPL_INFO;
385         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_STRONG_ENCRYPTION;
386         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_DCINFO_V01;
387         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_TRANSITIVE_MEMBERSHIP;
388         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_ADD_SID_HISTORY;
389         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_POST_BETA3;
390         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GET_MEMBERSHIPS2;
391         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V6;
392         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_NONDOMAIN_NCS;
393         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8;
394         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V5;
395         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V6;
396         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_ADDENTRYREPLY_V3;
397         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_GETCHGREPLY_V7;
398         info28.supported_extensions     |= DRSUAPI_SUPPORTED_EXTENSION_VERIFY_OBJECT;
399         info28.site_guid                = GUID_zero();
400         info28.pid                      = 0;
401         info28.repl_epoch               = 0;
402
403         bind_info.length = 28;
404         bind_info.info.info28 = info28;
405
406         status = dcerpc_drsuapi_DsBind(b, mem_ctx,
407                                        &bind_guid,
408                                        &bind_info,
409                                        &bind_handle,
410                                        &werr);
411
412         if (!NT_STATUS_IS_OK(status)) {
413                 return ntstatus_to_werror(status);
414         }
415
416         if (!W_ERROR_IS_OK(werr)) {
417                 return werr;
418         }
419
420         if (bind_info.length == 24) {
421                 supported_extensions = bind_info.info.info24.supported_extensions;
422         } else if (bind_info.length == 28) {
423                 supported_extensions = bind_info.info.info28.supported_extensions;
424         } else if (bind_info.length == 48) {
425                 supported_extensions = bind_info.info.info48.supported_extensions;
426         }
427
428         if (!nc_dn) {
429
430                 union drsuapi_DsNameCtr crack_ctr;
431                 const char *name;
432
433                 name = talloc_asprintf(mem_ctx, "%s\\", lp_workgroup());
434                 W_ERROR_HAVE_NO_MEMORY(name);
435
436                 werr = cracknames(cli, mem_ctx,
437                                   &bind_handle,
438                                   DRSUAPI_DS_NAME_FORMAT_UNKNOWN,
439                                   DRSUAPI_DS_NAME_FORMAT_FQDN_1779,
440                                   1,
441                                   &name,
442                                   &crack_ctr);
443                 if (!W_ERROR_IS_OK(werr)) {
444                         return werr;
445                 }
446
447                 if (crack_ctr.ctr1->count != 1) {
448                         return WERR_NO_SUCH_DOMAIN;
449                 }
450
451                 if (crack_ctr.ctr1->array[0].status != DRSUAPI_DS_NAME_STATUS_OK) {
452                         return WERR_NO_SUCH_DOMAIN;
453                 }
454
455                 nc_dn = talloc_strdup(mem_ctx, crack_ctr.ctr1->array[0].result_name);
456                 W_ERROR_HAVE_NO_MEMORY(nc_dn);
457
458                 printf("using: %s\n", nc_dn);
459         }
460
461         nc.dn = nc_dn;
462         nc.guid = GUID_zero();
463         nc.sid = null_sid;
464
465         if (supported_extensions & DRSUAPI_SUPPORTED_EXTENSION_GETCHGREQ_V8) {
466                 level = 8;
467                 req.req8.naming_context         = &nc;
468                 req.req8.replica_flags          = replica_flags;
469                 req.req8.max_object_count       = 402;
470                 req.req8.max_ndr_size           = 402116;
471                 if (single) {
472                         req.req8.extended_op    = DRSUAPI_EXOP_REPL_OBJ;
473                 }
474         } else {
475                 level = 5;
476                 req.req5.naming_context         = &nc;
477                 req.req5.replica_flags          = replica_flags;
478                 req.req5.max_object_count       = 402;
479                 req.req5.max_ndr_size           = 402116;
480                 if (single) {
481                         req.req5.extended_op    = DRSUAPI_EXOP_REPL_OBJ;
482                 }
483         }
484
485         for (y=0; ;y++) {
486
487                 if (level == 8) {
488                         DEBUG(1,("start[%d] tmp_higest_usn: %llu , highest_usn: %llu\n",y,
489                                 (long long)req.req8.highwatermark.tmp_highest_usn,
490                                 (long long)req.req8.highwatermark.highest_usn));
491                 }
492
493                 status = dcerpc_drsuapi_DsGetNCChanges(b, mem_ctx,
494                                                        &bind_handle,
495                                                        level,
496                                                        &req,
497                                                        &level_out,
498                                                        &ctr,
499                                                        &werr);
500                 if (!NT_STATUS_IS_OK(status)) {
501                         werr = ntstatus_to_werror(status);
502                         printf("Failed to get NC Changes: %s",
503                                 get_friendly_nt_error_msg(status));
504                         goto out;
505                 }
506
507                 if (!W_ERROR_IS_OK(werr)) {
508                         printf("Failed to get NC Changes: %s",
509                                 get_friendly_werror_msg(werr));
510                         goto out;
511                 }
512
513                 if (level_out == 1) {
514                         out_level = 1;
515                         ctr1 = &ctr.ctr1;
516                 } else if (level_out == 2 && ctr.ctr2.mszip1.ts) {
517                         out_level = 1;
518                         ctr1 = &ctr.ctr2.mszip1.ts->ctr1;
519                 }
520
521                 status = cli_get_session_key(mem_ctx, cli, &session_key);
522                 if (!NT_STATUS_IS_OK(status)) {
523                         printf("Failed to get Session Key: %s",
524                                 nt_errstr(status));
525                         return ntstatus_to_werror(status);
526                 }
527
528                 if (out_level == 1) {
529                         DEBUG(1,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
530                                 (long long)ctr1->new_highwatermark.tmp_highest_usn,
531                                 (long long)ctr1->new_highwatermark.highest_usn));
532 #if 0
533                         libnet_dssync_decrypt_attributes(mem_ctx,
534                                                          &session_key,
535                                                          ctr1->first_object);
536 #endif
537                         if (ctr1->more_data) {
538                                 req.req5.highwatermark = ctr1->new_highwatermark;
539                                 continue;
540                         }
541                 }
542
543                 if (level_out == 6) {
544                         out_level = 6;
545                         ctr6 = &ctr.ctr6;
546                 } else if (level_out == 7
547                            && ctr.ctr7.level == 6
548                            && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_MSZIP
549                            && ctr.ctr7.ctr.mszip6.ts) {
550                         out_level = 6;
551                         ctr6 = &ctr.ctr7.ctr.mszip6.ts->ctr6;
552                 } else if (level_out == 7
553                            && ctr.ctr7.level == 6
554                            && ctr.ctr7.type == DRSUAPI_COMPRESSION_TYPE_XPRESS
555                            && ctr.ctr7.ctr.xpress6.ts) {
556                         out_level = 6;
557                         ctr6 = &ctr.ctr7.ctr.xpress6.ts->ctr6;
558                 }
559
560                 if (out_level == 6) {
561                         DEBUG(1,("end[%d] tmp_highest_usn: %llu , highest_usn: %llu\n",y,
562                                 (long long)ctr6->new_highwatermark.tmp_highest_usn,
563                                 (long long)ctr6->new_highwatermark.highest_usn));
564 #if 0
565                         libnet_dssync_decrypt_attributes(mem_ctx,
566                                                          &session_key,
567                                                          ctr6->first_object);
568 #endif
569                         if (ctr6->more_data) {
570                                 req.req8.highwatermark = ctr6->new_highwatermark;
571                                 continue;
572                         }
573                 }
574
575                 break;
576         }
577
578  out:
579         return werr;
580 }
581
582 /* List of commands exported by this module */
583
584 struct cmd_set drsuapi_commands[] = {
585
586         { "DRSUAPI" },
587         { "dscracknames", RPC_RTYPE_WERROR, NULL, cmd_drsuapi_cracknames, &ndr_table_drsuapi.syntax_id, NULL, "Crack Name", "" },
588         { "dsgetdcinfo", RPC_RTYPE_WERROR, NULL, cmd_drsuapi_getdcinfo, &ndr_table_drsuapi.syntax_id, NULL, "Get Domain Controller Info", "" },
589         { "dsgetncchanges", RPC_RTYPE_WERROR, NULL, cmd_drsuapi_getncchanges, &ndr_table_drsuapi.syntax_id, NULL, "Get NC Changes", "" },
590         { NULL }
591 };