diff options
author | Luke Leighton <lkcl@samba.org> | 1997-10-22 18:37:43 +0000 |
---|---|---|
committer | Luke Leighton <lkcl@samba.org> | 1997-10-22 18:37:43 +0000 |
commit | d38aba33afefc5791c1a672f5786bf2d8da8dda8 (patch) | |
tree | a71714d8db5183376ad82e978606269f97ba7c56 /source3 | |
parent | a947dff4c001023d0f7c2f6f13c3a4b594c88139 (diff) | |
download | samba-d38aba33afefc5791c1a672f5786bf2d8da8dda8.tar.gz samba-d38aba33afefc5791c1a672f5786bf2d8da8dda8.tar.bz2 samba-d38aba33afefc5791c1a672f5786bf2d8da8dda8.zip |
client.c :
send to \PIPE\ not \PIPE\NETLOGON.
ipc.c :
fstring name not being bzero'd caused problems when calling named_pipe().
(This used to be commit 2393c49b0509b8ce021f0acfba135219cd753cf9)
Diffstat (limited to 'source3')
-rw-r--r-- | source3/client/client.c | 4 | ||||
-rw-r--r-- | source3/smbd/ipc.c | 33 |
2 files changed, 26 insertions, 11 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 6d488bd2f5..344c197cc5 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -3547,8 +3547,8 @@ static BOOL cli_lsa_req_chal(void) /* create the request RPC_HDR _after_ the main data: length is now known */ create_rpc_request(call_id, LSA_REQCHAL, param, PTR_DIFF(p, param)); - /* send the data on \PIPE\NETLOGON */ - if (cli_call_api(PIPE_NETLOGON, PTR_DIFF(p, param),0, + /* send the data on \PIPE\ */ + if (cli_call_api("\\PIPE\\", PTR_DIFF(p, param),0, 1024,BUFFER_SIZE, &rprcnt,&rdrcnt, param,NULL, diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c index efae39889d..01502573fc 100644 --- a/source3/smbd/ipc.c +++ b/source3/smbd/ipc.c @@ -2769,6 +2769,7 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf, int fd; int subcommand; + DEBUG(5,("api_fd_reply\n")); /* First find out the name of this file. */ if (suwcnt != 2) { @@ -2976,18 +2977,24 @@ static int named_pipe(int cnum,uint16 vuid, char *outbuf,char *name, int suwcnt,int tdscnt,int tpscnt, int msrcnt,int mdrcnt,int mprcnt) { + DEBUG(3,("named pipe command on <%s> name\n")); - if (strequal(name,"LANMAN")) - return(api_reply(cnum,vuid,outbuf,data,params,tdscnt,tpscnt,mdrcnt,mprcnt)); + if (strequal(name,"LANMAN")) + { + return api_reply(cnum,vuid,outbuf,data,params,tdscnt,tpscnt,mdrcnt,mprcnt); + } -if (strlen(name) < 1) - return(api_fd_reply(cnum,vuid,outbuf,setup,data,params,suwcnt,tdscnt,tpscnt,mdrcnt,mprcnt)); + if (strlen(name) < 1) + { + return api_fd_reply(cnum,vuid,outbuf,setup,data,params,suwcnt,tdscnt,tpscnt,mdrcnt,mprcnt); + } + if (setup) + { + DEBUG(3,("unknown named pipe: setup 0x%X setup1=%d\n", (int)setup[0],(int)setup[1])); + } - DEBUG(3,("named pipe command on <%s> 0x%X setup1=%d\n", - name,(int)setup[0],(int)setup[1])); - - return(0); + return 0; } @@ -3018,6 +3025,7 @@ int reply_trans(char *inbuf,char *outbuf) int dsoff = SVAL(inbuf,smb_vwv12); int suwcnt = CVAL(inbuf,smb_vwv13); + bzero(name, sizeof(name)); fstrcpy(name,smb_buf(inbuf)); if (dscnt > tdscnt || pscnt > tpscnt) { @@ -3096,11 +3104,18 @@ int reply_trans(char *inbuf,char *outbuf) DEBUG(3,("trans <%s> data=%d params=%d setup=%d\n",name,tdscnt,tpscnt,suwcnt)); - if (strncmp(name,"\\PIPE\\",strlen("\\PIPE\\")) == 0) + { + DEBUG(5,("calling named_pipe\n")); outsize = named_pipe(cnum,vuid,outbuf,name+strlen("\\PIPE\\"),setup,data,params, suwcnt,tdscnt,tpscnt,msrcnt,mdrcnt,mprcnt); + } + else + { + DEBUG(3,("invalid pipe name\n")); + outsize = 0; + } if (data) free(data); |