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