summaryrefslogtreecommitdiff
path: root/source3/rpc_server
diff options
context:
space:
mode:
authorSimo Sorce <idra@samba.org>2010-07-09 19:35:22 -0400
committerGünther Deschner <gd@samba.org>2010-07-13 14:44:10 +0200
commit77fb3649cede61407ba5df008ceaa49d32ef71d7 (patch)
tree6df23bf41e62702946ab4470a5aac24aad472ebb /source3/rpc_server
parenta138b3d31ef9952dc59630f478264f74091f613d (diff)
downloadsamba-77fb3649cede61407ba5df008ceaa49d32ef71d7.tar.gz
samba-77fb3649cede61407ba5df008ceaa49d32ef71d7.tar.bz2
samba-77fb3649cede61407ba5df008ceaa49d32ef71d7.zip
s3-dceprc: Store opnum in its own variable
Signed-off-by: Günther Deschner <gd@samba.org>
Diffstat (limited to 'source3/rpc_server')
-rw-r--r--source3/rpc_server/rpc_ncacn_np_internal.c4
-rw-r--r--source3/rpc_server/srv_lsa_nt.c4
-rw-r--r--source3/rpc_server/srv_netlog_nt.c6
-rw-r--r--source3/rpc_server/srv_pipe.c8
-rw-r--r--source3/rpc_server/srv_pipe_hnd.c3
-rw-r--r--source3/rpc_server/srv_samr_nt.c2
-rw-r--r--source3/rpc_server/srv_spoolss_nt.c2
7 files changed, 16 insertions, 13 deletions
diff --git a/source3/rpc_server/rpc_ncacn_np_internal.c b/source3/rpc_server/rpc_ncacn_np_internal.c
index d702e4b4d7..22e03525ff 100644
--- a/source3/rpc_server/rpc_ncacn_np_internal.c
+++ b/source3/rpc_server/rpc_ncacn_np_internal.c
@@ -301,8 +301,8 @@ static NTSTATUS rpc_pipe_internal_dispatch(struct rpc_pipe_client *cli,
return NT_STATUS_INVALID_PARAMETER;
}
- /* set opnum in fake rpc header */
- cli->pipes_struct->hdr_req.opnum = opnum;
+ /* set opnum */
+ cli->pipes_struct->opnum = opnum;
for (i = 0; i < num_cmds; i++) {
if (cmds[i].opnum == opnum && cmds[i].fn != NULL) {
diff --git a/source3/rpc_server/srv_lsa_nt.c b/source3/rpc_server/srv_lsa_nt.c
index fce0565eac..c035e62eea 100644
--- a/source3/rpc_server/srv_lsa_nt.c
+++ b/source3/rpc_server/srv_lsa_nt.c
@@ -979,7 +979,7 @@ NTSTATUS _lsa_LookupSids2(pipes_struct *p,
struct lsa_TranslatedName2 *names = NULL;
bool check_policy = true;
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_LSA_LOOKUPSIDS3:
check_policy = false;
break;
@@ -1237,7 +1237,7 @@ NTSTATUS _lsa_LookupNames3(pipes_struct *p,
int flags = 0;
bool check_policy = true;
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_LSA_LOOKUPNAMES4:
check_policy = false;
break;
diff --git a/source3/rpc_server/srv_netlog_nt.c b/source3/rpc_server/srv_netlog_nt.c
index c7ff3ddeeb..ebd37241a6 100644
--- a/source3/rpc_server/srv_netlog_nt.c
+++ b/source3/rpc_server/srv_netlog_nt.c
@@ -185,7 +185,7 @@ WERROR _netr_LogonControl2Ex(pipes_struct *p,
const char *fn;
uint32_t acct_ctrl;
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_NETR_LOGONCONTROL:
fn = "_netr_LogonControl";
break;
@@ -836,7 +836,7 @@ NTSTATUS _netr_ServerAuthenticate3(pipes_struct *p,
srv_flgs |= NETLOGON_NEG_SCHANNEL;
}
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_NETR_SERVERAUTHENTICATE:
fn = "_netr_ServerAuthenticate";
break;
@@ -1226,7 +1226,7 @@ static NTSTATUS _netr_LogonSamLogon_base(pipes_struct *p,
bool process_creds = true;
const char *fn;
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_NETR_LOGONSAMLOGON:
process_creds = true;
fn = "_netr_LogonSamLogon";
diff --git a/source3/rpc_server/srv_pipe.c b/source3/rpc_server/srv_pipe.c
index a39ed93e71..e3ab09d8db 100644
--- a/source3/rpc_server/srv_pipe.c
+++ b/source3/rpc_server/srv_pipe.c
@@ -2515,17 +2515,17 @@ static bool api_rpcTNP(pipes_struct *p,
/* interpret the command */
DEBUG(4,("api_rpcTNP: %s op 0x%x - ",
get_pipe_name_from_syntax(talloc_tos(), &p->syntax),
- p->hdr_req.opnum));
+ p->opnum));
if (DEBUGLEVEL >= 50) {
fstring name;
slprintf(name, sizeof(name)-1, "in_%s",
get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
- prs_dump(name, p->hdr_req.opnum, &p->in_data.data);
+ prs_dump(name, p->opnum, &p->in_data.data);
}
for (fn_num = 0; fn_num < n_cmds; fn_num++) {
- if (api_rpc_cmds[fn_num].opnum == p->hdr_req.opnum && api_rpc_cmds[fn_num].fn != NULL) {
+ if (api_rpc_cmds[fn_num].opnum == p->opnum && api_rpc_cmds[fn_num].fn != NULL) {
DEBUG(3,("api_rpcTNP: rpc command: %s\n", api_rpc_cmds[fn_num].name));
break;
}
@@ -2575,7 +2575,7 @@ static bool api_rpcTNP(pipes_struct *p,
fstring name;
slprintf(name, sizeof(name)-1, "out_%s",
get_pipe_name_from_syntax(talloc_tos(), &p->syntax));
- prs_dump(name, p->hdr_req.opnum, &p->out_data.rdata);
+ prs_dump(name, p->opnum, &p->out_data.rdata);
}
prs_set_offset(&p->out_data.rdata, offset2);
diff --git a/source3/rpc_server/srv_pipe_hnd.c b/source3/rpc_server/srv_pipe_hnd.c
index eeb18c14fe..2cecd89781 100644
--- a/source3/rpc_server/srv_pipe_hnd.c
+++ b/source3/rpc_server/srv_pipe_hnd.c
@@ -304,6 +304,9 @@ static bool process_request_pdu(pipes_struct *p, prs_struct *rpc_in_p)
return False;
}
+ /* Save the operation number */
+ p->opnum = p->hdr_req.opnum;
+
switch(p->auth.auth_type) {
case PIPE_AUTH_TYPE_NONE:
break;
diff --git a/source3/rpc_server/srv_samr_nt.c b/source3/rpc_server/srv_samr_nt.c
index 7b74fd8e60..098b13536f 100644
--- a/source3/rpc_server/srv_samr_nt.c
+++ b/source3/rpc_server/srv_samr_nt.c
@@ -3999,7 +3999,7 @@ NTSTATUS _samr_Connect2(pipes_struct *p,
size_t sd_size;
const char *fn = "_samr_Connect2";
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_SAMR_CONNECT2:
fn = "_samr_Connect2";
break;
diff --git a/source3/rpc_server/srv_spoolss_nt.c b/source3/rpc_server/srv_spoolss_nt.c
index 3b7b2a62dc..27f428b2c4 100644
--- a/source3/rpc_server/srv_spoolss_nt.c
+++ b/source3/rpc_server/srv_spoolss_nt.c
@@ -7352,7 +7352,7 @@ WERROR _spoolss_AddPrinterDriverEx(pipes_struct *p,
uint32_t version;
const char *fn;
- switch (p->hdr_req.opnum) {
+ switch (p->opnum) {
case NDR_SPOOLSS_ADDPRINTERDRIVER:
fn = "_spoolss_AddPrinterDriver";
break;