summaryrefslogtreecommitdiff
path: root/source3/rpc_server/srv_samr.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2005-11-18 23:15:47 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:05:28 -0500
commit9be0ce442285a0f63e6c226f6cf07d05a3f20021 (patch)
treee7d2d5ebb9e6c444f6153821c509193befae034d /source3/rpc_server/srv_samr.c
parent4ba65300ec7fa1b69600efdfd704d10b6a181d81 (diff)
downloadsamba-9be0ce442285a0f63e6c226f6cf07d05a3f20021.tar.gz
samba-9be0ce442285a0f63e6c226f6cf07d05a3f20021.tar.bz2
samba-9be0ce442285a0f63e6c226f6cf07d05a3f20021.zip
r11793: Fix the SAMR cache so it works across completely insane
client behaviour (ie.: open pipe/open SAMR handle/enumerate 0 - 1024 close SAMR handle, close pipe. open pipe/open SAMR handle/enumerate 1024 - 2048... close SAMR handle, close pipe. And on ad-nausium. Amazing.... probably object-oriented client side programming in action yet again. This change should *massively* improve performance when enumerating users from an LDAP database. Jeremy. (This used to be commit 8ce705d9cc1b6a79d710a10ff38f72a0f1006dda)
Diffstat (limited to 'source3/rpc_server/srv_samr.c')
-rw-r--r--source3/rpc_server/srv_samr.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/source3/rpc_server/srv_samr.c b/source3/rpc_server/srv_samr.c
index 520bf47a31..e8fd86ba46 100644
--- a/source3/rpc_server/srv_samr.c
+++ b/source3/rpc_server/srv_samr.c
@@ -1405,13 +1405,13 @@ static BOOL api_samr_remove_sid_foreign_domain(pipes_struct *p)
}
/*******************************************************************
- api_samr_query_dom_info
+ api_samr_query_dom_info2
********************************************************************/
-static BOOL api_samr_unknown_2e(pipes_struct *p)
+static BOOL api_samr_query_domain_info2(pipes_struct *p)
{
- SAMR_Q_UNKNOWN_2E q_u;
- SAMR_R_UNKNOWN_2E r_u;
+ SAMR_Q_QUERY_DOMAIN_INFO2 q_u;
+ SAMR_R_QUERY_DOMAIN_INFO2 r_u;
prs_struct *data = &p->in_data.data;
prs_struct *rdata = &p->out_data.rdata;
@@ -1419,16 +1419,16 @@ static BOOL api_samr_unknown_2e(pipes_struct *p)
ZERO_STRUCT(r_u);
/* grab the samr unknown 8 command */
- if(!samr_io_q_unknown_2e("", &q_u, data, 0)) {
- DEBUG(0,("api_samr_unknown_2e: unable to unmarshall SAMR_Q_UNKNOWN_2E.\n"));
+ if(!samr_io_q_query_domain_info2("", &q_u, data, 0)) {
+ DEBUG(0,("api_samr_query_domain_info2: unable to unmarshall SAMR_Q_QUERY_DOMAIN_INFO2.\n"));
return False;
}
- r_u.status = _samr_unknown_2e(p, &q_u, &r_u);
+ r_u.status = _samr_query_domain_info2(p, &q_u, &r_u);
/* store the response in the SMB stream */
- if(!samr_io_r_samr_unknown_2e("", &r_u, rdata, 0)) {
- DEBUG(0,("api_samr_unknown_2e: unable to marshall SAMR_R_UNKNOWN_2E.\n"));
+ if(!samr_io_r_samr_query_domain_info2("", &r_u, rdata, 0)) {
+ DEBUG(0,("api_samr_query_domain_info2: unable to marshall SAMR_R_QUERY_DOMAIN_INFO2.\n"));
return False;
}
@@ -1521,7 +1521,7 @@ static struct api_struct api_samr_cmds [] =
{"SAMR_QUERY_SEC_OBJECT" , SAMR_QUERY_SEC_OBJECT , api_samr_query_sec_obj },
{"SAMR_SET_SEC_OBJECT" , SAMR_SET_SEC_OBJECT , api_samr_set_sec_obj },
{"SAMR_GET_USRDOM_PWINFO" , SAMR_GET_USRDOM_PWINFO, api_samr_get_usrdom_pwinfo},
- {"SAMR_UNKNOWN_2E" , SAMR_UNKNOWN_2E , api_samr_unknown_2e },
+ {"SAMR_QUERY_DOMAIN_INFO2", SAMR_QUERY_DOMAIN_INFO2, api_samr_query_domain_info2},
{"SAMR_SET_DOMAIN_INFO" , SAMR_SET_DOMAIN_INFO , api_samr_set_dom_info },
{"SAMR_CONNECT4" , SAMR_CONNECT4 , api_samr_connect4 },
{"SAMR_CONNECT5" , SAMR_CONNECT5 , api_samr_connect5 }