summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm2
-rw-r--r--source3/rpc_server/lsa/srv_lsa_nt.c6
-rw-r--r--source3/rpc_server/netlogon/srv_netlog_nt.c13
-rw-r--r--source3/rpc_server/rpc_pipes.h3
-rw-r--r--source3/rpc_server/samr/srv_samr_nt.c4
-rw-r--r--source3/rpc_server/spoolss/srv_iremotewinspool.c2
6 files changed, 16 insertions, 14 deletions
diff --git a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
index e35813a24ab..b8d9318b9de 100644
--- a/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
+++ b/pidl/lib/Parse/Pidl/Samba4/NDR/ServerCompat.pm
@@ -296,8 +296,6 @@ sub boilerplate_iface($)
$self->pidl("");
$self->pidl("/* Retrieve pipes struct */");
$self->pidl("p = dcesrv_get_pipes_struct(dce_call->conn);");
- $self->pidl("/* Update pipes struct opnum */");
- $self->pidl("p->opnum = opnum;");
$self->pidl("p->dce_call = dce_call;");
$self->pidl("p->mem_ctx = mem_ctx;");
$self->pidl("/* Update pipes struct session info */");
diff --git a/source3/rpc_server/lsa/srv_lsa_nt.c b/source3/rpc_server/lsa/srv_lsa_nt.c
index 817fa354864..8d341b616b1 100644
--- a/source3/rpc_server/lsa/srv_lsa_nt.c
+++ b/source3/rpc_server/lsa/srv_lsa_nt.c
@@ -1002,6 +1002,7 @@ NTSTATUS _lsa_LookupSids(struct pipes_struct *p,
static NTSTATUS _lsa_LookupSids_common(struct pipes_struct *p,
struct lsa_LookupSids2 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
NTSTATUS status;
struct lsa_info *handle;
int num_sids = r->in.sids->num_sids;
@@ -1010,7 +1011,7 @@ static NTSTATUS _lsa_LookupSids_common(struct pipes_struct *p,
struct lsa_TranslatedName2 *names = NULL;
bool check_policy = true;
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_LSA_LOOKUPSIDS3:
check_policy = false;
break;
@@ -1289,6 +1290,7 @@ NTSTATUS _lsa_LookupNames2(struct pipes_struct *p,
static NTSTATUS _lsa_LookupNames_common(struct pipes_struct *p,
struct lsa_LookupNames3 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
NTSTATUS status;
struct lsa_info *handle;
struct lsa_String *names = r->in.names;
@@ -1299,7 +1301,7 @@ static NTSTATUS _lsa_LookupNames_common(struct pipes_struct *p,
int flags = 0;
bool check_policy = true;
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_LSA_LOOKUPNAMES4:
check_policy = false;
break;
diff --git a/source3/rpc_server/netlogon/srv_netlog_nt.c b/source3/rpc_server/netlogon/srv_netlog_nt.c
index 51a5663b9da..5d22f83afb0 100644
--- a/source3/rpc_server/netlogon/srv_netlog_nt.c
+++ b/source3/rpc_server/netlogon/srv_netlog_nt.c
@@ -28,6 +28,7 @@
#include "system/passwd.h" /* uid_wrapper */
#include "ntdomain.h"
#include "../libcli/auth/schannel.h"
+#include "librpc/rpc/dcesrv_core.h"
#include "librpc/gen_ndr/ndr_netlogon.h"
#include "librpc/gen_ndr/ndr_netlogon_scompat.h"
#include "librpc/gen_ndr/ndr_samr_c.h"
@@ -187,6 +188,7 @@ static bool wb_check_trust_creds(const char *domain, WERROR *tc_status)
WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
struct netr_LogonControl2Ex *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
uint32_t flags = 0x0;
WERROR pdc_connection_status = WERR_OK;
uint32_t logon_attempts = 0x0;
@@ -203,7 +205,7 @@ WERROR _netr_LogonControl2Ex(struct pipes_struct *p,
NTSTATUS status;
struct netr_DsRGetDCNameInfo *dc_info;
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_NETR_LOGONCONTROL:
fn = "_netr_LogonControl";
break;
@@ -850,6 +852,7 @@ NTSTATUS _netr_ServerAuthenticate(struct pipes_struct *p,
NTSTATUS _netr_ServerAuthenticate3(struct pipes_struct *p,
struct netr_ServerAuthenticate3 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
NTSTATUS status;
uint32_t srv_flgs;
/* r->in.negotiate_flags is an aliased pointer to r->out.negotiate_flags,
@@ -917,7 +920,7 @@ NTSTATUS _netr_ServerAuthenticate3(struct pipes_struct *p,
srv_flgs &= ~NETLOGON_NEG_ARCFOUR;
}
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_NETR_SERVERAUTHENTICATE:
fn = "_netr_ServerAuthenticate";
break;
@@ -1044,6 +1047,7 @@ static NTSTATUS netr_creds_server_step_check(struct pipes_struct *p,
struct netr_Authenticator *return_authenticator,
struct netlogon_creds_CredentialState **creds_out)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
NTSTATUS status;
bool schannel_global_required = (lp_server_schannel() == true) ? true:false;
bool schannel_required = schannel_global_required;
@@ -1051,7 +1055,7 @@ static NTSTATUS netr_creds_server_step_check(struct pipes_struct *p,
struct loadparm_context *lp_ctx;
struct netlogon_creds_CredentialState *creds = NULL;
enum dcerpc_AuthType auth_type = DCERPC_AUTH_TYPE_NONE;
- uint16_t opnum = p->opnum;
+ uint16_t opnum = dce_call->pkt.u.request.opnum;
const char *opname = "<unknown>";
static bool warned_global_once = false;
@@ -1722,6 +1726,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
struct netr_LogonSamLogonEx *r,
struct netlogon_creds_CredentialState *creds)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
NTSTATUS status = NT_STATUS_OK;
union netr_LogonLevel *logon = r->in.logon;
const char *nt_username, *nt_domain, *nt_workstation;
@@ -1740,7 +1745,7 @@ static NTSTATUS _netr_LogonSamLogon_base(struct pipes_struct *p,
}
#endif
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_NETR_LOGONSAMLOGON:
fn = "_netr_LogonSamLogon";
break;
diff --git a/source3/rpc_server/rpc_pipes.h b/source3/rpc_server/rpc_pipes.h
index 5a0dcad8526..f2fa11e29cb 100644
--- a/source3/rpc_server/rpc_pipes.h
+++ b/source3/rpc_server/rpc_pipes.h
@@ -67,9 +67,6 @@ struct pipes_struct {
/* handle database to use on this pipe. */
struct dcesrv_call_state *dce_call;
- /* operation number retrieved from the rpc header */
- uint16_t opnum;
-
/* private data for the interface implementation */
void *private_data;
diff --git a/source3/rpc_server/samr/srv_samr_nt.c b/source3/rpc_server/samr/srv_samr_nt.c
index 07d94c57726..32226b09af6 100644
--- a/source3/rpc_server/samr/srv_samr_nt.c
+++ b/source3/rpc_server/samr/srv_samr_nt.c
@@ -35,6 +35,7 @@
#include "system/passwd.h"
#include "../libcli/auth/libcli_auth.h"
#include "ntdomain.h"
+#include "librpc/rpc/dcesrv_core.h"
#include "../librpc/gen_ndr/ndr_samr.h"
#include "../librpc/gen_ndr/ndr_samr_scompat.h"
#include "rpc_server/samr/srv_samr_util.h"
@@ -4051,6 +4052,7 @@ NTSTATUS _samr_Connect(struct pipes_struct *p,
NTSTATUS _samr_Connect2(struct pipes_struct *p,
struct samr_Connect2 *r)
{
+ struct dcesrv_call_state *dce_call = p->dce_call;
struct security_descriptor *psd = NULL;
uint32_t acc_granted;
uint32_t des_access = r->in.access_mask;
@@ -4058,7 +4060,7 @@ NTSTATUS _samr_Connect2(struct pipes_struct *p,
size_t sd_size;
const char *fn = "_samr_Connect2";
- switch (p->opnum) {
+ switch (dce_call->pkt.u.request.opnum) {
case NDR_SAMR_CONNECT2:
fn = "_samr_Connect2";
break;
diff --git a/source3/rpc_server/spoolss/srv_iremotewinspool.c b/source3/rpc_server/spoolss/srv_iremotewinspool.c
index d6a983c722a..014fa6cab9b 100644
--- a/source3/rpc_server/spoolss/srv_iremotewinspool.c
+++ b/source3/rpc_server/spoolss/srv_iremotewinspool.c
@@ -97,8 +97,6 @@ static NTSTATUS iremotewinspool__op_dispatch_internal(struct dcesrv_call_state *
/* Retrieve pipes struct */
p = dcesrv_get_pipes_struct(dce_call->conn);
- /* Update pipes struct opnum */
- p->opnum = opnum;
p->dce_call = dce_call;
p->mem_ctx = mem_ctx;
/* Update pipes struct session info */