This commit was manufactured by cvs2svn to create branch 'SAMBA_3_0'.(This used to...
[amitay/samba.git] / source3 / rpc_server / srv_lsa.c
1 /* 
2  *  Unix SMB/CIFS implementation.
3  *  RPC Pipe client / server routines
4  *  Copyright (C) Andrew Tridgell              1992-1997,
5  *  Copyright (C) Luke Kenneth Casson Leighton 1996-1997,
6  *  Copyright (C) Paul Ashton                       1997,
7  *  Copyright (C) Jeremy Allison                    2001,
8  *  Copyright (C) Jim McDonough                     2002.
9  *
10  *  This program is free software; you can redistribute it and/or modify
11  *  it under the terms of the GNU General Public License as published by
12  *  the Free Software Foundation; either version 2 of the License, or
13  *  (at your option) any later version.
14  *  
15  *  This program is distributed in the hope that it will be useful,
16  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
17  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18  *  GNU General Public License for more details.
19  *  
20  *  You should have received a copy of the GNU General Public License
21  *  along with this program; if not, write to the Free Software
22  *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
23  */
24
25 /* This is the interface to the lsa server code. */
26
27 #include "includes.h"
28
29 #undef DBGC_CLASS
30 #define DBGC_CLASS DBGC_RPC_SRV
31
32 /***************************************************************************
33  api_lsa_open_policy2
34  ***************************************************************************/
35
36 static BOOL api_lsa_open_policy2(pipes_struct *p)
37 {
38         LSA_Q_OPEN_POL2 q_u;
39         LSA_R_OPEN_POL2 r_u;
40         prs_struct *data = &p->in_data.data;
41         prs_struct *rdata = &p->out_data.rdata;
42
43         ZERO_STRUCT(q_u);
44         ZERO_STRUCT(r_u);
45
46         /* grab the server, object attributes and desired access flag...*/
47         if(!lsa_io_q_open_pol2("", &q_u, data, 0)) {
48                 DEBUG(0,("api_lsa_open_policy2: unable to unmarshall LSA_Q_OPEN_POL2.\n"));
49                 return False;
50         }
51
52         r_u.status = _lsa_open_policy2(p, &q_u, &r_u);
53
54         /* store the response in the SMB stream */
55         if(!lsa_io_r_open_pol2("", &r_u, rdata, 0)) {
56                 DEBUG(0,("api_lsa_open_policy2: unable to marshall LSA_R_OPEN_POL2.\n"));
57                 return False;
58         }
59
60         return True;
61 }
62
63 /***************************************************************************
64 api_lsa_open_policy
65  ***************************************************************************/
66
67 static BOOL api_lsa_open_policy(pipes_struct *p)
68 {
69         LSA_Q_OPEN_POL q_u;
70         LSA_R_OPEN_POL r_u;
71         prs_struct *data = &p->in_data.data;
72         prs_struct *rdata = &p->out_data.rdata;
73
74         ZERO_STRUCT(q_u);
75         ZERO_STRUCT(r_u);
76
77         /* grab the server, object attributes and desired access flag...*/
78         if(!lsa_io_q_open_pol("", &q_u, data, 0)) {
79                 DEBUG(0,("api_lsa_open_policy: unable to unmarshall LSA_Q_OPEN_POL.\n"));
80                 return False;
81         }
82
83         r_u.status = _lsa_open_policy(p, &q_u, &r_u);
84
85         /* store the response in the SMB stream */
86         if(!lsa_io_r_open_pol("", &r_u, rdata, 0)) {
87                 DEBUG(0,("api_lsa_open_policy: unable to marshall LSA_R_OPEN_POL.\n"));
88                 return False;
89         }
90
91         return True;
92 }
93
94 /***************************************************************************
95  api_lsa_enum_trust_dom
96  ***************************************************************************/
97
98 static BOOL api_lsa_enum_trust_dom(pipes_struct *p)
99 {
100         LSA_Q_ENUM_TRUST_DOM q_u;
101         LSA_R_ENUM_TRUST_DOM r_u;
102         prs_struct *data = &p->in_data.data;
103         prs_struct *rdata = &p->out_data.rdata;
104
105         ZERO_STRUCT(q_u);
106         ZERO_STRUCT(r_u);
107
108         /* grab the enum trust domain context etc. */
109         if(!lsa_io_q_enum_trust_dom("", &q_u, data, 0))
110                 return False;
111
112         /* get required trusted domains information */
113         r_u.status = _lsa_enum_trust_dom(p, &q_u, &r_u);
114
115         /* prepare the response */
116         if(!lsa_io_r_enum_trust_dom("", &r_u, rdata, 0))
117                 return False;
118
119         return True;
120 }
121
122 /***************************************************************************
123  api_lsa_query_info
124  ***************************************************************************/
125
126 static BOOL api_lsa_query_info(pipes_struct *p)
127 {
128         LSA_Q_QUERY_INFO q_u;
129         LSA_R_QUERY_INFO r_u;
130         prs_struct *data = &p->in_data.data;
131         prs_struct *rdata = &p->out_data.rdata;
132
133         ZERO_STRUCT(q_u);
134         ZERO_STRUCT(r_u);
135
136         /* grab the info class and policy handle */
137         if(!lsa_io_q_query("", &q_u, data, 0)) {
138                 DEBUG(0,("api_lsa_query_info: failed to unmarshall LSA_Q_QUERY_INFO.\n"));
139                 return False;
140         }
141
142         r_u.status = _lsa_query_info(p, &q_u, &r_u);
143
144         /* store the response in the SMB stream */
145         if(!lsa_io_r_query("", &r_u, rdata, 0)) {
146                 DEBUG(0,("api_lsa_query_info: failed to marshall LSA_R_QUERY_INFO.\n"));
147                 return False;
148         }
149
150         return True;
151 }
152
153 /***************************************************************************
154  api_lsa_lookup_sids
155  ***************************************************************************/
156
157 static BOOL api_lsa_lookup_sids(pipes_struct *p)
158 {
159         LSA_Q_LOOKUP_SIDS q_u;
160         LSA_R_LOOKUP_SIDS r_u;
161         prs_struct *data = &p->in_data.data;
162         prs_struct *rdata = &p->out_data.rdata;
163
164         ZERO_STRUCT(q_u);
165         ZERO_STRUCT(r_u);
166
167         /* grab the info class and policy handle */
168         if(!lsa_io_q_lookup_sids("", &q_u, data, 0)) {
169                 DEBUG(0,("api_lsa_lookup_sids: failed to unmarshall LSA_Q_LOOKUP_SIDS.\n"));
170                 return False;
171         }
172
173         r_u.status = _lsa_lookup_sids(p, &q_u, &r_u);
174
175         if(!lsa_io_r_lookup_sids("", &r_u, rdata, 0)) {
176                 DEBUG(0,("api_lsa_lookup_sids: Failed to marshall LSA_R_LOOKUP_SIDS.\n"));
177                 return False;
178         }
179
180         return True;
181 }
182
183 /***************************************************************************
184  api_lsa_lookup_names
185  ***************************************************************************/
186
187 static BOOL api_lsa_lookup_names(pipes_struct *p)
188 {
189         LSA_Q_LOOKUP_NAMES q_u;
190         LSA_R_LOOKUP_NAMES r_u;
191         prs_struct *data = &p->in_data.data;
192         prs_struct *rdata = &p->out_data.rdata;
193
194         ZERO_STRUCT(q_u);
195         ZERO_STRUCT(r_u);
196
197         /* grab the info class and policy handle */
198         if(!lsa_io_q_lookup_names("", &q_u, data, 0)) {
199                 DEBUG(0,("api_lsa_lookup_names: failed to unmarshall LSA_Q_LOOKUP_NAMES.\n"));
200                 return False;
201         }
202
203         r_u.status = _lsa_lookup_names(p, &q_u, &r_u);
204
205         /* store the response in the SMB stream */
206         if(!lsa_io_r_lookup_names("", &r_u, rdata, 0)) {
207                 DEBUG(0,("api_lsa_lookup_names: Failed to marshall LSA_R_LOOKUP_NAMES.\n"));
208                 return False;
209         }
210
211         return True;
212 }
213
214 /***************************************************************************
215  api_lsa_close.
216  ***************************************************************************/
217
218 static BOOL api_lsa_close(pipes_struct *p)
219 {
220         LSA_Q_CLOSE q_u;
221         LSA_R_CLOSE r_u;
222         prs_struct *data = &p->in_data.data;
223         prs_struct *rdata = &p->out_data.rdata;
224
225         ZERO_STRUCT(q_u);
226         ZERO_STRUCT(r_u);
227
228         if (!lsa_io_q_close("", &q_u, data, 0)) {
229                 DEBUG(0,("api_lsa_close: lsa_io_q_close failed.\n"));
230                 return False;
231         }
232
233         r_u.status = _lsa_close(p, &q_u, &r_u);
234
235         /* store the response in the SMB stream */
236         if (!lsa_io_r_close("", &r_u, rdata, 0)) {
237                 DEBUG(0,("api_lsa_close: lsa_io_r_close failed.\n"));
238                 return False;
239         }
240
241         return True;
242 }
243
244 /***************************************************************************
245  api_lsa_open_secret.
246  ***************************************************************************/
247
248 static BOOL api_lsa_open_secret(pipes_struct *p)
249 {
250         LSA_Q_OPEN_SECRET q_u;
251         LSA_R_OPEN_SECRET r_u;
252         prs_struct *data = &p->in_data.data;
253         prs_struct *rdata = &p->out_data.rdata;
254
255         ZERO_STRUCT(q_u);
256         ZERO_STRUCT(r_u);
257
258         if(!lsa_io_q_open_secret("", &q_u, data, 0)) {
259                 DEBUG(0,("api_lsa_open_secret: failed to unmarshall LSA_Q_OPEN_SECRET.\n"));
260                 return False;
261         }
262
263         r_u.status = _lsa_open_secret(p, &q_u, &r_u);
264
265         /* store the response in the SMB stream */
266         if(!lsa_io_r_open_secret("", &r_u, rdata, 0)) {
267                 DEBUG(0,("api_lsa_open_secret: Failed to marshall LSA_R_OPEN_SECRET.\n"));
268                 return False;
269         }
270
271         return True;
272 }
273
274 /***************************************************************************
275  api_lsa_open_secret.
276  ***************************************************************************/
277
278 static BOOL api_lsa_enum_privs(pipes_struct *p)
279 {
280         LSA_Q_ENUM_PRIVS q_u;
281         LSA_R_ENUM_PRIVS r_u;
282         prs_struct *data = &p->in_data.data;
283         prs_struct *rdata = &p->out_data.rdata;
284
285         ZERO_STRUCT(q_u);
286         ZERO_STRUCT(r_u);
287
288         if(!lsa_io_q_enum_privs("", &q_u, data, 0)) {
289                 DEBUG(0,("api_lsa_enum_privs: failed to unmarshall LSA_Q_ENUM_PRIVS.\n"));
290                 return False;
291         }
292
293         r_u.status = _lsa_enum_privs(p, &q_u, &r_u);
294
295         /* store the response in the SMB stream */
296         if(!lsa_io_r_enum_privs("", &r_u, rdata, 0)) {
297                 DEBUG(0,("api_lsa_enum_privs: Failed to marshall LSA_R_ENUM_PRIVS.\n"));
298                 return False;
299         }
300
301         return True;
302 }
303
304 /***************************************************************************
305  api_lsa_open_secret.
306  ***************************************************************************/
307
308 static BOOL api_lsa_priv_get_dispname(pipes_struct *p)
309 {
310         LSA_Q_PRIV_GET_DISPNAME q_u;
311         LSA_R_PRIV_GET_DISPNAME r_u;
312         prs_struct *data = &p->in_data.data;
313         prs_struct *rdata = &p->out_data.rdata;
314
315         ZERO_STRUCT(q_u);
316         ZERO_STRUCT(r_u);
317
318         if(!lsa_io_q_priv_get_dispname("", &q_u, data, 0)) {
319                 DEBUG(0,("api_lsa_priv_get_dispname: failed to unmarshall LSA_Q_PRIV_GET_DISPNAME.\n"));
320                 return False;
321         }
322
323         r_u.status = _lsa_priv_get_dispname(p, &q_u, &r_u);
324
325         /* store the response in the SMB stream */
326         if(!lsa_io_r_priv_get_dispname("", &r_u, rdata, 0)) {
327                 DEBUG(0,("api_lsa_priv_get_dispname: Failed to marshall LSA_R_PRIV_GET_DISPNAME.\n"));
328                 return False;
329         }
330
331         return True;
332 }
333
334 /***************************************************************************
335  api_lsa_open_secret.
336  ***************************************************************************/
337
338 static BOOL api_lsa_enum_accounts(pipes_struct *p)
339 {
340         LSA_Q_ENUM_ACCOUNTS q_u;
341         LSA_R_ENUM_ACCOUNTS r_u;
342         prs_struct *data = &p->in_data.data;
343         prs_struct *rdata = &p->out_data.rdata;
344
345         ZERO_STRUCT(q_u);
346         ZERO_STRUCT(r_u);
347
348         if(!lsa_io_q_enum_accounts("", &q_u, data, 0)) {
349                 DEBUG(0,("api_lsa_enum_accounts: failed to unmarshall LSA_Q_ENUM_ACCOUNTS.\n"));
350                 return False;
351         }
352
353         r_u.status = _lsa_enum_accounts(p, &q_u, &r_u);
354
355         /* store the response in the SMB stream */
356         if(!lsa_io_r_enum_accounts("", &r_u, rdata, 0)) {
357                 DEBUG(0,("api_lsa_enum_accounts: Failed to marshall LSA_R_ENUM_ACCOUNTS.\n"));
358                 return False;
359         }
360
361         return True;
362 }
363
364 /***************************************************************************
365  api_lsa_UNK_GET_CONNUSER
366  ***************************************************************************/
367
368 static BOOL api_lsa_unk_get_connuser(pipes_struct *p)
369 {
370         LSA_Q_UNK_GET_CONNUSER q_u;
371         LSA_R_UNK_GET_CONNUSER r_u;
372         
373         prs_struct *data = &p->in_data.data;
374         prs_struct *rdata = &p->out_data.rdata;
375
376         ZERO_STRUCT(q_u);
377         ZERO_STRUCT(r_u);
378
379         if(!lsa_io_q_unk_get_connuser("", &q_u, data, 0)) {
380                 DEBUG(0,("api_lsa_unk_get_connuser: failed to unmarshall LSA_Q_UNK_GET_CONNUSER.\n"));
381                 return False;
382         }
383
384         r_u.status = _lsa_unk_get_connuser(p, &q_u, &r_u);
385
386         /* store the response in the SMB stream */
387         if(!lsa_io_r_unk_get_connuser("", &r_u, rdata, 0)) {
388                 DEBUG(0,("api_lsa_unk_get_connuser: Failed to marshall LSA_R_UNK_GET_CONNUSER.\n"));
389                 return False;
390         }
391
392         return True;
393 }
394
395 /***************************************************************************
396  api_lsa_open_user
397  ***************************************************************************/
398
399 static BOOL api_lsa_open_account(pipes_struct *p)
400 {
401         LSA_Q_OPENACCOUNT q_u;
402         LSA_R_OPENACCOUNT r_u;
403         
404         prs_struct *data = &p->in_data.data;
405         prs_struct *rdata = &p->out_data.rdata;
406
407         ZERO_STRUCT(q_u);
408         ZERO_STRUCT(r_u);
409
410         if(!lsa_io_q_open_account("", &q_u, data, 0)) {
411                 DEBUG(0,("api_lsa_open_account: failed to unmarshall LSA_Q_OPENACCOUNT.\n"));
412                 return False;
413         }
414
415         r_u.status = _lsa_open_account(p, &q_u, &r_u);
416
417         /* store the response in the SMB stream */
418         if(!lsa_io_r_open_account("", &r_u, rdata, 0)) {
419                 DEBUG(0,("api_lsa_open_account: Failed to marshall LSA_R_OPENACCOUNT.\n"));
420                 return False;
421         }
422
423         return True;
424 }
425
426 /***************************************************************************
427  api_lsa_get_privs
428  ***************************************************************************/
429
430 static BOOL api_lsa_enum_privsaccount(pipes_struct *p)
431 {
432         LSA_Q_ENUMPRIVSACCOUNT q_u;
433         LSA_R_ENUMPRIVSACCOUNT r_u;
434         
435         prs_struct *data = &p->in_data.data;
436         prs_struct *rdata = &p->out_data.rdata;
437
438         ZERO_STRUCT(q_u);
439         ZERO_STRUCT(r_u);
440
441         if(!lsa_io_q_enum_privsaccount("", &q_u, data, 0)) {
442                 DEBUG(0,("api_lsa_enum_privsaccount: failed to unmarshall LSA_Q_ENUMPRIVSACCOUNT.\n"));
443                 return False;
444         }
445
446         r_u.status = _lsa_enum_privsaccount(p, &q_u, &r_u);
447
448         /* store the response in the SMB stream */
449         if(!lsa_io_r_enum_privsaccount("", &r_u, rdata, 0)) {
450                 DEBUG(0,("api_lsa_enum_privsaccount: Failed to marshall LSA_R_ENUMPRIVSACCOUNT.\n"));
451                 return False;
452         }
453
454         return True;
455 }
456
457 /***************************************************************************
458  api_lsa_getsystemaccount
459  ***************************************************************************/
460
461 static BOOL api_lsa_getsystemaccount(pipes_struct *p)
462 {
463         LSA_Q_GETSYSTEMACCOUNT q_u;
464         LSA_R_GETSYSTEMACCOUNT r_u;
465         
466         prs_struct *data = &p->in_data.data;
467         prs_struct *rdata = &p->out_data.rdata;
468
469         ZERO_STRUCT(q_u);
470         ZERO_STRUCT(r_u);
471
472         if(!lsa_io_q_getsystemaccount("", &q_u, data, 0)) {
473                 DEBUG(0,("api_lsa_getsystemaccount: failed to unmarshall LSA_Q_GETSYSTEMACCOUNT.\n"));
474                 return False;
475         }
476
477         r_u.status = _lsa_getsystemaccount(p, &q_u, &r_u);
478
479         /* store the response in the SMB stream */
480         if(!lsa_io_r_getsystemaccount("", &r_u, rdata, 0)) {
481                 DEBUG(0,("api_lsa_getsystemaccount: Failed to marshall LSA_R_GETSYSTEMACCOUNT.\n"));
482                 return False;
483         }
484
485         return True;
486 }
487
488
489 /***************************************************************************
490  api_lsa_setsystemaccount
491  ***************************************************************************/
492
493 static BOOL api_lsa_setsystemaccount(pipes_struct *p)
494 {
495         LSA_Q_SETSYSTEMACCOUNT q_u;
496         LSA_R_SETSYSTEMACCOUNT r_u;
497         
498         prs_struct *data = &p->in_data.data;
499         prs_struct *rdata = &p->out_data.rdata;
500
501         ZERO_STRUCT(q_u);
502         ZERO_STRUCT(r_u);
503
504         if(!lsa_io_q_setsystemaccount("", &q_u, data, 0)) {
505                 DEBUG(0,("api_lsa_setsystemaccount: failed to unmarshall LSA_Q_SETSYSTEMACCOUNT.\n"));
506                 return False;
507         }
508
509         r_u.status = _lsa_setsystemaccount(p, &q_u, &r_u);
510
511         /* store the response in the SMB stream */
512         if(!lsa_io_r_setsystemaccount("", &r_u, rdata, 0)) {
513                 DEBUG(0,("api_lsa_setsystemaccount: Failed to marshall LSA_R_SETSYSTEMACCOUNT.\n"));
514                 return False;
515         }
516
517         return True;
518 }
519
520 /***************************************************************************
521  api_lsa_addprivs
522  ***************************************************************************/
523
524 static BOOL api_lsa_addprivs(pipes_struct *p)
525 {
526         LSA_Q_ADDPRIVS q_u;
527         LSA_R_ADDPRIVS r_u;
528         
529         prs_struct *data = &p->in_data.data;
530         prs_struct *rdata = &p->out_data.rdata;
531
532         ZERO_STRUCT(q_u);
533         ZERO_STRUCT(r_u);
534
535         if(!lsa_io_q_addprivs("", &q_u, data, 0)) {
536                 DEBUG(0,("api_lsa_addprivs: failed to unmarshall LSA_Q_ADDPRIVS.\n"));
537                 return False;
538         }
539
540         r_u.status = _lsa_addprivs(p, &q_u, &r_u);
541
542         /* store the response in the SMB stream */
543         if(!lsa_io_r_addprivs("", &r_u, rdata, 0)) {
544                 DEBUG(0,("api_lsa_addprivs: Failed to marshall LSA_R_ADDPRIVS.\n"));
545                 return False;
546         }
547
548         return True;
549 }
550
551 /***************************************************************************
552  api_lsa_removeprivs
553  ***************************************************************************/
554
555 static BOOL api_lsa_removeprivs(pipes_struct *p)
556 {
557         LSA_Q_REMOVEPRIVS q_u;
558         LSA_R_REMOVEPRIVS r_u;
559         
560         prs_struct *data = &p->in_data.data;
561         prs_struct *rdata = &p->out_data.rdata;
562
563         ZERO_STRUCT(q_u);
564         ZERO_STRUCT(r_u);
565
566         if(!lsa_io_q_removeprivs("", &q_u, data, 0)) {
567                 DEBUG(0,("api_lsa_removeprivs: failed to unmarshall LSA_Q_REMOVEPRIVS.\n"));
568                 return False;
569         }
570
571         r_u.status = _lsa_removeprivs(p, &q_u, &r_u);
572
573         /* store the response in the SMB stream */
574         if(!lsa_io_r_removeprivs("", &r_u, rdata, 0)) {
575                 DEBUG(0,("api_lsa_removeprivs: Failed to marshall LSA_R_REMOVEPRIVS.\n"));
576                 return False;
577         }
578
579         return True;
580 }
581
582 /***************************************************************************
583  api_lsa_query_secobj
584  ***************************************************************************/
585
586 static BOOL api_lsa_query_secobj(pipes_struct *p)
587 {
588         LSA_Q_QUERY_SEC_OBJ q_u;
589         LSA_R_QUERY_SEC_OBJ r_u;
590         
591         prs_struct *data = &p->in_data.data;
592         prs_struct *rdata = &p->out_data.rdata;
593
594         ZERO_STRUCT(q_u);
595         ZERO_STRUCT(r_u);
596
597         if(!lsa_io_q_query_sec_obj("", &q_u, data, 0)) {
598                 DEBUG(0,("api_lsa_query_secobj: failed to unmarshall LSA_Q_QUERY_SEC_OBJ.\n"));
599                 return False;
600         }
601
602         r_u.status = _lsa_query_secobj(p, &q_u, &r_u);
603
604         /* store the response in the SMB stream */
605         if(!lsa_io_r_query_sec_obj("", &r_u, rdata, 0)) {
606                 DEBUG(0,("api_lsa_query_secobj: Failed to marshall LSA_R_QUERY_SEC_OBJ.\n"));
607                 return False;
608         }
609
610         return True;
611 }
612
613 /***************************************************************************
614  api_lsa_query_dnsdomainfo
615  ***************************************************************************/
616
617 static BOOL api_lsa_query_info2(pipes_struct *p)
618 {
619         LSA_Q_QUERY_INFO2 q_u;
620         LSA_R_QUERY_INFO2 r_u;
621
622         prs_struct *data = &p->in_data.data;
623         prs_struct *rdata = &p->out_data.rdata;
624
625         ZERO_STRUCT(q_u);
626         ZERO_STRUCT(r_u);
627
628         if(!lsa_io_q_query_info2("", &q_u, data, 0)) {
629                 DEBUG(0,("api_lsa_query_info2: failed to unmarshall LSA_Q_QUERY_INFO2.\n"));
630                 return False;
631         }
632
633         r_u.status = _lsa_query_info2(p, &q_u, &r_u);
634
635         if (!lsa_io_r_query_info2("", &r_u, rdata, 0)) {
636                 DEBUG(0,("api_lsa_query_info2: failed to marshall LSA_R_QUERY_INFO2.\n"));
637                 return False;
638         }
639
640         return True;
641 }
642
643
644 /***************************************************************************
645  \PIPE\ntlsa commands
646  ***************************************************************************/
647
648 static struct api_struct api_lsa_cmds[] =
649 {
650         { "LSA_OPENPOLICY2"     , LSA_OPENPOLICY2     , api_lsa_open_policy2     },
651         { "LSA_OPENPOLICY"      , LSA_OPENPOLICY      , api_lsa_open_policy      },
652         { "LSA_QUERYINFOPOLICY" , LSA_QUERYINFOPOLICY , api_lsa_query_info       },
653         { "LSA_ENUMTRUSTDOM"    , LSA_ENUMTRUSTDOM    , api_lsa_enum_trust_dom   },
654         { "LSA_CLOSE"           , LSA_CLOSE           , api_lsa_close            },
655         { "LSA_OPENSECRET"      , LSA_OPENSECRET      , api_lsa_open_secret      },
656         { "LSA_LOOKUPSIDS"      , LSA_LOOKUPSIDS      , api_lsa_lookup_sids      },
657         { "LSA_LOOKUPNAMES"     , LSA_LOOKUPNAMES     , api_lsa_lookup_names     },
658         { "LSA_ENUM_PRIVS"      , LSA_ENUM_PRIVS      , api_lsa_enum_privs       },
659         { "LSA_PRIV_GET_DISPNAME",LSA_PRIV_GET_DISPNAME,api_lsa_priv_get_dispname},
660         { "LSA_ENUM_ACCOUNTS"   , LSA_ENUM_ACCOUNTS   , api_lsa_enum_accounts    },
661         { "LSA_UNK_GET_CONNUSER", LSA_UNK_GET_CONNUSER, api_lsa_unk_get_connuser },
662         { "LSA_OPENACCOUNT"     , LSA_OPENACCOUNT     , api_lsa_open_account     },
663         { "LSA_ENUMPRIVSACCOUNT", LSA_ENUMPRIVSACCOUNT, api_lsa_enum_privsaccount},
664         { "LSA_GETSYSTEMACCOUNT", LSA_GETSYSTEMACCOUNT, api_lsa_getsystemaccount },
665         { "LSA_SETSYSTEMACCOUNT", LSA_SETSYSTEMACCOUNT, api_lsa_setsystemaccount },
666         { "LSA_ADDPRIVS"        , LSA_ADDPRIVS        , api_lsa_addprivs         },
667         { "LSA_REMOVEPRIVS"     , LSA_REMOVEPRIVS     , api_lsa_removeprivs      },
668         { "LSA_QUERYSECOBJ"     , LSA_QUERYSECOBJ     , api_lsa_query_secobj     },
669         { "LSA_QUERYINFO2"      , LSA_QUERYINFO2      , api_lsa_query_info2      },
670         { NULL                  , 0                   , NULL                     }
671 };
672
673 /***************************************************************************
674  api_ntLsarpcTNP
675  ***************************************************************************/
676 BOOL api_ntlsa_rpc(pipes_struct *p)
677 {
678         return api_rpcTNP(p, "api_ntlsa_rpc", api_lsa_cmds);
679 }