summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2003-09-09 04:07:32 +0000
committerGerald Carter <jerry@samba.org>2003-09-09 04:07:32 +0000
commit4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8 (patch)
treedd0a9f32d9933e1f75d919b5083e007d7453f9c4 /source3/rpc_server/srv_samr.c
parent3d7cb49747a9a7f5cdec0ee05c6270ec3604202f (diff)
downloadsamba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.tar.gz
samba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.tar.bz2
samba-4093bf7ff8c8861cf7b941945ede53a8ec5bb6c8.zip
sync 3.0 into HEAD for the last time
(This used to be commit c17a7dc9a190156a069da3e861c18fd3f81224ad)
Diffstat (limited to 'source3/rpc_server/srv_samr.c')
-rw-r--r--source3/rpc_server/srv_samr.c49
1 files changed, 26 insertions, 23 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index 86ff039683..a0f62c20fc 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -386,7 +386,7 @@ static BOOL api_samr_chgpasswd_user(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* unknown 38 command */
+ /* change password request */
if (!samr_io_q_chgpasswd_user("", &q_u, data, 0)) {
DEBUG(0,("api_samr_chgpasswd_user: Failed to unmarshall SAMR_Q_CHGPASSWD_USER.\n"));
return False;
@@ -448,13 +448,12 @@ static BOOL api_samr_open_user(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* grab the samr unknown 22 */
if(!samr_io_q_open_user("", &q_u, data, 0)) {
DEBUG(0,("api_samr_open_user: unable to unmarshall SAMR_Q_OPEN_USER.\n"));
return False;
}
- r_u.status = _api_samr_open_user(p, &q_u, &r_u);
+ r_u.status = _samr_open_user(p, &q_u, &r_u);
/* store the response in the SMB stream */
if(!samr_io_r_open_user("", &r_u, rdata, 0)) {
@@ -479,7 +478,6 @@ static BOOL api_samr_query_userinfo(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* grab the samr unknown 24 */
if(!samr_io_q_query_userinfo("", &q_u, data, 0)){
DEBUG(0,("api_samr_query_userinfo: unable to unmarshall SAMR_Q_QUERY_USERINFO.\n"));
return False;
@@ -510,7 +508,6 @@ static BOOL api_samr_query_usergroups(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* grab the samr unknown 32 */
if(!samr_io_q_query_usergroups("", &q_u, data, 0)) {
DEBUG(0,("api_samr_query_usergroups: unable to unmarshall SAMR_Q_QUERY_USERGROUPS.\n"));
return False;
@@ -541,7 +538,6 @@ static BOOL api_samr_query_dom_info(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* grab the samr unknown 8 command */
if(!samr_io_q_query_dom_info("", &q_u, data, 0)) {
DEBUG(0,("api_samr_query_dom_info: unable to unmarshall SAMR_Q_QUERY_DOMAIN_INFO.\n"));
return False;
@@ -579,7 +575,7 @@ static BOOL api_samr_create_user(pipes_struct *p)
return False;
}
- r_u.status=_api_samr_create_user(p, &q_u, &r_u);
+ r_u.status=_samr_create_user(p, &q_u, &r_u);
/* store the response in the SMB stream */
if(!samr_io_r_create_user("", &r_u, rdata, 0)) {
@@ -761,7 +757,7 @@ static BOOL api_samr_open_alias(pipes_struct *p)
return False;
}
- r_u.status=_api_samr_open_alias(p, &q_u, &r_u);
+ r_u.status=_samr_open_alias(p, &q_u, &r_u);
/* store the response in the SMB stream */
if(!samr_io_r_open_alias("", &r_u, rdata, 0)) {
@@ -1347,13 +1343,13 @@ static BOOL api_samr_open_group(pipes_struct *p)
}
/*******************************************************************
- api_samr_unknown_2d
+ api_samr_remove_user_foreign_domain
********************************************************************/
-static BOOL api_samr_unknown_2d(pipes_struct *p)
+static BOOL api_samr_remove_user_foreign_domain(pipes_struct *p)
{
- SAMR_Q_UNKNOWN_2D q_u;
- SAMR_R_UNKNOWN_2D r_u;
+ SAMR_Q_REMOVE_USER_FOREIGN_DOMAIN q_u;
+ SAMR_R_REMOVE_USER_FOREIGN_DOMAIN r_u;
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
@@ -1361,15 +1357,15 @@ static BOOL api_samr_unknown_2d(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- if (!samr_io_q_unknown_2d("", &q_u, data, 0)) {
- DEBUG(0,("api_samr_unknown_2d: unable to unmarshall SAMR_Q_UNKNOWN_2D.\n"));
+ if (!samr_io_q_remove_user_foreign_domain("", &q_u, data, 0)) {
+ DEBUG(0,("api_samr_remove_user_foreign_domain: unable to unmarshall SAMR_Q_REMOVE_USER_FOREIGN_DOMAIN.\n"));
return False;
}
- r_u.status = _samr_unknown_2d(p, &q_u, &r_u);
+ r_u.status = _samr_remove_user_foreign_domain(p, &q_u, &r_u);
- if (!samr_io_r_unknown_2d("", &r_u, rdata, 0)) {
- DEBUG(0,("api_samr_unknown_2d: unable to marshall SAMR_R_UNKNOWN_2D.\n"));
+ if (!samr_io_r_remove_user_foreign_domain("", &r_u, rdata, 0)) {
+ DEBUG(0,("api_samr_remove_user_foreign_domain: unable to marshall SAMR_R_REMOVE_USER_FOREIGN_DOMAIN.\n"));
return False;
}
@@ -1421,7 +1417,6 @@ static BOOL api_samr_set_dom_info(pipes_struct *p)
ZERO_STRUCT(q_u);
ZERO_STRUCT(r_u);
- /* grab the samr unknown 8 command */
if(!samr_io_q_set_domain_info("", &q_u, data, 0)) {
DEBUG(0,("api_samr_set_dom_info: unable to unmarshall SAMR_Q_SET_DOMAIN_INFO.\n"));
return False;
@@ -1442,10 +1437,8 @@ static BOOL api_samr_set_dom_info(pipes_struct *p)
array of \PIPE\samr operations
********************************************************************/
-NTSTATUS rpc_samr_init(void)
+static struct api_struct api_samr_cmds [] =
{
- static struct api_struct api_samr_cmds [] =
- {
{"SAMR_CLOSE_HND" , SAMR_CLOSE_HND , api_samr_close_hnd },
{"SAMR_CONNECT" , SAMR_CONNECT , api_samr_connect },
{"SAMR_CONNECT_ANON" , SAMR_CONNECT_ANON , api_samr_connect_anon },
@@ -1490,7 +1483,7 @@ NTSTATUS rpc_samr_init(void)
{"SAMR_OPEN_ALIAS" , SAMR_OPEN_ALIAS , api_samr_open_alias },
{"SAMR_OPEN_GROUP" , SAMR_OPEN_GROUP , api_samr_open_group },
{"SAMR_OPEN_DOMAIN" , SAMR_OPEN_DOMAIN , api_samr_open_domain },
- {"SAMR_UNKNOWN_2D" , SAMR_UNKNOWN_2D , api_samr_unknown_2d },
+ {"SAMR_REMOVE_USER_FOREIGN_DOMAIN" , SAMR_REMOVE_USER_FOREIGN_DOMAIN , api_samr_remove_user_foreign_domain },
{"SAMR_LOOKUP_DOMAIN" , SAMR_LOOKUP_DOMAIN , api_samr_lookup_domain },
{"SAMR_QUERY_SEC_OBJECT" , SAMR_QUERY_SEC_OBJECT , api_samr_query_sec_obj },
@@ -1499,7 +1492,17 @@ NTSTATUS rpc_samr_init(void)
{"SAMR_UNKNOWN_2E" , SAMR_UNKNOWN_2E , api_samr_unknown_2e },
{"SAMR_SET_DOMAIN_INFO" , SAMR_SET_DOMAIN_INFO , api_samr_set_dom_info },
{"SAMR_CONNECT4" , SAMR_CONNECT4 , api_samr_connect4 }
- };
+};
+
+void samr_get_pipe_fns( struct api_struct **fns, int *n_fns )
+{
+ *fns = api_samr_cmds;
+ *n_fns = sizeof(api_samr_cmds) / sizeof(struct api_struct);
+}
+
+
+NTSTATUS rpc_samr_init(void)
+{
return rpc_pipe_register_commands(SMB_RPC_INTERFACE_VERSION, "samr", "lsass", api_samr_cmds,
sizeof(api_samr_cmds) / sizeof(struct api_struct));
}