summaryrefslogtreecommitdiff
path: root/source3/pipentlsa.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-22 17:51:02 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-22 17:51:02 +0000
commita947dff4c001023d0f7c2f6f13c3a4b594c88139 (patch)
tree8ca4b41e80837d163b0507ac8066c4a96ed654f3 /source3/pipentlsa.c
parent5897f0493d0665ae53ea181e122c467faa0c7642 (diff)
downloadsamba-a947dff4c001023d0f7c2f6f13c3a4b594c88139.tar.gz
samba-a947dff4c001023d0f7c2f6f13c3a4b594c88139.tar.bz2
samba-a947dff4c001023d0f7c2f6f13c3a4b594c88139.zip
Makefile client.c :
adding start of undocumented options to do NT domain logons, client-side. starting with LSA_REQCHAL. the code here happily crashes smbd: i'll investigate this further... :-) smbparse.c pipeutil.c lsaparse.c : moved some of the common make_xxxx() functions out of pipeutil.c so that the make_xxxx and (smb/lsa)_io_xxxx functions now sit together. makes sense, really... added a make_q_req_chal() function. restructured make_rpc_reply() and called it make_rpc_hdr(). created functions create_rpc_reply() and create_rpc_response(). pipenetlog.c pipentlsa.c pipesrvsvc.c calling new create_rpc_reply() function instead of old make_rpc_reply(). proto.h : usual. smb.h: added enum for RPC_PACKET_TYPE (This used to be commit b88ee3e16c6b671069f53ca2e9c5694ec8b1c030)
Diffstat (limited to 'source3/pipentlsa.c')
-rw-r--r--source3/pipentlsa.c16
1 files changed, 9 insertions, 7 deletions
diff --git a/source3/pipentlsa.c b/source3/pipentlsa.c
index 592cf8901e..cabde4f8cd 100644
--- a/source3/pipentlsa.c
+++ b/source3/pipentlsa.c
@@ -300,10 +300,12 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
char **rdata,char **rparam,
int *rdata_len,int *rparam_len)
{
- uint16 opnum = SVAL(data,22);
+ /* 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);
- int pkttype = CVAL(data, 2);
- if (pkttype == 0x0b) /* RPC BIND */
+ if (pkttype == RPC_BIND) /* RPC BIND */
{
DEBUG(4,("netlogon rpc bind %x\n",pkttype));
LsarpcTNP1(data,rdata,rdata_len);
@@ -317,7 +319,7 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
{
DEBUG(3,("LSA_OPENPOLICY\n"));
api_lsa_open_policy(param, data, rdata, rdata_len);
- make_rpc_reply(data, *rdata, *rdata_len);
+ create_rpc_reply(call_id, *rdata, *rdata_len);
break;
}
@@ -326,7 +328,7 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
DEBUG(3,("LSA_QUERYINFOPOLICY\n"));
api_lsa_query_info(param, data, rdata, rdata_len);
- make_rpc_reply(data, *rdata, *rdata_len);
+ create_rpc_reply(call_id, *rdata, *rdata_len);
break;
}
@@ -394,7 +396,7 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
{
DEBUG(3,("LSA_OPENSECRET\n"));
api_lsa_lookup_sids(param, data, rdata, rdata_len);
- make_rpc_reply(data, *rdata, *rdata_len);
+ create_rpc_reply(call_id, *rdata, *rdata_len);
break;
}
@@ -402,7 +404,7 @@ BOOL api_ntLsarpcTNP(int cnum,int uid, char *param,char *data,
{
DEBUG(3,("LSA_LOOKUPNAMES\n"));
api_lsa_lookup_names(param, data, rdata, rdata_len);
- make_rpc_reply(data, *rdata, *rdata_len);
+ create_rpc_reply(call_id, *rdata, *rdata_len);
break;
}