diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-29 00:04:14 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-29 00:04:14 +0000 |
commit | fe0a702322bdf3c76a517e2fd7e92a05219c49dd (patch) | |
tree | 517889b5f9f942d48b323607b6d4c0f998942e04 /source3/smbd | |
parent | ecb952f913e0532e4570753e479f8b8de14b0988 (diff) | |
download | samba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.tar.gz samba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.tar.xz samba-fe0a702322bdf3c76a517e2fd7e92a05219c49dd.zip |
byteorder.h :
added mode for printing debug array data as chars not uint8/16/32s.
only really useful for (uint8) strings or (uint16) unicode strings
lsaparse.c smbparse.c smb.h :
rpc bind and rpc bind ack structures and parsing and creation functions.
ipc.c pipes.c pipenetlog.c pipentlsa.c pipesrvsvc.c :
using rpc bind / bind ack parsing routines instead of incorrect use of
api_LsarpcTNP1 function.
ntclient.c :
creation of do_rpc_bind() function.
THAT'S IT, FOLKS!
(This used to be commit 21c89e2f17c51939fd6b53dddbe3072419eb0db2)
Diffstat (limited to 'source3/smbd')
-rw-r--r-- | source3/smbd/ipc.c | 48 | ||||
-rw-r--r-- | source3/smbd/pipes.c | 2 |
2 files changed, 44 insertions, 6 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index 65f85719ae4..b7939f2461c 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -2893,7 +2893,8 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf, int rdata_len = 0; int rparam_len = 0; - BOOL reply = False; + BOOL reply = False; + BOOL bind_req = False; int i; int fd; @@ -2940,12 +2941,49 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf, rdata = (char *)malloc(1024); if (rdata ) bzero(rdata ,1024); rparam = (char *)malloc(1024); if (rparam) bzero(rparam,1024); - DEBUG(10,("calling api_fd_command\n")); +#ifdef NTDOMAIN + if (api_fd_commands[i].subcommand != -1) + { + RPC_HDR hdr; + char *q = smb_io_rpc_hdr(True, &hdr, data, data, 4, 0); + + if ((bind_req = ((q != NULL) && (hdr.pkt_type == RPC_BIND)))) + { + RPC_HDR_RB hdr_rb; + + char *p = smb_io_rpc_hdr_rb(True, &hdr_rb, q, data, 4, 0); + + if ((bind_req = (p != NULL))) + { + RPC_HDR_BA hdr_ba; + make_rpc_hdr_ba(&hdr_ba, + hdr_rb.bba.max_tsize, hdr_rb.bba.max_rsize, hdr_rb.bba.assoc_gid, + api_fd_commands[i].pipename, + 0x1, 0x0, 0x0, + &(hdr_rb.transfer)); + + p = smb_io_rpc_hdr_ba(False, &hdr_ba, rdata + 0x10, rdata, 4, 0); + + rdata_len = PTR_DIFF(p, rdata); + + make_rpc_hdr(&hdr, RPC_BINDACK, hdr.call_id, rdata_len); - reply = api_fd_commands[i].fn(cnum,vuid,params,data,mdrcnt,mprcnt, + p = smb_io_rpc_hdr(False, &hdr, rdata, rdata, 4, 0); + + reply = (p != NULL); + } + } + } +#endif + + if (!bind_req) + { + DEBUG(10,("calling api_fd_command\n")); + + reply = api_fd_commands[i].fn(cnum,vuid,params,data,mdrcnt,mprcnt, &rdata,&rparam,&rdata_len,&rparam_len); - - DEBUG(10,("called api_fd_command\n")); + DEBUG(10,("called api_fd_command\n")); + } if (rdata_len > mdrcnt || rparam_len > mprcnt) { diff --git a/source3/smbd/pipes.c b/source3/smbd/pipes.c index 12e54d2bcad..901d7e682ab 100644 --- a/source3/smbd/pipes.c +++ b/source3/smbd/pipes.c @@ -216,7 +216,7 @@ BOOL api_LsarpcSNPHS(int cnum,int uid, char *param,char *data, TransactNamedPipe on \PIPE\lsarpc. ****************************************************************************/ -void LsarpcTNP1(char *data,char **rdata, int *rdata_len) +static void LsarpcTNP1(char *data,char **rdata, int *rdata_len) { uint32 dword1, dword2; char pname[] = "\\PIPE\\lsass"; |