summaryrefslogtreecommitdiff
path: root/source4/torture/smb2/util.c
diff options
context:
space:
mode:
authorAndrew Bartlett <abartlet@samba.org>2008-05-21 12:13:45 +1000
committerAndrew Bartlett <abartlet@samba.org>2008-05-21 12:13:45 +1000
commitfdec7fdaf5d4150e14311d9b3bb2da7358a407ff (patch)
tree5fbeb5de11214711f780e69c5e9ad1210c2e861e /source4/torture/smb2/util.c
parent2f773ff347ec2828f94f4980a3aedbde37009737 (diff)
parent6d4424cd45333c3029b0272528485dd2b3f8e620 (diff)
downloadsamba-fdec7fdaf5d4150e14311d9b3bb2da7358a407ff.tar.gz
samba-fdec7fdaf5d4150e14311d9b3bb2da7358a407ff.tar.bz2
samba-fdec7fdaf5d4150e14311d9b3bb2da7358a407ff.zip
Merge branch 'v4-0-test' of ssh://git.samba.org/data/git/samba into 4-0-local
(This used to be commit 7594f79db6a0e8a46e2863829e5e050b03dfaec1)
Diffstat (limited to 'source4/torture/smb2/util.c')
-rw-r--r--source4/torture/smb2/util.c42
1 files changed, 1 insertions, 41 deletions
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 6ac3926c98..af4f345104 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -22,6 +22,7 @@
#include "includes.h"
#include "libcli/smb2/smb2.h"
#include "libcli/smb2/smb2_calls.h"
+#include "libcli/smb_composite/smb_composite.h"
#include "lib/cmdline/popt_common.h"
#include "lib/events/events.h"
#include "system/time.h"
@@ -34,47 +35,6 @@
/*
- close a handle with SMB2
-*/
-NTSTATUS smb2_util_close(struct smb2_tree *tree, struct smb2_handle h)
-{
- struct smb2_close c;
-
- ZERO_STRUCT(c);
- c.in.file.handle = h;
-
- return smb2_close(tree, &c);
-}
-
-/*
- unlink a file with SMB2
-*/
-NTSTATUS smb2_util_unlink(struct smb2_tree *tree, const char *fname)
-{
- struct smb2_create io;
- NTSTATUS status;
-
- ZERO_STRUCT(io);
- io.in.desired_access = SEC_RIGHTS_FILE_ALL;
- io.in.file_attributes = FILE_ATTRIBUTE_NORMAL;
- io.in.create_disposition = NTCREATEX_DISP_OPEN;
- io.in.share_access =
- NTCREATEX_SHARE_ACCESS_DELETE|
- NTCREATEX_SHARE_ACCESS_READ|
- NTCREATEX_SHARE_ACCESS_WRITE;
- io.in.create_options = NTCREATEX_OPTIONS_DELETE_ON_CLOSE;
- io.in.fname = fname;
-
- status = smb2_create(tree, tree, &io);
- if (NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_NOT_FOUND)) {
- return NT_STATUS_OK;
- }
- NT_STATUS_NOT_OK_RETURN(status);
-
- return smb2_util_close(tree, io.out.file.handle);
-}
-
-/*
write to a file on SMB2
*/
NTSTATUS smb2_util_write(struct smb2_tree *tree,