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