summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorLuke Leighton <lkcl@samba.org>2000-09-26 05:44:42 +0000
committerLuke Leighton <lkcl@samba.org>2000-09-26 05:44:42 +0000
commitdda54bcd7d6f6d674f197abd323e102fdf7e8dc3 (patch)
tree69af1dfdf9d8d1e8a60cc0ca563c1777e7a36450 /source3/libsmb
parent5be845af6bea3d4795dc50fe9ee880527be5ecc0 (diff)
downloadsamba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.tar.gz
samba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.tar.bz2
samba-dda54bcd7d6f6d674f197abd323e102fdf7e8dc3.zip
added NEGNOWAIT. sent to secure@microsoft.com
(This used to be commit b21179331802aace566671dcff6db22cdf4b3e81)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c38
1 files changed, 38 insertions, 0 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index b18b1276c0..c4b491b056 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -334,6 +334,44 @@ BOOL cli_tdis(struct cli_state *cli)
/****************************************************************************
send a negprot command
****************************************************************************/
+void cli_negprot_send(struct cli_state *cli)
+{
+ char *p;
+ int numprots;
+ int plength;
+
+ memset(cli->outbuf,'\0',smb_size);
+
+ /* setup the protocol strings */
+ for (plength=0,numprots=0;
+ prots[numprots].name && prots[numprots].prot<=cli->protocol;
+ numprots++)
+ plength += strlen(prots[numprots].name)+2;
+
+ set_message(cli->outbuf,0,plength,True);
+
+ p = smb_buf(cli->outbuf);
+ for (numprots=0;
+ prots[numprots].name && prots[numprots].prot<=cli->protocol;
+ numprots++) {
+ *p++ = 2;
+ pstrcpy(p,prots[numprots].name);
+ unix_to_dos(p,True);
+ p += strlen(p) + 1;
+ }
+
+ CVAL(cli->outbuf,smb_com) = SMBnegprot;
+ cli_setup_packet(cli);
+
+ CVAL(smb_buf(cli->outbuf),0) = 2;
+
+ cli_send_smb(cli);
+}
+
+
+/****************************************************************************
+send a negprot command
+****************************************************************************/
BOOL cli_negprot(struct cli_state *cli)
{
char *p;