From 203c93e9221bfa71a00165f251695cafb92f035b Mon Sep 17 00:00:00 2001 From: Luke Leighton Date: Thu, 23 Oct 1997 16:17:07 +0000 Subject: general sorting out, from crashes generated by do_lsa_req_chal() in client.c trying to set up the data parameters etc and not understanding what's going on. in api_netlogTNP, added smb_io_rpc_hdr() call to decode the header received (and in this instance, generated by do_lsa_req_chal()). and then noticed that it's two bytes out. but i don't know how to do "byte parameters" and it's not the same format as the LSA_REQCHAL received from nt workstations. agh! (This used to be commit 0cc8ce43e1d54b44237bb525f4cf6b77e7ca3ced) --- source3/pipentlsa.c | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'source3/pipentlsa.c') diff --git a/source3/pipentlsa.c b/source3/pipentlsa.c index cabde4f8cd..69a8030f53 100644 --- a/source3/pipentlsa.c +++ b/source3/pipentlsa.c @@ -300,10 +300,20 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data, char **rdata,char **rparam, int *rdata_len,int *rparam_len) { + int pkttype; + uint32 call_id; + uint16 opnum; + + if (data == NULL) + { + DEBUG(2, ("api_ntLsarpcTNP: NULL data parameter\n")); + return False; + } + /* really should decode these using an RPC_HDR structure */ - int pkttype = CVAL(data, 2); - uint32 call_id = CVAL(data, 12); - uint16 opnum = SVAL(data, 22); + pkttype = CVAL(data, 2); + call_id = CVAL(data, 12); + opnum = SVAL(data, 22); if (pkttype == RPC_BIND) /* RPC BIND */ { -- cgit