Removed version number from file header.
[Samba/ekacnet.git] / source / rpc_server / srv_samr.c
blobc555305bceb956fa2c31d6803e8b43e8425ba0d3
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) Marc Jacobsen 1999.
8 * Copyright (C) Jean François Micouleau 1998-2001.
9 *
10 * Split into interface and implementation modules by,
12 * Copyright (C) Jeremy Allison 2001.
14 * This program is free software; you can redistribute it and/or modify
15 * it under the terms of the GNU General Public License as published by
16 * the Free Software Foundation; either version 2 of the License, or
17 * (at your option) any later version.
19 * This program is distributed in the hope that it will be useful,
20 * but WITHOUT ANY WARRANTY; without even the implied warranty of
21 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
22 * GNU General Public License for more details.
24 * You should have received a copy of the GNU General Public License
25 * along with this program; if not, write to the Free Software
26 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
30 * This is the interface to the SAMR code.
33 #include "includes.h"
35 /*******************************************************************
36 api_samr_close_hnd
37 ********************************************************************/
39 static BOOL api_samr_close_hnd(pipes_struct *p)
41 SAMR_Q_CLOSE_HND q_u;
42 SAMR_R_CLOSE_HND r_u;
43 prs_struct *data = &p->in_data.data;
44 prs_struct *rdata = &p->out_data.rdata;
46 ZERO_STRUCT(q_u);
47 ZERO_STRUCT(r_u);
49 if(!samr_io_q_close_hnd("", &q_u, data, 0)) {
50 DEBUG(0,("api_samr_close_hnd: unable to unmarshall SAMR_Q_CLOSE_HND.\n"));
51 return False;
54 r_u.status = _samr_close_hnd(p, &q_u, &r_u);
56 /* store the response in the SMB stream */
57 if(!samr_io_r_close_hnd("", &r_u, rdata, 0)) {
58 DEBUG(0,("api_samr_close_hnd: unable to marshall SAMR_R_CLOSE_HND.\n"));
59 return False;
62 return True;
65 /*******************************************************************
66 api_samr_open_domain
67 ********************************************************************/
69 static BOOL api_samr_open_domain(pipes_struct *p)
71 SAMR_Q_OPEN_DOMAIN q_u;
72 SAMR_R_OPEN_DOMAIN r_u;
74 prs_struct *data = &p->in_data.data;
75 prs_struct *rdata = &p->out_data.rdata;
77 ZERO_STRUCT(q_u);
78 ZERO_STRUCT(r_u);
80 if(!samr_io_q_open_domain("", &q_u, data, 0)) {
81 DEBUG(0,("api_samr_open_domain: unable to unmarshall SAMR_Q_OPEN_DOMAIN.\n"));
82 return False;
85 r_u.status = _samr_open_domain(p, &q_u, &r_u);
87 /* store the response in the SMB stream */
88 if(!samr_io_r_open_domain("", &r_u, rdata, 0)) {
89 DEBUG(0,("api_samr_open_domain: unable to marshall SAMR_R_OPEN_DOMAIN.\n"));
90 return False;
93 return True;
96 /*******************************************************************
97 api_samr_get_usrdom_pwinfo
98 ********************************************************************/
100 static BOOL api_samr_get_usrdom_pwinfo(pipes_struct *p)
102 SAMR_Q_GET_USRDOM_PWINFO q_u;
103 SAMR_R_GET_USRDOM_PWINFO r_u;
105 prs_struct *data = &p->in_data.data;
106 prs_struct *rdata = &p->out_data.rdata;
108 ZERO_STRUCT(q_u);
109 ZERO_STRUCT(r_u);
111 if(!samr_io_q_get_usrdom_pwinfo("", &q_u, data, 0)) {
112 DEBUG(0,("api_samr_get_usrdom_pwinfo: unable to unmarshall SAMR_Q_GET_USRDOM_PWINFO.\n"));
113 return False;
116 r_u.status = _samr_get_usrdom_pwinfo(p, &q_u, &r_u);
118 if(!samr_io_r_get_usrdom_pwinfo("", &r_u, rdata, 0)) {
119 DEBUG(0,("api_samr_get_usrdom_pwinfo: unable to marshall SAMR_R_GET_USRDOM_PWINFO.\n"));
120 return False;
123 return True;
126 /*******************************************************************
127 api_samr_query_sec_obj
128 ********************************************************************/
130 static BOOL api_samr_query_sec_obj(pipes_struct *p)
132 SAMR_Q_QUERY_SEC_OBJ q_u;
133 SAMR_R_QUERY_SEC_OBJ r_u;
135 prs_struct *data = &p->in_data.data;
136 prs_struct *rdata = &p->out_data.rdata;
138 ZERO_STRUCT(q_u);
139 ZERO_STRUCT(r_u);
141 if(!samr_io_q_query_sec_obj("", &q_u, data, 0)) {
142 DEBUG(0,("api_samr_query_sec_obj: unable to unmarshall SAMR_Q_QUERY_SEC_OBJ.\n"));
143 return False;
146 r_u.status = _samr_query_sec_obj(p, &q_u, &r_u);
148 if(!samr_io_r_query_sec_obj("", &r_u, rdata, 0)) {
149 DEBUG(0,("api_samr_query_sec_obj: unable to marshall SAMR_R_QUERY_SEC_OBJ.\n"));
150 return False;
153 return True;
156 /*******************************************************************
157 api_samr_enum_dom_users
158 ********************************************************************/
160 static BOOL api_samr_enum_dom_users(pipes_struct *p)
162 SAMR_Q_ENUM_DOM_USERS q_u;
163 SAMR_R_ENUM_DOM_USERS r_u;
164 prs_struct *data = &p->in_data.data;
165 prs_struct *rdata = &p->out_data.rdata;
167 ZERO_STRUCT(q_u);
168 ZERO_STRUCT(r_u);
170 /* grab the samr open */
171 if(!samr_io_q_enum_dom_users("", &q_u, data, 0)) {
172 DEBUG(0,("api_samr_enum_dom_users: unable to unmarshall SAMR_Q_ENUM_DOM_USERS.\n"));
173 return False;
176 r_u.status = _samr_enum_dom_users(p, &q_u, &r_u);
178 /* store the response in the SMB stream */
179 if(!samr_io_r_enum_dom_users("", &r_u, rdata, 0)) {
180 DEBUG(0,("api_samr_enum_dom_users: unable to marshall SAMR_R_ENUM_DOM_USERS.\n"));
181 return False;
184 return True;
187 /*******************************************************************
188 api_samr_enum_dom_groups
189 ********************************************************************/
191 static BOOL api_samr_enum_dom_groups(pipes_struct *p)
193 SAMR_Q_ENUM_DOM_GROUPS q_u;
194 SAMR_R_ENUM_DOM_GROUPS r_u;
195 prs_struct *data = &p->in_data.data;
196 prs_struct *rdata = &p->out_data.rdata;
198 ZERO_STRUCT(q_u);
199 ZERO_STRUCT(r_u);
201 /* grab the samr open */
202 if(!samr_io_q_enum_dom_groups("", &q_u, data, 0)) {
203 DEBUG(0,("api_samr_enum_dom_groups: unable to unmarshall SAMR_Q_ENUM_DOM_GROUPS.\n"));
204 return False;
207 r_u.status = _samr_enum_dom_groups(p, &q_u, &r_u);
209 /* store the response in the SMB stream */
210 if(!samr_io_r_enum_dom_groups("", &r_u, rdata, 0)) {
211 DEBUG(0,("api_samr_enum_dom_groups: unable to marshall SAMR_R_ENUM_DOM_GROUPS.\n"));
212 return False;
215 return True;
218 /*******************************************************************
219 api_samr_enum_dom_aliases
220 ********************************************************************/
222 static BOOL api_samr_enum_dom_aliases(pipes_struct *p)
224 SAMR_Q_ENUM_DOM_ALIASES q_u;
225 SAMR_R_ENUM_DOM_ALIASES r_u;
226 prs_struct *data = &p->in_data.data;
227 prs_struct *rdata = &p->out_data.rdata;
229 ZERO_STRUCT(q_u);
230 ZERO_STRUCT(r_u);
232 /* grab the samr open */
233 if(!samr_io_q_enum_dom_aliases("", &q_u, data, 0)) {
234 DEBUG(0,("api_samr_enum_dom_aliases: unable to unmarshall SAMR_Q_ENUM_DOM_ALIASES.\n"));
235 return False;
238 r_u.status = _samr_enum_dom_aliases(p, &q_u, &r_u);
240 /* store the response in the SMB stream */
241 if(!samr_io_r_enum_dom_aliases("", &r_u, rdata, 0)) {
242 DEBUG(0,("api_samr_enum_dom_aliases: unable to marshall SAMR_R_ENUM_DOM_ALIASES.\n"));
243 return False;
246 return True;
249 /*******************************************************************
250 api_samr_query_dispinfo
251 ********************************************************************/
253 static BOOL api_samr_query_dispinfo(pipes_struct *p)
255 SAMR_Q_QUERY_DISPINFO q_u;
256 SAMR_R_QUERY_DISPINFO r_u;
257 prs_struct *data = &p->in_data.data;
258 prs_struct *rdata = &p->out_data.rdata;
260 ZERO_STRUCT(q_u);
261 ZERO_STRUCT(r_u);
263 if(!samr_io_q_query_dispinfo("", &q_u, data, 0)) {
264 DEBUG(0,("api_samr_query_dispinfo: unable to unmarshall SAMR_Q_QUERY_DISPINFO.\n"));
265 return False;
268 r_u.status = _samr_query_dispinfo(p, &q_u, &r_u);
270 /* store the response in the SMB stream */
271 if(!samr_io_r_query_dispinfo("", &r_u, rdata, 0)) {
272 DEBUG(0,("api_samr_query_dispinfo: unable to marshall SAMR_R_QUERY_DISPINFO.\n"));
273 return False;
276 return True;
279 /*******************************************************************
280 api_samr_query_aliasinfo
281 ********************************************************************/
283 static BOOL api_samr_query_aliasinfo(pipes_struct *p)
285 SAMR_Q_QUERY_ALIASINFO q_u;
286 SAMR_R_QUERY_ALIASINFO r_u;
287 prs_struct *data = &p->in_data.data;
288 prs_struct *rdata = &p->out_data.rdata;
290 ZERO_STRUCT(q_u);
291 ZERO_STRUCT(r_u);
293 /* grab the samr open */
294 if(!samr_io_q_query_aliasinfo("", &q_u, data, 0)) {
295 DEBUG(0,("api_samr_query_aliasinfo: unable to unmarshall SAMR_Q_QUERY_ALIASINFO.\n"));
296 return False;
299 r_u.status = _samr_query_aliasinfo(p, &q_u, &r_u);
301 /* store the response in the SMB stream */
302 if(!samr_io_r_query_aliasinfo("", &r_u, rdata, 0)) {
303 DEBUG(0,("api_samr_query_aliasinfo: unable to marshall SAMR_R_QUERY_ALIASINFO.\n"));
304 return False;
307 return True;
310 /*******************************************************************
311 api_samr_lookup_names
312 ********************************************************************/
314 static BOOL api_samr_lookup_names(pipes_struct *p)
316 SAMR_Q_LOOKUP_NAMES q_u;
317 SAMR_R_LOOKUP_NAMES r_u;
318 prs_struct *data = &p->in_data.data;
319 prs_struct *rdata = &p->out_data.rdata;
321 ZERO_STRUCT(q_u);
322 ZERO_STRUCT(r_u);
324 /* grab the samr lookup names */
325 if(!samr_io_q_lookup_names("", &q_u, data, 0)) {
326 DEBUG(0,("api_samr_lookup_names: unable to unmarshall SAMR_Q_LOOKUP_NAMES.\n"));
327 return False;
330 r_u.status = _samr_lookup_names(p, &q_u, &r_u);
332 /* store the response in the SMB stream */
333 if(!samr_io_r_lookup_names("", &r_u, rdata, 0)) {
334 DEBUG(0,("api_samr_lookup_names: unable to marshall SAMR_R_LOOKUP_NAMES.\n"));
335 return False;
338 return True;
341 /*******************************************************************
342 api_samr_chgpasswd_user
343 ********************************************************************/
345 static BOOL api_samr_chgpasswd_user(pipes_struct *p)
347 SAMR_Q_CHGPASSWD_USER q_u;
348 SAMR_R_CHGPASSWD_USER r_u;
349 prs_struct *data = &p->in_data.data;
350 prs_struct *rdata = &p->out_data.rdata;
352 ZERO_STRUCT(q_u);
353 ZERO_STRUCT(r_u);
355 /* unknown 38 command */
356 if (!samr_io_q_chgpasswd_user("", &q_u, data, 0)) {
357 DEBUG(0,("api_samr_chgpasswd_user: Failed to unmarshall SAMR_Q_CHGPASSWD_USER.\n"));
358 return False;
361 r_u.status = _samr_chgpasswd_user(p, &q_u, &r_u);
363 /* store the response in the SMB stream */
364 if(!samr_io_r_chgpasswd_user("", &r_u, rdata, 0)) {
365 DEBUG(0,("api_samr_chgpasswd_user: Failed to marshall SAMR_R_CHGPASSWD_USER.\n" ));
366 return False;
369 return True;
372 /*******************************************************************
373 api_samr_lookup_rids
374 ********************************************************************/
376 static BOOL api_samr_lookup_rids(pipes_struct *p)
378 SAMR_Q_LOOKUP_RIDS q_u;
379 SAMR_R_LOOKUP_RIDS r_u;
380 prs_struct *data = &p->in_data.data;
381 prs_struct *rdata = &p->out_data.rdata;
383 ZERO_STRUCT(q_u);
384 ZERO_STRUCT(r_u);
386 /* grab the samr lookup names */
387 if(!samr_io_q_lookup_rids("", &q_u, data, 0)) {
388 DEBUG(0,("api_samr_lookup_rids: unable to unmarshall SAMR_Q_LOOKUP_RIDS.\n"));
389 return False;
392 r_u.status = _samr_lookup_rids(p, &q_u, &r_u);
394 /* store the response in the SMB stream */
395 if(!samr_io_r_lookup_rids("", &r_u, rdata, 0)) {
396 DEBUG(0,("api_samr_lookup_rids: unable to marshall SAMR_R_LOOKUP_RIDS.\n"));
397 return False;
400 return True;
403 /*******************************************************************
404 api_samr_open_user
405 ********************************************************************/
407 static BOOL api_samr_open_user(pipes_struct *p)
409 SAMR_Q_OPEN_USER q_u;
410 SAMR_R_OPEN_USER r_u;
411 prs_struct *data = &p->in_data.data;
412 prs_struct *rdata = &p->out_data.rdata;
414 ZERO_STRUCT(q_u);
415 ZERO_STRUCT(r_u);
417 /* grab the samr unknown 22 */
418 if(!samr_io_q_open_user("", &q_u, data, 0)) {
419 DEBUG(0,("api_samr_open_user: unable to unmarshall SAMR_Q_OPEN_USER.\n"));
420 return False;
423 r_u.status = _api_samr_open_user(p, &q_u, &r_u);
425 /* store the response in the SMB stream */
426 if(!samr_io_r_open_user("", &r_u, rdata, 0)) {
427 DEBUG(0,("api_samr_open_user: unable to marshall SAMR_R_OPEN_USER.\n"));
428 return False;
431 return True;
434 /*******************************************************************
435 api_samr_query_userinfo
436 ********************************************************************/
438 static BOOL api_samr_query_userinfo(pipes_struct *p)
440 SAMR_Q_QUERY_USERINFO q_u;
441 SAMR_R_QUERY_USERINFO r_u;
442 prs_struct *data = &p->in_data.data;
443 prs_struct *rdata = &p->out_data.rdata;
445 ZERO_STRUCT(q_u);
446 ZERO_STRUCT(r_u);
448 /* grab the samr unknown 24 */
449 if(!samr_io_q_query_userinfo("", &q_u, data, 0)){
450 DEBUG(0,("api_samr_query_userinfo: unable to unmarshall SAMR_Q_QUERY_USERINFO.\n"));
451 return False;
454 r_u.status = _samr_query_userinfo(p, &q_u, &r_u);
456 /* store the response in the SMB stream */
457 if(!samr_io_r_query_userinfo("", &r_u, rdata, 0)) {
458 DEBUG(0,("api_samr_query_userinfo: unable to marshall SAMR_R_QUERY_USERINFO.\n"));
459 return False;
462 return True;
465 /*******************************************************************
466 api_samr_query_usergroups
467 ********************************************************************/
469 static BOOL api_samr_query_usergroups(pipes_struct *p)
471 SAMR_Q_QUERY_USERGROUPS q_u;
472 SAMR_R_QUERY_USERGROUPS r_u;
473 prs_struct *data = &p->in_data.data;
474 prs_struct *rdata = &p->out_data.rdata;
476 ZERO_STRUCT(q_u);
477 ZERO_STRUCT(r_u);
479 /* grab the samr unknown 32 */
480 if(!samr_io_q_query_usergroups("", &q_u, data, 0)) {
481 DEBUG(0,("api_samr_query_usergroups: unable to unmarshall SAMR_Q_QUERY_USERGROUPS.\n"));
482 return False;
485 r_u.status = _samr_query_usergroups(p, &q_u, &r_u);
487 /* store the response in the SMB stream */
488 if(!samr_io_r_query_usergroups("", &r_u, rdata, 0)) {
489 DEBUG(0,("api_samr_query_usergroups: unable to marshall SAMR_R_QUERY_USERGROUPS.\n"));
490 return False;
493 return True;
496 /*******************************************************************
497 api_samr_query_dom_info
498 ********************************************************************/
500 static BOOL api_samr_query_dom_info(pipes_struct *p)
502 SAMR_Q_QUERY_DOMAIN_INFO q_u;
503 SAMR_R_QUERY_DOMAIN_INFO r_u;
504 prs_struct *data = &p->in_data.data;
505 prs_struct *rdata = &p->out_data.rdata;
507 ZERO_STRUCT(q_u);
508 ZERO_STRUCT(r_u);
510 /* grab the samr unknown 8 command */
511 if(!samr_io_q_query_dom_info("", &q_u, data, 0)) {
512 DEBUG(0,("api_samr_query_dom_info: unable to unmarshall SAMR_Q_QUERY_DOMAIN_INFO.\n"));
513 return False;
516 r_u.status = _samr_query_dom_info(p, &q_u, &r_u);
518 /* store the response in the SMB stream */
519 if(!samr_io_r_query_dom_info("", &r_u, rdata, 0)) {
520 DEBUG(0,("api_samr_query_dom_info: unable to marshall SAMR_R_QUERY_DOMAIN_INFO.\n"));
521 return False;
524 return True;
527 /*******************************************************************
528 api_samr_create_user
529 ********************************************************************/
531 static BOOL api_samr_create_user(pipes_struct *p)
533 prs_struct *data = &p->in_data.data;
534 prs_struct *rdata = &p->out_data.rdata;
536 SAMR_Q_CREATE_USER q_u;
537 SAMR_R_CREATE_USER r_u;
539 ZERO_STRUCT(q_u);
540 ZERO_STRUCT(r_u);
542 /* grab the samr create user */
543 if (!samr_io_q_create_user("", &q_u, data, 0)) {
544 DEBUG(0,("api_samr_create_user: Unable to unmarshall SAMR_Q_CREATE_USER.\n"));
545 return False;
548 r_u.status=_api_samr_create_user(p, &q_u, &r_u);
550 /* store the response in the SMB stream */
551 if(!samr_io_r_create_user("", &r_u, rdata, 0)) {
552 DEBUG(0,("api_samr_create_user: Unable to marshall SAMR_R_CREATE_USER.\n"));
553 return False;
556 return True;
559 /*******************************************************************
560 api_samr_connect_anon
561 ********************************************************************/
563 static BOOL api_samr_connect_anon(pipes_struct *p)
565 SAMR_Q_CONNECT_ANON q_u;
566 SAMR_R_CONNECT_ANON r_u;
567 prs_struct *data = &p->in_data.data;
568 prs_struct *rdata = &p->out_data.rdata;
570 ZERO_STRUCT(q_u);
571 ZERO_STRUCT(r_u);
573 /* grab the samr open policy */
574 if(!samr_io_q_connect_anon("", &q_u, data, 0)) {
575 DEBUG(0,("api_samr_connect_anon: unable to unmarshall SAMR_Q_CONNECT_ANON.\n"));
576 return False;
579 r_u.status = _samr_connect_anon(p, &q_u, &r_u);
581 /* store the response in the SMB stream */
582 if(!samr_io_r_connect_anon("", &r_u, rdata, 0)) {
583 DEBUG(0,("api_samr_connect_anon: unable to marshall SAMR_R_CONNECT_ANON.\n"));
584 return False;
587 return True;
590 /*******************************************************************
591 api_samr_connect
592 ********************************************************************/
594 static BOOL api_samr_connect(pipes_struct *p)
596 SAMR_Q_CONNECT q_u;
597 SAMR_R_CONNECT r_u;
598 prs_struct *data = &p->in_data.data;
599 prs_struct *rdata = &p->out_data.rdata;
601 ZERO_STRUCT(q_u);
602 ZERO_STRUCT(r_u);
604 /* grab the samr open policy */
605 if(!samr_io_q_connect("", &q_u, data, 0)) {
606 DEBUG(0,("api_samr_connect: unable to unmarshall SAMR_Q_CONNECT.\n"));
607 return False;
610 r_u.status = _samr_connect(p, &q_u, &r_u);
612 /* store the response in the SMB stream */
613 if(!samr_io_r_connect("", &r_u, rdata, 0)) {
614 DEBUG(0,("api_samr_connect: unable to marshall SAMR_R_CONNECT.\n"));
615 return False;
618 return True;
621 /**********************************************************************
622 api_samr_lookup_domain
623 **********************************************************************/
625 static BOOL api_samr_lookup_domain(pipes_struct *p)
627 SAMR_Q_LOOKUP_DOMAIN q_u;
628 SAMR_R_LOOKUP_DOMAIN r_u;
629 prs_struct *data = &p->in_data.data;
630 prs_struct *rdata = &p->out_data.rdata;
632 ZERO_STRUCT(q_u);
633 ZERO_STRUCT(r_u);
635 if(!samr_io_q_lookup_domain("", &q_u, data, 0)) {
636 DEBUG(0,("api_samr_lookup_domain: Unable to unmarshall SAMR_Q_LOOKUP_DOMAIN.\n"));
637 return False;
640 r_u.status = _samr_lookup_domain(p, &q_u, &r_u);
642 if(!samr_io_r_lookup_domain("", &r_u, rdata, 0)){
643 DEBUG(0,("api_samr_lookup_domain: Unable to marshall SAMR_R_LOOKUP_DOMAIN.\n"));
644 return False;
647 return True;
650 /**********************************************************************
651 api_samr_enum_domains
652 **********************************************************************/
654 static BOOL api_samr_enum_domains(pipes_struct *p)
656 SAMR_Q_ENUM_DOMAINS q_u;
657 SAMR_R_ENUM_DOMAINS r_u;
658 prs_struct *data = &p->in_data.data;
659 prs_struct *rdata = &p->out_data.rdata;
661 ZERO_STRUCT(q_u);
662 ZERO_STRUCT(r_u);
664 if(!samr_io_q_enum_domains("", &q_u, data, 0)) {
665 DEBUG(0,("api_samr_enum_domains: Unable to unmarshall SAMR_Q_ENUM_DOMAINS.\n"));
666 return False;
669 r_u.status = _samr_enum_domains(p, &q_u, &r_u);
671 if(!samr_io_r_enum_domains("", &r_u, rdata, 0)) {
672 DEBUG(0,("api_samr_enum_domains: Unable to marshall SAMR_R_ENUM_DOMAINS.\n"));
673 return False;
676 return True;
679 /*******************************************************************
680 api_samr_open_alias
681 ********************************************************************/
683 static BOOL api_samr_open_alias(pipes_struct *p)
685 SAMR_Q_OPEN_ALIAS q_u;
686 SAMR_R_OPEN_ALIAS r_u;
687 prs_struct *data = &p->in_data.data;
688 prs_struct *rdata = &p->out_data.rdata;
690 ZERO_STRUCT(q_u);
691 ZERO_STRUCT(r_u);
693 /* grab the samr open policy */
694 if(!samr_io_q_open_alias("", &q_u, data, 0)) {
695 DEBUG(0,("api_samr_open_alias: Unable to unmarshall SAMR_Q_OPEN_ALIAS.\n"));
696 return False;
699 r_u.status=_api_samr_open_alias(p, &q_u, &r_u);
701 /* store the response in the SMB stream */
702 if(!samr_io_r_open_alias("", &r_u, rdata, 0)) {
703 DEBUG(0,("api_samr_open_alias: Unable to marshall SAMR_R_OPEN_ALIAS.\n"));
704 return False;
707 return True;
710 /*******************************************************************
711 api_samr_set_userinfo
712 ********************************************************************/
714 static BOOL api_samr_set_userinfo(pipes_struct *p)
716 SAMR_Q_SET_USERINFO q_u;
717 SAMR_R_SET_USERINFO r_u;
718 prs_struct *data = &p->in_data.data;
719 prs_struct *rdata = &p->out_data.rdata;
721 ZERO_STRUCT(q_u);
722 ZERO_STRUCT(r_u);
724 if (!samr_io_q_set_userinfo("", &q_u, data, 0)) {
725 DEBUG(0,("api_samr_set_userinfo: Unable to unmarshall SAMR_Q_SET_USERINFO.\n"));
726 /* Fix for W2K SP2 */
727 if (q_u.switch_value == 0x1a) {
728 setup_fault_pdu(p, NT_STATUS(0x1c000006));
729 return True;
731 return False;
734 r_u.status = _samr_set_userinfo(p, &q_u, &r_u);
736 if(!samr_io_r_set_userinfo("", &r_u, rdata, 0)) {
737 DEBUG(0,("api_samr_set_userinfo: Unable to marshall SAMR_R_SET_USERINFO.\n"));
738 return False;
741 return True;
744 /*******************************************************************
745 api_samr_set_userinfo2
746 ********************************************************************/
748 static BOOL api_samr_set_userinfo2(pipes_struct *p)
750 SAMR_Q_SET_USERINFO2 q_u;
751 SAMR_R_SET_USERINFO2 r_u;
753 prs_struct *data = &p->in_data.data;
754 prs_struct *rdata = &p->out_data.rdata;
756 ZERO_STRUCT(q_u);
757 ZERO_STRUCT(r_u);
759 if (!samr_io_q_set_userinfo2("", &q_u, data, 0)) {
760 DEBUG(0,("api_samr_set_userinfo2: Unable to unmarshall SAMR_Q_SET_USERINFO2.\n"));
761 return False;
764 r_u.status = _samr_set_userinfo2(p, &q_u, &r_u);
766 if(!samr_io_r_set_userinfo2("", &r_u, rdata, 0)) {
767 DEBUG(0,("api_samr_set_userinfo2: Unable to marshall SAMR_R_SET_USERINFO2.\n"));
768 return False;
771 return True;
774 /*******************************************************************
775 api_samr_query_useraliases
776 ********************************************************************/
778 static BOOL api_samr_query_useraliases(pipes_struct *p)
780 SAMR_Q_QUERY_USERALIASES q_u;
781 SAMR_R_QUERY_USERALIASES r_u;
783 prs_struct *data = &p->in_data.data;
784 prs_struct *rdata = &p->out_data.rdata;
786 ZERO_STRUCT(q_u);
787 ZERO_STRUCT(r_u);
789 if (!samr_io_q_query_useraliases("", &q_u, data, 0)) {
790 DEBUG(0,("api_samr_query_useraliases: Unable to unmarshall SAMR_Q_QUERY_USERALIASES.\n"));
791 return False;
794 r_u.status = _samr_query_useraliases(p, &q_u, &r_u);
796 if (! samr_io_r_query_useraliases("", &r_u, rdata, 0)) {
797 DEBUG(0,("api_samr_query_useraliases: Unable to nmarshall SAMR_R_QUERY_USERALIASES.\n"));
798 return False;
801 return True;
804 /*******************************************************************
805 api_samr_query_aliasmem
806 ********************************************************************/
808 static BOOL api_samr_query_aliasmem(pipes_struct *p)
810 SAMR_Q_QUERY_ALIASMEM q_u;
811 SAMR_R_QUERY_ALIASMEM r_u;
813 prs_struct *data = &p->in_data.data;
814 prs_struct *rdata = &p->out_data.rdata;
816 ZERO_STRUCT(q_u);
817 ZERO_STRUCT(r_u);
819 if (!samr_io_q_query_aliasmem("", &q_u, data, 0)) {
820 DEBUG(0,("api_samr_query_aliasmem: unable to unmarshall SAMR_Q_QUERY_ALIASMEM.\n"));
821 return False;
824 r_u.status = _samr_query_aliasmem(p, &q_u, &r_u);
826 if (!samr_io_r_query_aliasmem("", &r_u, rdata, 0)) {
827 DEBUG(0,("api_samr_query_aliasmem: unable to marshall SAMR_R_QUERY_ALIASMEM.\n"));
828 return False;
831 return True;
834 /*******************************************************************
835 api_samr_query_groupmem
836 ********************************************************************/
838 static BOOL api_samr_query_groupmem(pipes_struct *p)
840 SAMR_Q_QUERY_GROUPMEM q_u;
841 SAMR_R_QUERY_GROUPMEM r_u;
843 prs_struct *data = &p->in_data.data;
844 prs_struct *rdata = &p->out_data.rdata;
846 ZERO_STRUCT(q_u);
847 ZERO_STRUCT(r_u);
849 if (!samr_io_q_query_groupmem("", &q_u, data, 0)) {
850 DEBUG(0,("api_samr_query_groupmem: unable to unmarshall SAMR_Q_QUERY_GROUPMEM.\n"));
851 return False;
854 r_u.status = _samr_query_groupmem(p, &q_u, &r_u);
856 if (!samr_io_r_query_groupmem("", &r_u, rdata, 0)) {
857 DEBUG(0,("api_samr_query_groupmem: unable to marshall SAMR_R_QUERY_GROUPMEM.\n"));
858 return False;
861 return True;
864 /*******************************************************************
865 api_samr_add_aliasmem
866 ********************************************************************/
868 static BOOL api_samr_add_aliasmem(pipes_struct *p)
870 SAMR_Q_ADD_ALIASMEM q_u;
871 SAMR_R_ADD_ALIASMEM r_u;
873 prs_struct *data = &p->in_data.data;
874 prs_struct *rdata = &p->out_data.rdata;
876 ZERO_STRUCT(q_u);
877 ZERO_STRUCT(r_u);
879 if (!samr_io_q_add_aliasmem("", &q_u, data, 0)) {
880 DEBUG(0,("api_samr_add_aliasmem: unable to unmarshall SAMR_Q_ADD_ALIASMEM.\n"));
881 return False;
884 r_u.status = _samr_add_aliasmem(p, &q_u, &r_u);
886 if (!samr_io_r_add_aliasmem("", &r_u, rdata, 0)) {
887 DEBUG(0,("api_samr_add_aliasmem: unable to marshall SAMR_R_ADD_ALIASMEM.\n"));
888 return False;
891 return True;
894 /*******************************************************************
895 api_samr_del_aliasmem
896 ********************************************************************/
898 static BOOL api_samr_del_aliasmem(pipes_struct *p)
900 SAMR_Q_DEL_ALIASMEM q_u;
901 SAMR_R_DEL_ALIASMEM r_u;
903 prs_struct *data = &p->in_data.data;
904 prs_struct *rdata = &p->out_data.rdata;
906 ZERO_STRUCT(q_u);
907 ZERO_STRUCT(r_u);
909 if (!samr_io_q_del_aliasmem("", &q_u, data, 0)) {
910 DEBUG(0,("api_samr_del_aliasmem: unable to unmarshall SAMR_Q_DEL_ALIASMEM.\n"));
911 return False;
914 r_u.status = _samr_del_aliasmem(p, &q_u, &r_u);
916 if (!samr_io_r_del_aliasmem("", &r_u, rdata, 0)) {
917 DEBUG(0,("api_samr_del_aliasmem: unable to marshall SAMR_R_DEL_ALIASMEM.\n"));
918 return False;
921 return True;
924 /*******************************************************************
925 api_samr_add_groupmem
926 ********************************************************************/
928 static BOOL api_samr_add_groupmem(pipes_struct *p)
930 SAMR_Q_ADD_GROUPMEM q_u;
931 SAMR_R_ADD_GROUPMEM r_u;
933 prs_struct *data = &p->in_data.data;
934 prs_struct *rdata = &p->out_data.rdata;
936 ZERO_STRUCT(q_u);
937 ZERO_STRUCT(r_u);
939 if (!samr_io_q_add_groupmem("", &q_u, data, 0)) {
940 DEBUG(0,("api_samr_add_groupmem: unable to unmarshall SAMR_Q_ADD_GROUPMEM.\n"));
941 return False;
944 r_u.status = _samr_add_groupmem(p, &q_u, &r_u);
946 if (!samr_io_r_add_groupmem("", &r_u, rdata, 0)) {
947 DEBUG(0,("api_samr_add_groupmem: unable to marshall SAMR_R_ADD_GROUPMEM.\n"));
948 return False;
951 return True;
954 /*******************************************************************
955 api_samr_del_groupmem
956 ********************************************************************/
958 static BOOL api_samr_del_groupmem(pipes_struct *p)
960 SAMR_Q_DEL_GROUPMEM q_u;
961 SAMR_R_DEL_GROUPMEM r_u;
963 prs_struct *data = &p->in_data.data;
964 prs_struct *rdata = &p->out_data.rdata;
966 ZERO_STRUCT(q_u);
967 ZERO_STRUCT(r_u);
969 if (!samr_io_q_del_groupmem("", &q_u, data, 0)) {
970 DEBUG(0,("api_samr_del_groupmem: unable to unmarshall SAMR_Q_DEL_GROUPMEM.\n"));
971 return False;
974 r_u.status = _samr_del_groupmem(p, &q_u, &r_u);
976 if (!samr_io_r_del_groupmem("", &r_u, rdata, 0)) {
977 DEBUG(0,("api_samr_del_groupmem: unable to marshall SAMR_R_DEL_GROUPMEM.\n"));
978 return False;
981 return True;
984 /*******************************************************************
985 api_samr_delete_dom_user
986 ********************************************************************/
988 static BOOL api_samr_delete_dom_user(pipes_struct *p)
990 SAMR_Q_DELETE_DOM_USER q_u;
991 SAMR_R_DELETE_DOM_USER r_u;
993 prs_struct *data = &p->in_data.data;
994 prs_struct *rdata = &p->out_data.rdata;
996 ZERO_STRUCT(q_u);
997 ZERO_STRUCT(r_u);
999 if (!samr_io_q_delete_dom_user("", &q_u, data, 0)) {
1000 DEBUG(0,("api_samr_delete_dom_user: unable to unmarshall SAMR_Q_DELETE_DOM_USER.\n"));
1001 return False;
1004 r_u.status = _samr_delete_dom_user(p, &q_u, &r_u);
1006 if (!samr_io_r_delete_dom_user("", &r_u, rdata, 0)) {
1007 DEBUG(0,("api_samr_delete_dom_user: unable to marshall SAMR_R_DELETE_DOM_USER.\n"));
1008 return False;
1011 return True;
1014 /*******************************************************************
1015 api_samr_delete_dom_group
1016 ********************************************************************/
1018 static BOOL api_samr_delete_dom_group(pipes_struct *p)
1020 SAMR_Q_DELETE_DOM_GROUP q_u;
1021 SAMR_R_DELETE_DOM_GROUP r_u;
1023 prs_struct *data = &p->in_data.data;
1024 prs_struct *rdata = &p->out_data.rdata;
1026 ZERO_STRUCT(q_u);
1027 ZERO_STRUCT(r_u);
1029 if (!samr_io_q_delete_dom_group("", &q_u, data, 0)) {
1030 DEBUG(0,("api_samr_delete_dom_group: unable to unmarshall SAMR_Q_DELETE_DOM_GROUP.\n"));
1031 return False;
1034 r_u.status = _samr_delete_dom_group(p, &q_u, &r_u);
1036 if (!samr_io_r_delete_dom_group("", &r_u, rdata, 0)) {
1037 DEBUG(0,("api_samr_delete_dom_group: unable to marshall SAMR_R_DELETE_DOM_GROUP.\n"));
1038 return False;
1041 return True;
1044 /*******************************************************************
1045 api_samr_delete_dom_alias
1046 ********************************************************************/
1048 static BOOL api_samr_delete_dom_alias(pipes_struct *p)
1050 SAMR_Q_DELETE_DOM_ALIAS q_u;
1051 SAMR_R_DELETE_DOM_ALIAS r_u;
1053 prs_struct *data = &p->in_data.data;
1054 prs_struct *rdata = &p->out_data.rdata;
1056 ZERO_STRUCT(q_u);
1057 ZERO_STRUCT(r_u);
1059 if (!samr_io_q_delete_dom_alias("", &q_u, data, 0)) {
1060 DEBUG(0,("api_samr_delete_dom_alias: unable to unmarshall SAMR_Q_DELETE_DOM_ALIAS.\n"));
1061 return False;
1064 r_u.status = _samr_delete_dom_alias(p, &q_u, &r_u);
1066 if (!samr_io_r_delete_dom_alias("", &r_u, rdata, 0)) {
1067 DEBUG(0,("api_samr_delete_dom_alias: unable to marshall SAMR_R_DELETE_DOM_ALIAS.\n"));
1068 return False;
1071 return True;
1074 /*******************************************************************
1075 api_samr_create_dom_group
1076 ********************************************************************/
1078 static BOOL api_samr_create_dom_group(pipes_struct *p)
1080 SAMR_Q_CREATE_DOM_GROUP q_u;
1081 SAMR_R_CREATE_DOM_GROUP r_u;
1083 prs_struct *data = &p->in_data.data;
1084 prs_struct *rdata = &p->out_data.rdata;
1086 ZERO_STRUCT(q_u);
1087 ZERO_STRUCT(r_u);
1089 if (!samr_io_q_create_dom_group("", &q_u, data, 0)) {
1090 DEBUG(0,("api_samr_create_dom_group: unable to unmarshall SAMR_Q_CREATE_DOM_GROUP.\n"));
1091 return False;
1094 r_u.status = _samr_create_dom_group(p, &q_u, &r_u);
1096 if (!samr_io_r_create_dom_group("", &r_u, rdata, 0)) {
1097 DEBUG(0,("api_samr_create_dom_group: unable to marshall SAMR_R_CREATE_DOM_GROUP.\n"));
1098 return False;
1101 return True;
1104 /*******************************************************************
1105 api_samr_create_dom_alias
1106 ********************************************************************/
1108 static BOOL api_samr_create_dom_alias(pipes_struct *p)
1110 SAMR_Q_CREATE_DOM_ALIAS q_u;
1111 SAMR_R_CREATE_DOM_ALIAS r_u;
1113 prs_struct *data = &p->in_data.data;
1114 prs_struct *rdata = &p->out_data.rdata;
1116 ZERO_STRUCT(q_u);
1117 ZERO_STRUCT(r_u);
1119 if (!samr_io_q_create_dom_alias("", &q_u, data, 0)) {
1120 DEBUG(0,("api_samr_create_dom_alias: unable to unmarshall SAMR_Q_CREATE_DOM_ALIAS.\n"));
1121 return False;
1124 r_u.status = _samr_create_dom_alias(p, &q_u, &r_u);
1126 if (!samr_io_r_create_dom_alias("", &r_u, rdata, 0)) {
1127 DEBUG(0,("api_samr_create_dom_alias: unable to marshall SAMR_R_CREATE_DOM_ALIAS.\n"));
1128 return False;
1131 return True;
1134 /*******************************************************************
1135 api_samr_query_groupinfo
1136 ********************************************************************/
1138 static BOOL api_samr_query_groupinfo(pipes_struct *p)
1140 SAMR_Q_QUERY_GROUPINFO q_u;
1141 SAMR_R_QUERY_GROUPINFO r_u;
1143 prs_struct *data = &p->in_data.data;
1144 prs_struct *rdata = &p->out_data.rdata;
1146 ZERO_STRUCT(q_u);
1147 ZERO_STRUCT(r_u);
1149 if (!samr_io_q_query_groupinfo("", &q_u, data, 0)) {
1150 DEBUG(0,("api_samr_query_groupinfo: unable to unmarshall SAMR_Q_QUERY_GROUPINFO.\n"));
1151 return False;
1154 r_u.status = _samr_query_groupinfo(p, &q_u, &r_u);
1156 if (!samr_io_r_query_groupinfo("", &r_u, rdata, 0)) {
1157 DEBUG(0,("api_samr_query_groupinfo: unable to marshall SAMR_R_QUERY_GROUPINFO.\n"));
1158 return False;
1161 return True;
1164 /*******************************************************************
1165 api_samr_set_groupinfo
1166 ********************************************************************/
1168 static BOOL api_samr_set_groupinfo(pipes_struct *p)
1170 SAMR_Q_SET_GROUPINFO q_u;
1171 SAMR_R_SET_GROUPINFO r_u;
1173 prs_struct *data = &p->in_data.data;
1174 prs_struct *rdata = &p->out_data.rdata;
1176 ZERO_STRUCT(q_u);
1177 ZERO_STRUCT(r_u);
1179 if (!samr_io_q_set_groupinfo("", &q_u, data, 0)) {
1180 DEBUG(0,("api_samr_set_groupinfo: unable to unmarshall SAMR_Q_SET_GROUPINFO.\n"));
1181 return False;
1184 r_u.status = _samr_set_groupinfo(p, &q_u, &r_u);
1186 if (!samr_io_r_set_groupinfo("", &r_u, rdata, 0)) {
1187 DEBUG(0,("api_samr_set_groupinfo: unable to marshall SAMR_R_SET_GROUPINFO.\n"));
1188 return False;
1191 return True;
1194 /*******************************************************************
1195 api_samr_set_aliasinfo
1196 ********************************************************************/
1198 static BOOL api_samr_set_aliasinfo(pipes_struct *p)
1200 SAMR_Q_SET_ALIASINFO q_u;
1201 SAMR_R_SET_ALIASINFO r_u;
1203 prs_struct *data = &p->in_data.data;
1204 prs_struct *rdata = &p->out_data.rdata;
1206 ZERO_STRUCT(q_u);
1207 ZERO_STRUCT(r_u);
1209 if (!samr_io_q_set_aliasinfo("", &q_u, data, 0)) {
1210 DEBUG(0,("api_samr_set_aliasinfo: unable to unmarshall SAMR_Q_SET_ALIASINFO.\n"));
1211 return False;
1214 r_u.status = _samr_set_aliasinfo(p, &q_u, &r_u);
1216 if (!samr_io_r_set_aliasinfo("", &r_u, rdata, 0)) {
1217 DEBUG(0,("api_samr_set_aliasinfo: unable to marshall SAMR_R_SET_ALIASINFO.\n"));
1218 return False;
1221 return True;
1224 /*******************************************************************
1225 api_samr_get_dom_pwinfo
1226 ********************************************************************/
1228 static BOOL api_samr_get_dom_pwinfo(pipes_struct *p)
1230 SAMR_Q_GET_DOM_PWINFO q_u;
1231 SAMR_R_GET_DOM_PWINFO r_u;
1233 prs_struct *data = &p->in_data.data;
1234 prs_struct *rdata = &p->out_data.rdata;
1236 ZERO_STRUCT(q_u);
1237 ZERO_STRUCT(r_u);
1239 if (!samr_io_q_get_dom_pwinfo("", &q_u, data, 0)) {
1240 DEBUG(0,("api_samr_get_dom_pwinfo: unable to unmarshall SAMR_Q_GET_DOM_PWINFO.\n"));
1241 return False;
1244 r_u.status = _samr_get_dom_pwinfo(p, &q_u, &r_u);
1246 if (!samr_io_r_get_dom_pwinfo("", &r_u, rdata, 0)) {
1247 DEBUG(0,("api_samr_get_dom_pwinfo: unable to marshall SAMR_R_GET_DOM_PWINFO.\n"));
1248 return False;
1251 return True;
1254 /*******************************************************************
1255 api_samr_open_group
1256 ********************************************************************/
1258 static BOOL api_samr_open_group(pipes_struct *p)
1260 SAMR_Q_OPEN_GROUP q_u;
1261 SAMR_R_OPEN_GROUP r_u;
1263 prs_struct *data = &p->in_data.data;
1264 prs_struct *rdata = &p->out_data.rdata;
1266 ZERO_STRUCT(q_u);
1267 ZERO_STRUCT(r_u);
1269 if (!samr_io_q_open_group("", &q_u, data, 0)) {
1270 DEBUG(0,("api_samr_open_group: unable to unmarshall SAMR_Q_OPEN_GROUP.\n"));
1271 return False;
1274 r_u.status = _samr_open_group(p, &q_u, &r_u);
1276 if (!samr_io_r_open_group("", &r_u, rdata, 0)) {
1277 DEBUG(0,("api_samr_open_group: unable to marshall SAMR_R_OPEN_GROUP.\n"));
1278 return False;
1281 return True;
1284 /*******************************************************************
1285 api_samr_unknown_2d
1286 ********************************************************************/
1288 static BOOL api_samr_unknown_2d(pipes_struct *p)
1290 SAMR_Q_UNKNOWN_2D q_u;
1291 SAMR_R_UNKNOWN_2D r_u;
1293 prs_struct *data = &p->in_data.data;
1294 prs_struct *rdata = &p->out_data.rdata;
1296 ZERO_STRUCT(q_u);
1297 ZERO_STRUCT(r_u);
1299 if (!samr_io_q_unknown_2d("", &q_u, data, 0)) {
1300 DEBUG(0,("api_samr_unknown_2d: unable to unmarshall SAMR_Q_UNKNOWN_2D.\n"));
1301 return False;
1304 r_u.status = _samr_unknown_2d(p, &q_u, &r_u);
1306 if (!samr_io_r_unknown_2d("", &r_u, rdata, 0)) {
1307 DEBUG(0,("api_samr_unknown_2d: unable to marshall SAMR_R_UNKNOWN_2D.\n"));
1308 return False;
1311 return True;
1314 /*******************************************************************
1315 api_samr_query_dom_info
1316 ********************************************************************/
1318 static BOOL api_samr_unknown_2e(pipes_struct *p)
1320 SAMR_Q_UNKNOWN_2E q_u;
1321 SAMR_R_UNKNOWN_2E r_u;
1322 prs_struct *data = &p->in_data.data;
1323 prs_struct *rdata = &p->out_data.rdata;
1325 ZERO_STRUCT(q_u);
1326 ZERO_STRUCT(r_u);
1328 /* grab the samr unknown 8 command */
1329 if(!samr_io_q_unknown_2e("", &q_u, data, 0)) {
1330 DEBUG(0,("api_samr_unknown_2e: unable to unmarshall SAMR_Q_UNKNOWN_2E.\n"));
1331 return False;
1334 r_u.status = _samr_unknown_2e(p, &q_u, &r_u);
1336 /* store the response in the SMB stream */
1337 if(!samr_io_r_samr_unknown_2e("", &r_u, rdata, 0)) {
1338 DEBUG(0,("api_samr_unknown_2e: unable to marshall SAMR_R_UNKNOWN_2E.\n"));
1339 return False;
1342 return True;
1345 /*******************************************************************
1346 api_samr_set_dom_info
1347 ********************************************************************/
1349 static BOOL api_samr_set_dom_info(pipes_struct *p)
1351 SAMR_Q_SET_DOMAIN_INFO q_u;
1352 SAMR_R_SET_DOMAIN_INFO r_u;
1353 prs_struct *data = &p->in_data.data;
1354 prs_struct *rdata = &p->out_data.rdata;
1356 ZERO_STRUCT(q_u);
1357 ZERO_STRUCT(r_u);
1359 /* grab the samr unknown 8 command */
1360 if(!samr_io_q_set_domain_info("", &q_u, data, 0)) {
1361 DEBUG(0,("api_samr_set_dom_info: unable to unmarshall SAMR_Q_SET_DOMAIN_INFO.\n"));
1362 return False;
1365 r_u.status = _samr_set_dom_info(p, &q_u, &r_u);
1367 /* store the response in the SMB stream */
1368 if(!samr_io_r_set_domain_info("", &r_u, rdata, 0)) {
1369 DEBUG(0,("api_samr_set_dom_info: unable to marshall SAMR_R_SET_DOMAIN_INFO.\n"));
1370 return False;
1373 return True;
1376 /*******************************************************************
1377 array of \PIPE\samr operations
1378 ********************************************************************/
1380 static struct api_struct api_samr_cmds [] =
1382 {"SAMR_CLOSE_HND" , SAMR_CLOSE_HND , api_samr_close_hnd },
1383 {"SAMR_CONNECT" , SAMR_CONNECT , api_samr_connect },
1384 {"SAMR_CONNECT_ANON" , SAMR_CONNECT_ANON , api_samr_connect_anon },
1385 {"SAMR_ENUM_DOMAINS" , SAMR_ENUM_DOMAINS , api_samr_enum_domains },
1386 {"SAMR_ENUM_DOM_USERS" , SAMR_ENUM_DOM_USERS , api_samr_enum_dom_users },
1388 {"SAMR_ENUM_DOM_GROUPS" , SAMR_ENUM_DOM_GROUPS , api_samr_enum_dom_groups },
1389 {"SAMR_ENUM_DOM_ALIASES" , SAMR_ENUM_DOM_ALIASES , api_samr_enum_dom_aliases },
1390 {"SAMR_QUERY_USERALIASES" , SAMR_QUERY_USERALIASES, api_samr_query_useraliases},
1391 {"SAMR_QUERY_ALIASMEM" , SAMR_QUERY_ALIASMEM , api_samr_query_aliasmem },
1392 {"SAMR_QUERY_GROUPMEM" , SAMR_QUERY_GROUPMEM , api_samr_query_groupmem },
1393 {"SAMR_ADD_ALIASMEM" , SAMR_ADD_ALIASMEM , api_samr_add_aliasmem },
1394 {"SAMR_DEL_ALIASMEM" , SAMR_DEL_ALIASMEM , api_samr_del_aliasmem },
1395 {"SAMR_ADD_GROUPMEM" , SAMR_ADD_GROUPMEM , api_samr_add_groupmem },
1396 {"SAMR_DEL_GROUPMEM" , SAMR_DEL_GROUPMEM , api_samr_del_groupmem },
1398 {"SAMR_DELETE_DOM_USER" , SAMR_DELETE_DOM_USER , api_samr_delete_dom_user },
1399 {"SAMR_DELETE_DOM_GROUP" , SAMR_DELETE_DOM_GROUP , api_samr_delete_dom_group },
1400 {"SAMR_DELETE_DOM_ALIAS" , SAMR_DELETE_DOM_ALIAS , api_samr_delete_dom_alias },
1401 {"SAMR_CREATE_DOM_GROUP" , SAMR_CREATE_DOM_GROUP , api_samr_create_dom_group },
1402 {"SAMR_CREATE_DOM_ALIAS" , SAMR_CREATE_DOM_ALIAS , api_samr_create_dom_alias },
1403 {"SAMR_LOOKUP_NAMES" , SAMR_LOOKUP_NAMES , api_samr_lookup_names },
1404 {"SAMR_OPEN_USER" , SAMR_OPEN_USER , api_samr_open_user },
1405 {"SAMR_QUERY_USERINFO" , SAMR_QUERY_USERINFO , api_samr_query_userinfo },
1406 {"SAMR_SET_USERINFO" , SAMR_SET_USERINFO , api_samr_set_userinfo },
1407 {"SAMR_SET_USERINFO2" , SAMR_SET_USERINFO2 , api_samr_set_userinfo2 },
1409 {"SAMR_QUERY_DOMAIN_INFO" , SAMR_QUERY_DOMAIN_INFO, api_samr_query_dom_info },
1410 {"SAMR_QUERY_USERGROUPS" , SAMR_QUERY_USERGROUPS , api_samr_query_usergroups },
1411 {"SAMR_QUERY_DISPINFO" , SAMR_QUERY_DISPINFO , api_samr_query_dispinfo },
1412 {"SAMR_QUERY_DISPINFO3" , SAMR_QUERY_DISPINFO3 , api_samr_query_dispinfo },
1413 {"SAMR_QUERY_DISPINFO4" , SAMR_QUERY_DISPINFO4 , api_samr_query_dispinfo },
1415 {"SAMR_QUERY_ALIASINFO" , SAMR_QUERY_ALIASINFO , api_samr_query_aliasinfo },
1416 {"SAMR_QUERY_GROUPINFO" , SAMR_QUERY_GROUPINFO , api_samr_query_groupinfo },
1417 {"SAMR_SET_GROUPINFO" , SAMR_SET_GROUPINFO , api_samr_set_groupinfo },
1418 {"SAMR_SET_ALIASINFO" , SAMR_SET_ALIASINFO , api_samr_set_aliasinfo },
1419 {"SAMR_CREATE_USER" , SAMR_CREATE_USER , api_samr_create_user },
1420 {"SAMR_LOOKUP_RIDS" , SAMR_LOOKUP_RIDS , api_samr_lookup_rids },
1421 {"SAMR_GET_DOM_PWINFO" , SAMR_GET_DOM_PWINFO , api_samr_get_dom_pwinfo },
1422 {"SAMR_CHGPASSWD_USER" , SAMR_CHGPASSWD_USER , api_samr_chgpasswd_user },
1423 {"SAMR_OPEN_ALIAS" , SAMR_OPEN_ALIAS , api_samr_open_alias },
1424 {"SAMR_OPEN_GROUP" , SAMR_OPEN_GROUP , api_samr_open_group },
1425 {"SAMR_OPEN_DOMAIN" , SAMR_OPEN_DOMAIN , api_samr_open_domain },
1426 {"SAMR_UNKNOWN_2D" , SAMR_UNKNOWN_2D , api_samr_unknown_2d },
1427 {"SAMR_LOOKUP_DOMAIN" , SAMR_LOOKUP_DOMAIN , api_samr_lookup_domain },
1429 {"SAMR_QUERY_SEC_OBJECT" , SAMR_QUERY_SEC_OBJECT , api_samr_query_sec_obj },
1430 {"SAMR_GET_USRDOM_PWINFO" , SAMR_GET_USRDOM_PWINFO, api_samr_get_usrdom_pwinfo},
1431 {"SAMR_UNKNOWN_2E" , SAMR_UNKNOWN_2E , api_samr_unknown_2e },
1432 {"SAMR_SET_DOMAIN_INFO" , SAMR_SET_DOMAIN_INFO , api_samr_set_dom_info },
1433 {NULL , 0 , NULL }
1436 /*******************************************************************
1437 receives a samr pipe and responds.
1438 ********************************************************************/
1439 BOOL api_samr_rpc(pipes_struct *p)
1441 return api_rpcTNP(p, "api_samr_rpc", api_samr_cmds);