summaryrefslogtreecommitdiff
path: root/source3/smbd/ipc.c
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>1997-10-30 21:51:15 +0000
committerLuke Leighton <lkcl@samba.org>1997-10-30 21:51:15 +0000
commit55e2dc7c6f4378adfdcbd166b2680096a3e4a5a4 (patch)
tree91087a9b41b3935d5b537c7aaab5a4f2fbd505c1 /source3/smbd/ipc.c
parent3e0fb1883cb8100d2cb696eb61fbc2798cb9da49 (diff)
downloadsamba-55e2dc7c6f4378adfdcbd166b2680096a3e4a5a4.tar.gz
samba-55e2dc7c6f4378adfdcbd166b2680096a3e4a5a4.tar.bz2
samba-55e2dc7c6f4378adfdcbd166b2680096a3e4a5a4.zip
storing pipe name state (from set named pipe handle state call) in the
pipes array. (This used to be commit 5335d5cdc4659f4676958f0399e2de29a117c133)
Diffstat (limited to 'source3/smbd/ipc.c')
-rw-r--r--source3/smbd/ipc.c24
1 files changed, 14 insertions, 10 deletions
diff --git a/source3/smbd/ipc.c b/source3/smbd/ipc.c
index a42baea80a..1943129ba6 100644
--- a/source3/smbd/ipc.c
+++ b/source3/smbd/ipc.c
@@ -2871,15 +2871,11 @@ struct
} api_fd_commands [] =
{
#ifdef NTDOMAIN
- { "SetNmdPpHndState", "lsarpc", "lsass", 1, api_LsarpcSNPHS },
- { "SetNmdPpHndState", "srvsvc", "lsass", 1, api_LsarpcSNPHS },
- { "SetNmdPpHndState", "NETLOGON", "NETLOGON", 1, api_LsarpcSNPHS },
{ "TransactNmPipe", "lsarpc", "lsass", 0x26, api_ntLsarpcTNP },
{ "TransactNmPipe", "srvsvc", "lsass", 0x26, api_srvsvcTNP },
{ "TransactNmPipe", "NETLOGON", "NETLOGON", 0x26, api_netlogrpcTNP },
{ NULL, NULL, NULL, -1, (BOOL (*)())api_Unsupported }
#else
- { "SetNmdPpHndState", "lsarpc", 1, api_LsarpcSNPHS },
{ "TransactNmPipe" , "lsarpc", 0x26, api_LsarpcTNP },
{ NULL, NULL, -1, (BOOL (*)())api_Unsupported }
#endif
@@ -2899,6 +2895,7 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf,
BOOL reply = False;
BOOL bind_req = False;
+ BOOL set_nphs = False;
int i;
int fd;
@@ -2943,6 +2940,7 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf,
rparam = (char *)malloc(1024); if (rparam) bzero(rparam,1024);
#ifdef NTDOMAIN
+ /* RPC Pipe command 0x26. */
if (data != NULL && api_fd_commands[i].subcommand == 0x26)
{
RPC_HDR hdr;
@@ -2988,7 +2986,14 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf,
}
#endif
- if (!bind_req)
+ /* Set Named Pipe Handle state */
+ if (subcommand == 0x1)
+ {
+ set_nphs = True;
+ reply = api_LsarpcSNPHS(fd, cnum, params);
+ }
+
+ if (!bind_req && !set_nphs)
{
DEBUG(10,("calling api_fd_command\n"));
@@ -3003,19 +3008,18 @@ static int api_fd_reply(int cnum,uint16 vuid,char *outbuf,
&rdata,&rparam,&rdata_len,&rparam_len);
}
-
/* if we get False back then it's actually unsupported */
if (!reply)
+ {
api_Unsupported(cnum,vuid,params,data,mdrcnt,mprcnt,
&rdata,&rparam,&rdata_len,&rparam_len);
+ }
/* now send the reply */
send_trans_reply(outbuf,rdata,rparam,NULL,rdata_len,rparam_len,0);
- if (rdata)
- free(rdata);
- if (rparam)
- free(rparam);
+ if (rdata ) free(rdata );
+ if (rparam) free(rparam);
return(-1);
}