This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[ira/wip.git] / source3 / rpcclient / cmd_lsarpc.c
1 /*
2    Unix SMB/CIFS implementation.
3    RPC pipe client
4
5    Copyright (C) Tim Potter              2000
6    Copyright (C) Rafal Szczesniak        2002
7
8    This program is free software; you can redistribute it and/or modify
9    it under the terms of the GNU General Public License as published by
10    the Free Software Foundation; either version 2 of the License, or
11    (at your option) any later version.
12    
13    This program is distributed in the hope that it will be useful,
14    but WITHOUT ANY WARRANTY; without even the implied warranty of
15    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16    GNU General Public License for more details.
17    
18    You should have received a copy of the GNU General Public License
19    along with this program; if not, write to the Free Software
20    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 */
22
23 #include "includes.h"
24 #include "rpcclient.h"
25
26
27 /* useful function to allow entering a name instead of a SID and
28  * looking it up automatically */
29 static NTSTATUS name_to_sid(struct cli_state *cli, 
30                             TALLOC_CTX *mem_ctx,
31                             DOM_SID *sid, const char *name)
32 {
33         POLICY_HND pol;
34         uint32 *sid_types;
35         NTSTATUS result;
36         DOM_SID *sids;
37
38         /* maybe its a raw SID */
39         if (strncmp(name, "S-", 2) == 0 &&
40             string_to_sid(sid, name)) {
41                 return NT_STATUS_OK;
42         }
43
44         result = cli_lsa_open_policy(cli, mem_ctx, True, 
45                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
46                                      &pol);
47         if (!NT_STATUS_IS_OK(result))
48                 goto done;
49
50         result = cli_lsa_lookup_names(cli, mem_ctx, &pol, 1, &name, &sids, &sid_types);
51         if (!NT_STATUS_IS_OK(result))
52                 goto done;
53
54         cli_lsa_close(cli, mem_ctx, &pol);
55
56         *sid = sids[0];
57
58 done:
59         return result;
60 }
61
62
63 /* Look up domain related information on a remote host */
64
65 static NTSTATUS cmd_lsa_query_info_policy(struct cli_state *cli, 
66                                           TALLOC_CTX *mem_ctx, int argc, 
67                                           const char **argv) 
68 {
69         POLICY_HND pol;
70         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
71         DOM_SID dom_sid;
72         GUID dom_guid;
73         fstring sid_str, domain_name="", dns_name="", forest_name="";
74         uint32 info_class = 3;
75
76         if (argc > 2) {
77                 printf("Usage: %s [info_class]\n", argv[0]);
78                 return NT_STATUS_OK;
79         }
80
81         if (argc == 2)
82                 info_class = atoi(argv[1]);
83         
84         /* Lookup info policy */
85         switch (info_class) {
86         case 12:
87                 result = cli_lsa_open_policy2(cli, mem_ctx, True, 
88                                              SEC_RIGHTS_MAXIMUM_ALLOWED,
89                                              &pol);
90
91                 if (!NT_STATUS_IS_OK(result))
92                         goto done;
93                 result = cli_lsa_query_info_policy2(cli, mem_ctx, &pol,
94                                                     info_class, domain_name,
95                                                     dns_name, forest_name,
96                                                     &dom_guid, &dom_sid);
97                 break;
98         default:
99                 result = cli_lsa_open_policy(cli, mem_ctx, True, 
100                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
101                                      &pol);
102
103                 if (!NT_STATUS_IS_OK(result))
104                         goto done;
105                 result = cli_lsa_query_info_policy(cli, mem_ctx, &pol, 
106                                                    info_class, domain_name, 
107                                                    &dom_sid);
108         }
109
110         if (!NT_STATUS_IS_OK(result))
111                 goto done;
112
113         sid_to_string(sid_str, &dom_sid);
114
115         if (domain_name[0])
116                 printf("domain %s has sid %s\n", domain_name, sid_str);
117         else
118                 printf("could not query info for level %d\n", info_class);
119
120         if (dns_name[0])
121                 printf("domain dns name is %s\n", dns_name);
122         if (forest_name[0])
123                 printf("forest name is %s\n", forest_name);
124
125         if (info_class == 12) {
126                 printf("domain GUID is ");
127                 print_guid(&dom_guid);
128         }
129  done:
130         return result;
131 }
132
133 /* Resolve a list of names to a list of sids */
134
135 static NTSTATUS cmd_lsa_lookup_names(struct cli_state *cli, 
136                                      TALLOC_CTX *mem_ctx, int argc, 
137                                      const char **argv)
138 {
139         POLICY_HND pol;
140         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
141         DOM_SID *sids;
142         uint32 *types;
143         int i;
144
145         if (argc == 1) {
146                 printf("Usage: %s [name1 [name2 [...]]]\n", argv[0]);
147                 return NT_STATUS_OK;
148         }
149
150         result = cli_lsa_open_policy(cli, mem_ctx, True, 
151                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
152                                      &pol);
153
154         if (!NT_STATUS_IS_OK(result))
155                 goto done;
156
157         result = cli_lsa_lookup_names(cli, mem_ctx, &pol, argc - 1, 
158                                       (const char**)(argv + 1), &sids, &types);
159
160         if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != 
161             NT_STATUS_V(STATUS_SOME_UNMAPPED))
162                 goto done;
163
164         result = NT_STATUS_OK;
165
166         /* Print results */
167
168         for (i = 0; i < (argc - 1); i++) {
169                 fstring sid_str;
170                 sid_to_string(sid_str, &sids[i]);
171                 printf("%s %s (%s: %d)\n", argv[i + 1], sid_str,
172                        sid_type_lookup(types[i]), types[i]);
173         }
174
175  done:
176         return result;
177 }
178
179 /* Resolve a list of SIDs to a list of names */
180
181 static NTSTATUS cmd_lsa_lookup_sids(struct cli_state *cli, TALLOC_CTX *mem_ctx,
182                                     int argc, const char **argv)
183 {
184         POLICY_HND pol;
185         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
186         DOM_SID *sids;
187         char **domains;
188         char **names;
189         uint32 *types;
190         int i;
191
192         if (argc == 1) {
193                 printf("Usage: %s [sid1 [sid2 [...]]]\n", argv[0]);
194                 return NT_STATUS_OK;
195         }
196
197         result = cli_lsa_open_policy(cli, mem_ctx, True, 
198                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
199                                      &pol);
200
201         if (!NT_STATUS_IS_OK(result))
202                 goto done;
203
204         /* Convert arguments to sids */
205
206         sids = (DOM_SID *)talloc(mem_ctx, sizeof(DOM_SID) * (argc - 1));
207
208         if (!sids) {
209                 printf("could not allocate memory for %d sids\n", argc - 1);
210                 goto done;
211         }
212
213         for (i = 0; i < argc - 1; i++) 
214                 if (!string_to_sid(&sids[i], argv[i + 1])) {
215                         result = NT_STATUS_INVALID_SID;
216                         goto done;
217                 }
218
219         /* Lookup the SIDs */
220
221         result = cli_lsa_lookup_sids(cli, mem_ctx, &pol, argc - 1, sids, 
222                                      &domains, &names, &types);
223
224         if (!NT_STATUS_IS_OK(result) && NT_STATUS_V(result) != 
225             NT_STATUS_V(STATUS_SOME_UNMAPPED))
226                 goto done;
227
228         result = NT_STATUS_OK;
229
230         /* Print results */
231
232         for (i = 0; i < (argc - 1); i++) {
233                 fstring sid_str;
234
235                 sid_to_string(sid_str, &sids[i]);
236                 printf("%s %s\\%s (%d)\n", sid_str, 
237                        domains[i] ? domains[i] : "*unknown*", 
238                        names[i] ? names[i] : "*unknown*", types[i]);
239         }
240
241  done:
242         return result;
243 }
244
245 /* Enumerate list of trusted domains */
246
247 static NTSTATUS cmd_lsa_enum_trust_dom(struct cli_state *cli, 
248                                        TALLOC_CTX *mem_ctx, int argc, 
249                                        const char **argv)
250 {
251         POLICY_HND pol;
252         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
253         DOM_SID *domain_sids;
254         char **domain_names;
255
256         /* defaults, but may be changed using params */
257         uint32 enum_ctx = 0;
258         uint32 num_domains = 0;
259         int i;
260
261         if (argc > 2) {
262                 printf("Usage: %s [enum context (0)]\n", argv[0]);
263                 return NT_STATUS_OK;
264         }
265
266         if (argc == 2 && argv[1]) {
267                 enum_ctx = atoi(argv[2]);
268         }       
269
270         result = cli_lsa_open_policy(cli, mem_ctx, True, 
271                                      POLICY_VIEW_LOCAL_INFORMATION,
272                                      &pol);
273
274         if (!NT_STATUS_IS_OK(result))
275                 goto done;
276
277         /* Lookup list of trusted domains */
278
279         result = cli_lsa_enum_trust_dom(cli, mem_ctx, &pol, &enum_ctx,
280                                         &num_domains,
281                                         &domain_names, &domain_sids);
282         if (!NT_STATUS_IS_OK(result) &&
283             !NT_STATUS_EQUAL(result, NT_STATUS_NO_MORE_ENTRIES) &&
284             !NT_STATUS_EQUAL(result, STATUS_MORE_ENTRIES))
285             goto done;
286
287         /* Print results: list of names and sids returned in this response. */   
288         for (i = 0; i < num_domains; i++) {
289                 fstring sid_str;
290
291                 sid_to_string(sid_str, &domain_sids[i]);
292                 printf("%s %s\n", domain_names[i] ? domain_names[i] : 
293                        "*unknown*", sid_str);
294         }
295
296  done:
297         return result;
298 }
299
300 /* Enumerates privileges */
301
302 static NTSTATUS cmd_lsa_enum_privilege(struct cli_state *cli, 
303                                        TALLOC_CTX *mem_ctx, int argc, 
304                                        const char **argv) 
305 {
306         POLICY_HND pol;
307         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
308
309         uint32 enum_context=0;
310         uint32 pref_max_length=0x1000;
311         uint32 count=0;
312         char   **privs_name;
313         uint32 *privs_high;
314         uint32 *privs_low;
315         int i;
316
317         if (argc > 3) {
318                 printf("Usage: %s [enum context] [max length]\n", argv[0]);
319                 return NT_STATUS_OK;
320         }
321
322         if (argc>=2)
323                 enum_context=atoi(argv[1]);
324
325         if (argc==3)
326                 pref_max_length=atoi(argv[2]);
327
328         result = cli_lsa_open_policy(cli, mem_ctx, True, 
329                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
330                                      &pol);
331
332         if (!NT_STATUS_IS_OK(result))
333                 goto done;
334
335         result = cli_lsa_enum_privilege(cli, mem_ctx, &pol, &enum_context, pref_max_length,
336                                         &count, &privs_name, &privs_high, &privs_low);
337
338         if (!NT_STATUS_IS_OK(result))
339                 goto done;
340
341         /* Print results */
342         printf("found %d privileges\n\n", count);
343
344         for (i = 0; i < count; i++) {
345                 printf("%s \t\t%d:%d (0x%x:0x%x)\n", privs_name[i] ? privs_name[i] : "*unknown*",
346                        privs_high[i], privs_low[i], privs_high[i], privs_low[i]);
347         }
348
349  done:
350         return result;
351 }
352
353 /* Get privilege name */
354
355 static NTSTATUS cmd_lsa_get_dispname(struct cli_state *cli, 
356                                      TALLOC_CTX *mem_ctx, int argc, 
357                                      const char **argv) 
358 {
359         POLICY_HND pol;
360         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
361
362         uint16 lang_id=0;
363         uint16 lang_id_sys=0;
364         uint16 lang_id_desc;
365         fstring description;
366
367         if (argc != 2) {
368                 printf("Usage: %s privilege name\n", argv[0]);
369                 return NT_STATUS_OK;
370         }
371
372         result = cli_lsa_open_policy(cli, mem_ctx, True, 
373                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
374                                      &pol);
375
376         if (!NT_STATUS_IS_OK(result))
377                 goto done;
378
379         result = cli_lsa_get_dispname(cli, mem_ctx, &pol, argv[1], lang_id, lang_id_sys, description, &lang_id_desc);
380
381         if (!NT_STATUS_IS_OK(result))
382                 goto done;
383
384         /* Print results */
385         printf("%s -> %s (language: 0x%x)\n", argv[1], description, lang_id_desc);
386
387  done:
388         return result;
389 }
390
391 /* Enumerate the LSA SIDS */
392
393 static NTSTATUS cmd_lsa_enum_sids(struct cli_state *cli, 
394                                   TALLOC_CTX *mem_ctx, int argc, 
395                                   const char **argv) 
396 {
397         POLICY_HND pol;
398         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
399
400         uint32 enum_context=0;
401         uint32 pref_max_length=0x1000;
402         DOM_SID *sids;
403         uint32 count=0;
404         int i;
405
406         if (argc > 3) {
407                 printf("Usage: %s [enum context] [max length]\n", argv[0]);
408                 return NT_STATUS_OK;
409         }
410
411         if (argc>=2)
412                 enum_context=atoi(argv[1]);
413
414         if (argc==3)
415                 pref_max_length=atoi(argv[2]);
416
417         result = cli_lsa_open_policy(cli, mem_ctx, True, 
418                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
419                                      &pol);
420
421         if (!NT_STATUS_IS_OK(result))
422                 goto done;
423
424         result = cli_lsa_enum_sids(cli, mem_ctx, &pol, &enum_context, pref_max_length,
425                                         &count, &sids);
426
427         if (!NT_STATUS_IS_OK(result))
428                 goto done;
429
430         /* Print results */
431         printf("found %d SIDs\n\n", count);
432
433         for (i = 0; i < count; i++) {
434                 fstring sid_str;
435
436                 sid_to_string(sid_str, &sids[i]);
437                 printf("%s\n", sid_str);
438         }
439
440  done:
441         return result;
442 }
443
444 /* Enumerate the privileges of an SID */
445
446 static NTSTATUS cmd_lsa_enum_privsaccounts(struct cli_state *cli, 
447                                            TALLOC_CTX *mem_ctx, int argc, 
448                                            const char **argv) 
449 {
450         POLICY_HND dom_pol;
451         POLICY_HND user_pol;
452         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
453         uint32 access_desired = 0x000f000f;
454         
455         DOM_SID sid;
456         uint32 count=0;
457         LUID_ATTR *set;
458         int i;
459
460         if (argc != 2 ) {
461                 printf("Usage: %s SID\n", argv[0]);
462                 return NT_STATUS_OK;
463         }
464
465         result = name_to_sid(cli, mem_ctx, &sid, argv[1]);
466         if (!NT_STATUS_IS_OK(result))
467                 goto done;      
468
469         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
470                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
471                                      &dom_pol);
472
473         if (!NT_STATUS_IS_OK(result))
474                 goto done;
475
476         result = cli_lsa_open_account(cli, mem_ctx, &dom_pol, &sid, access_desired, &user_pol);
477
478         if (!NT_STATUS_IS_OK(result))
479                 goto done;
480
481         result = cli_lsa_enum_privsaccount(cli, mem_ctx, &user_pol, &count, &set);
482
483         if (!NT_STATUS_IS_OK(result))
484                 goto done;
485
486         /* Print results */
487         printf("found %d privileges for SID %s\n\n", count, argv[1]);
488         printf("high\tlow\tattribute\n");
489
490         for (i = 0; i < count; i++) {
491                 printf("%u\t%u\t%u\n", set[i].luid.high, set[i].luid.low, set[i].attr);
492         }
493
494  done:
495         return result;
496 }
497
498
499 /* Enumerate the privileges of an SID via LsaEnumerateAccountRights */
500
501 static NTSTATUS cmd_lsa_enum_acct_rights(struct cli_state *cli, 
502                                          TALLOC_CTX *mem_ctx, int argc, 
503                                          const char **argv) 
504 {
505         POLICY_HND dom_pol;
506         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
507
508         DOM_SID sid;
509         uint32 count;
510         char **rights;
511
512         int i;
513
514         if (argc != 2 ) {
515                 printf("Usage: %s SID\n", argv[0]);
516                 return NT_STATUS_OK;
517         }
518
519         result = name_to_sid(cli, mem_ctx, &sid, argv[1]);
520         if (!NT_STATUS_IS_OK(result))
521                 goto done;      
522
523         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
524                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
525                                      &dom_pol);
526
527         if (!NT_STATUS_IS_OK(result))
528                 goto done;
529
530         result = cli_lsa_enum_account_rights(cli, mem_ctx, &dom_pol, sid, &count, &rights);
531
532         if (!NT_STATUS_IS_OK(result))
533                 goto done;
534
535         printf("found %d privileges for SID %s\n", count, sid_string_static(&sid));
536
537         for (i = 0; i < count; i++) {
538                 printf("\t%s\n", rights[i]);
539         }
540
541  done:
542         return result;
543 }
544
545
546 /* add some privileges to a SID via LsaAddAccountRights */
547
548 static NTSTATUS cmd_lsa_add_acct_rights(struct cli_state *cli, 
549                                         TALLOC_CTX *mem_ctx, int argc, 
550                                         const char **argv) 
551 {
552         POLICY_HND dom_pol;
553         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
554
555         DOM_SID sid;
556
557         if (argc < 3 ) {
558                 printf("Usage: %s SID [rights...]\n", argv[0]);
559                 return NT_STATUS_OK;
560         }
561
562         result = name_to_sid(cli, mem_ctx, &sid, argv[1]);
563         if (!NT_STATUS_IS_OK(result))
564                 goto done;      
565
566         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
567                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
568                                      &dom_pol);
569
570         if (!NT_STATUS_IS_OK(result))
571                 goto done;
572
573         result = cli_lsa_add_account_rights(cli, mem_ctx, &dom_pol, sid, 
574                                             argc-2, argv+2);
575
576         if (!NT_STATUS_IS_OK(result))
577                 goto done;
578
579  done:
580         return result;
581 }
582
583
584 /* remove some privileges to a SID via LsaRemoveAccountRights */
585
586 static NTSTATUS cmd_lsa_remove_acct_rights(struct cli_state *cli, 
587                                         TALLOC_CTX *mem_ctx, int argc, 
588                                         const char **argv) 
589 {
590         POLICY_HND dom_pol;
591         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
592
593         DOM_SID sid;
594
595         if (argc < 3 ) {
596                 printf("Usage: %s SID [rights...]\n", argv[0]);
597                 return NT_STATUS_OK;
598         }
599
600         result = name_to_sid(cli, mem_ctx, &sid, argv[1]);
601         if (!NT_STATUS_IS_OK(result))
602                 goto done;      
603
604         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
605                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
606                                      &dom_pol);
607
608         if (!NT_STATUS_IS_OK(result))
609                 goto done;
610
611         result = cli_lsa_remove_account_rights(cli, mem_ctx, &dom_pol, sid, 
612                                                False, argc-2, argv+2);
613
614         if (!NT_STATUS_IS_OK(result))
615                 goto done;
616
617  done:
618         return result;
619 }
620
621
622 /* Get a privilege value given its name */
623
624 static NTSTATUS cmd_lsa_lookupprivvalue(struct cli_state *cli, 
625                                         TALLOC_CTX *mem_ctx, int argc, 
626                                         const char **argv) 
627 {
628         POLICY_HND pol;
629         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
630         LUID luid;
631
632         if (argc != 2 ) {
633                 printf("Usage: %s name\n", argv[0]);
634                 return NT_STATUS_OK;
635         }
636
637         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
638                                      SEC_RIGHTS_MAXIMUM_ALLOWED,
639                                      &pol);
640
641         if (!NT_STATUS_IS_OK(result))
642                 goto done;
643
644         result = cli_lsa_lookupprivvalue(cli, mem_ctx, &pol, argv[1], &luid);
645
646         if (!NT_STATUS_IS_OK(result))
647                 goto done;
648
649         /* Print results */
650
651         printf("%u:%u (0x%x:0x%x)\n", luid.high, luid.low, luid.high, luid.low);
652
653  done:
654         return result;
655 }
656
657 /* Query LSA security object */
658
659 static NTSTATUS cmd_lsa_query_secobj(struct cli_state *cli, 
660                                      TALLOC_CTX *mem_ctx, int argc, 
661                                      const char **argv) 
662 {
663         POLICY_HND pol;
664         NTSTATUS result = NT_STATUS_UNSUCCESSFUL;
665         SEC_DESC_BUF *sdb;
666         uint32 sec_info = 0x00000004; /* ??? */
667
668         if (argc != 1 ) {
669                 printf("Usage: %s\n", argv[0]);
670                 return NT_STATUS_OK;
671         }
672
673         result = cli_lsa_open_policy2(cli, mem_ctx, True, 
674                                       SEC_RIGHTS_MAXIMUM_ALLOWED,
675                                       &pol);
676
677         if (!NT_STATUS_IS_OK(result))
678                 goto done;
679
680         result = cli_lsa_query_secobj(cli, mem_ctx, &pol, sec_info, &sdb);
681
682         if (!NT_STATUS_IS_OK(result))
683                 goto done;
684
685         /* Print results */
686
687         display_sec_desc(sdb->sec);
688
689  done:
690         return result;
691 }
692
693
694 /* List of commands exported by this module */
695
696 struct cmd_set lsarpc_commands[] = {
697
698         { "LSARPC" },
699
700         { "lsaquery",            RPC_RTYPE_NTSTATUS, cmd_lsa_query_info_policy,  NULL, PI_LSARPC, "Query info policy",                    "" },
701         { "lookupsids",          RPC_RTYPE_NTSTATUS, cmd_lsa_lookup_sids,        NULL, PI_LSARPC, "Convert SIDs to names",                "" },
702         { "lookupnames",         RPC_RTYPE_NTSTATUS, cmd_lsa_lookup_names,       NULL, PI_LSARPC, "Convert names to SIDs",                "" },
703         { "enumtrust",           RPC_RTYPE_NTSTATUS, cmd_lsa_enum_trust_dom,     NULL, PI_LSARPC, "Enumerate trusted domains",            "Usage: [preferred max number] [enum context (0)]" },
704         { "enumprivs",           RPC_RTYPE_NTSTATUS, cmd_lsa_enum_privilege,     NULL, PI_LSARPC, "Enumerate privileges",                 "" },
705         { "getdispname",         RPC_RTYPE_NTSTATUS, cmd_lsa_get_dispname,       NULL, PI_LSARPC, "Get the privilege name",               "" },
706         { "lsaenumsid",          RPC_RTYPE_NTSTATUS, cmd_lsa_enum_sids,          NULL, PI_LSARPC, "Enumerate the LSA SIDS",               "" },
707         { "lsaenumprivsaccount", RPC_RTYPE_NTSTATUS, cmd_lsa_enum_privsaccounts, NULL, PI_LSARPC, "Enumerate the privileges of an SID",   "" },
708         { "lsaenumacctrights",   RPC_RTYPE_NTSTATUS, cmd_lsa_enum_acct_rights,   NULL, PI_LSARPC, "Enumerate the rights of an SID",   "" },
709         { "lsaaddacctrights",    RPC_RTYPE_NTSTATUS, cmd_lsa_add_acct_rights,    NULL, PI_LSARPC, "Add rights to an account",   "" },
710         { "lsaremoveacctrights", RPC_RTYPE_NTSTATUS, cmd_lsa_remove_acct_rights, NULL, PI_LSARPC, "Remove rights from an account",   "" },
711         { "lsalookupprivvalue",  RPC_RTYPE_NTSTATUS, cmd_lsa_lookupprivvalue,    NULL, PI_LSARPC, "Get a privilege value given its name", "" },
712         { "lsaquerysecobj",      RPC_RTYPE_NTSTATUS, cmd_lsa_query_secobj,       NULL, PI_LSARPC, "Query LSA security object", "" },
713
714         { NULL }
715 };