From 6724c0185cb81b16fc081691711aafdf06a8253d Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Fri, 25 Nov 2005 11:11:47 +0000 Subject: r11903: added smb2_tdis() (opcode 4) (This used to be commit d606b45b5b6065b5d06024bcce00a23084a20eac) --- source4/libcli/smb2/tdis.c | 67 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 source4/libcli/smb2/tdis.c (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c new file mode 100644 index 0000000000..c08370d9e0 --- /dev/null +++ b/source4/libcli/smb2/tdis.c @@ -0,0 +1,67 @@ +/* + Unix SMB/CIFS implementation. + + SMB2 client tdis handling + + Copyright (C) Andrew Tridgell 2005 + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. +*/ + +#include "includes.h" +#include "libcli/raw/libcliraw.h" +#include "libcli/smb2/smb2.h" +#include "libcli/smb2/smb2_calls.h" + +/* + send a tdis request +*/ +struct smb2_request *smb2_tdis_send(struct smb2_tree *tree) +{ + struct smb2_request *req; + + req = smb2_request_init_tree(tree, SMB2_OP_TDIS, 0x04, 0); + if (req == NULL) return NULL; + + SSVAL(req->out.body, 0x02, 0); + + smb2_transport_send(req); + + return req; +} + + +/* + recv a tdis reply +*/ +NTSTATUS smb2_tdis_recv(struct smb2_request *req) +{ + if (!smb2_request_receive(req) || + smb2_request_is_error(req)) { + return smb2_request_destroy(req); + } + + SMB2_CHECK_PACKET_RECV(req, 0x04, False); + return smb2_request_destroy(req); +} + +/* + sync tdis request +*/ +NTSTATUS smb2_tdis(struct smb2_tree *tree) +{ + struct smb2_request *req = smb2_tdis_send(tree); + return smb2_tdis_recv(req); +} -- cgit From d4de4c2d210d2e8c9b5aedf70695594809ad6a0b Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Fri, 30 Dec 2005 13:16:54 +0000 Subject: r12608: Remove some unused #include lines. (This used to be commit 70e7449318aa0e9d2639c76730a7d1683b2f4981) --- source4/libcli/smb2/tdis.c | 2 -- 1 file changed, 2 deletions(-) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index c08370d9e0..7d1f7aee4e 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -21,9 +21,7 @@ */ #include "includes.h" -#include "libcli/raw/libcliraw.h" #include "libcli/smb2/smb2.h" -#include "libcli/smb2/smb2_calls.h" /* send a tdis request -- cgit From 63d718e243fd03e6ea24c47e7442975ec088a5b5 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Tue, 3 Jan 2006 17:27:33 +0000 Subject: r12696: Reduce the size of include/structs.h (This used to be commit 63917616016133c623fc6ff59454bc313ee7dd8f) --- source4/libcli/smb2/tdis.c | 1 + 1 file changed, 1 insertion(+) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index 7d1f7aee4e..9ea58113b3 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -22,6 +22,7 @@ #include "includes.h" #include "libcli/smb2/smb2.h" +#include "libcli/smb2/smb2_calls.h" /* send a tdis request -- cgit From dc86ab3e454d7219608d01879145dec5609acaa3 Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 11 May 2006 10:47:37 +0000 Subject: r15532: add a BOOL body_dynamic_present, because the body_dynamic_size can be 0 also if the dynamic flag should be set metze (This used to be commit 7829100e1ee79f4f5d24004af221288e19c09b3e) --- source4/libcli/smb2/tdis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index 9ea58113b3..f89e5c8e90 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -31,7 +31,7 @@ struct smb2_request *smb2_tdis_send(struct smb2_tree *tree) { struct smb2_request *req; - req = smb2_request_init_tree(tree, SMB2_OP_TDIS, 0x04, 0); + req = smb2_request_init_tree(tree, SMB2_OP_TDIS, 0x04, False, 0); if (req == NULL) return NULL; SSVAL(req->out.body, 0x02, 0); -- cgit From bd1efc1235b647f6845fb7d6218cf2b4068e9f0a Mon Sep 17 00:00:00 2001 From: Stefan Metzmacher Date: Thu, 29 Jun 2006 11:08:27 +0000 Subject: r16669: this calls don't expect any valid error codes than NT_STATUS_OK metze (This used to be commit 429215113bd999466141df0a2e3b3097d677df1f) --- source4/libcli/smb2/tdis.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index f89e5c8e90..1c6b3e978e 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -48,7 +48,7 @@ struct smb2_request *smb2_tdis_send(struct smb2_tree *tree) NTSTATUS smb2_tdis_recv(struct smb2_request *req) { if (!smb2_request_receive(req) || - smb2_request_is_error(req)) { + !smb2_request_is_ok(req)) { return smb2_request_destroy(req); } -- cgit From 0479a2f1cbae51fcd8dbdc3c148c808421fb4d25 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Tue, 10 Jul 2007 02:07:03 +0000 Subject: r23792: convert Samba4 to GPLv3 There are still a few tidyups of old FSF addresses to come (in both s3 and s4). More commits soon. (This used to be commit fcf38a38ac691abd0fa51b89dc951a08e89fdafa) --- source4/libcli/smb2/tdis.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index 1c6b3e978e..6ad3120740 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -7,7 +7,7 @@ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by - the Free Software Foundation; either version 2 of the License, or + the Free Software Foundation; either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, @@ -16,8 +16,7 @@ GNU General Public License for more details. You should have received a copy of the GNU General Public License - along with this program; if not, write to the Free Software - Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + along with this program. If not, see . */ #include "includes.h" -- cgit From 2151cde58014ea2e822c13d2f8a369b45dc19ca8 Mon Sep 17 00:00:00 2001 From: Jelmer Vernooij Date: Sat, 6 Oct 2007 22:28:14 +0000 Subject: r25554: Convert last instances of BOOL, True and False to the standard types. (This used to be commit 566aa14139510788548a874e9213d91317f83ca9) --- source4/libcli/smb2/tdis.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'source4/libcli/smb2/tdis.c') diff --git a/source4/libcli/smb2/tdis.c b/source4/libcli/smb2/tdis.c index 6ad3120740..5adad9dc6e 100644 --- a/source4/libcli/smb2/tdis.c +++ b/source4/libcli/smb2/tdis.c @@ -30,7 +30,7 @@ struct smb2_request *smb2_tdis_send(struct smb2_tree *tree) { struct smb2_request *req; - req = smb2_request_init_tree(tree, SMB2_OP_TDIS, 0x04, False, 0); + req = smb2_request_init_tree(tree, SMB2_OP_TDIS, 0x04, false, 0); if (req == NULL) return NULL; SSVAL(req->out.body, 0x02, 0); @@ -51,7 +51,7 @@ NTSTATUS smb2_tdis_recv(struct smb2_request *req) return smb2_request_destroy(req); } - SMB2_CHECK_PACKET_RECV(req, 0x04, False); + SMB2_CHECK_PACKET_RECV(req, 0x04, false); return smb2_request_destroy(req); } -- cgit