internal context id.
also fixing issues where i had earlier removed POL_HND_SIZE #define.
rpc_parse/parse_net.o \
rpc_parse/parse_ntlmssp.o rpc_parse/parse_prs.o \
rpc_parse/parse_vuid.o \
- lib/vuser.o lib/vuser_db.o \
- rpc_parse/parse_misc.o
+ lib/vuser.o lib/vuser_db.o
RPC_SRVUTIL_OBJ = rpc_server/srv_pipe_srv.o \
rpc_server/srv_pipe_noauth.o
rpc_parse/parse_brs.o
RPC_PARSE_OBJ2 = rpc_parse/parse_rpc.o \
+ rpc_parse/parse_misc.o \
rpc_parse/parse_netsec.o \
rpc_parse/parse_sec.o \
lib/msrpc-client.o
-# lib/msrpc_use.o
-# lib/msrpc-agent.o
-
RPC_PARSE_OBJ = $(RPC_PARSE_OBJ1) $(RPC_PARSE_OBJ2)
RPC_CLIENT_OBJ = \
nmbd/nmbd_workgroupdb.o nmbd/nmbd_synclists.o
NMBD_OBJ = $(NMBD_OBJ1)
-NMBD_LIBS = $(SMBLIB) $(NMBLIB) $(SAMBALIB) $(UBIQXLIB)
+NMBD_LIBS = $(SMBLIB) $(NMBLIB) $(SAMBALIB) $(UBIQXLIB) $(RPC_PARSE_OBJ2)
SWAT_OBJ = web/cgi.o web/diagnose.o web/startstop.o web/statuspage.o \
web/swat.o libsmb/passchange.o $(LOCKING_OBJ) \
smbwrapper/realcalls.o smbwrapper/shared.o
CLIENT_OBJ = client/client.o client/clitar.o
-CLIENT_LIBS = $(SMBLIB) $(NMBLIB) $(SAMBALIB)
+CLIENT_LIBS = $(SMBLIB) $(NMBLIB) $(SAMBALIB) $(RPC_PARSE_OBJ2)
MOUNT_OBJ = client/smbmount.o client/clientutil.o \
$(RPC_PARSE_OBJ2)
NMBLOOKUP_OBJ = utils/nmblookup.o
-#$(RPC_PARSE_OBJ2)
-
DEBUG2HTML_OBJ = utils/debug2html.o
SMB_AGENT_OBJ = utils/smb-agent.o \
SMBFILTER_OBJ = utils/smbfilter.o \
rpc_parse/parse_creds.o \
- rpc_parse/parse_ntlmssp.o rpc_parse/parse_prs.o \
- rpc_parse/parse_misc.o
+ rpc_parse/parse_ntlmssp.o rpc_parse/parse_prs.o
PROTO_OBJ = $(LIB_OBJ) $(LIBNMB_OBJ) $(PARAM_OBJ) \
$(MSRPCD_OBJ) $(SVCCTLD_OBJ1) $(WINREGD_OBJ1) \
hdr_resp.alloc_hint = data_end - data_start; /* calculate remaining data to be sent */
hdr_resp.cancel_count = 0x0;
- hdr_resp.context_id = 0x0;
+ hdr_resp.context_id = l->hdr_req.context_id;
hdr_resp.reserved = 0x0;
DEBUG(10, ("alloc_hint: %d\n", hdr_resp.alloc_hint));
hdr_resp.alloc_hint = data_end - data_start; /* calculate remaining data to be sent */
hdr_resp.cancel_count = 0x0;
- hdr_resp.context_id = 0x0;
+ hdr_resp.context_id = l->hdr_req.context_id;
hdr_resp.reserved = 0x0;
DEBUG(10, ("alloc_hint: %d\n", hdr_resp.alloc_hint));
static BOOL api_noauth_auth_chk(rpcsrv_struct * l, enum RPC_PKT_TYPE pkt_type)
{
+ extern uint16 ctx_id_table[65536];
+ const vuser_key *key = get_sec_ctx();
l->auth_validated = True;
+ if (key == NULL)
+ {
+ return False;
+ }
+
+ ctx_id_table[l->hdr_rb.context_id] = key->vuid;
+
return True;
}
hdr_resp.alloc_hint = data_end - data_start; /* calculate remaining data to be sent */
hdr_resp.cancel_count = 0x0;
- hdr_resp.context_id = 0x0;
+ hdr_resp.context_id = l->hdr_req.context_id;
hdr_resp.reserved = 0x0;
DEBUG(10, ("alloc_hint: %d\n", hdr_resp.alloc_hint));
extern int DEBUGLEVEL;
+uint16 ctx_id_table[65536];
+
/*******************************************************************
turns a DCE/RPC response stream into a DCE/RPC reply
********************************************************************/
BOOL ret;
prs_struct rhdr;
- uint32 assoc_gid = l->key.pid;
+ uint32 assoc_gid;
l->auth = NULL;
if (assoc_gid == 0)
{
- assoc_gid = 0x1;
+ assoc_gid = getpid();
}
if (l->auth != NULL)
&l->data_i, 0);
if (reply)
{
- if (l->hdr_req.context_id != 0)
- {
- key.vuid =
- l->hdr_req.context_id;
- }
+ key.vuid = ctx_id_table[l->hdr_req.context_id];
reply = become_vuser(&key) ||
become_guest();
TDB_CONTEXT *dom_tdb = NULL;
TDB_CONTEXT *tdb_grp = NULL;
- bzero(alias_pol, POL_HND_SIZE);
+ ZERO_STRUCTP(alias_pol);
/* find the policy handle. open a policy on it. */
if (find_policy_by_hnd(get_global_hnd_cache(), domain_pol) == -1)
return NT_STATUS_OBJECT_NAME_INVALID;
}
- /* strikerXXXX Luke, is this line below needed, or does close_policy_hnd()
- * take care of this? */
-
- /* set up the REG unknown_1 response */
- bzero(pol->data, POL_HND_SIZE);
-
return NT_STATUS_NOPROBLEMO;
}