summaryrefslogtreecommitdiff
path: root/source4
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2011-11-08 18:19:54 +0100
committerMichael Adam <obnox@samba.org>2011-11-09 01:02:08 +0100
commit901cab2deff08917471998bede7fcd245cd89266 (patch)
treed9a707cddf168667787650c21843e5cef04642a6 /source4
parentef6c0974a0899bf5add9bd031db8c734fc5cb536 (diff)
downloadsamba-901cab2deff08917471998bede7fcd245cd89266.tar.gz
samba-901cab2deff08917471998bede7fcd245cd89266.tar.bz2
samba-901cab2deff08917471998bede7fcd245cd89266.zip
s4:torture:smb2: add smb2_lease_create_share() that takes a sharemode as parameter
Diffstat (limited to 'source4')
-rw-r--r--source4/torture/smb2/util.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/source4/torture/smb2/util.c b/source4/torture/smb2/util.c
index 973e76db31..db7e8a5713 100644
--- a/source4/torture/smb2/util.c
+++ b/source4/torture/smb2/util.c
@@ -618,12 +618,22 @@ void smb2_generic_create(struct smb2_create *io, struct smb2_lease *ls,
leasekey, leasestate);
}
+void smb2_lease_create_share(struct smb2_create *io, struct smb2_lease *ls,
+ bool dir, const char *name, uint32_t share_access,
+ uint64_t leasekey, uint32_t leasestate)
+{
+ smb2_generic_create_share(io, ls, dir, name, NTCREATEX_DISP_OPEN_IF,
+ share_access, SMB2_OPLOCK_LEVEL_LEASE,
+ leasekey, leasestate);
+}
+
void smb2_lease_create(struct smb2_create *io, struct smb2_lease *ls,
bool dir, const char *name, uint64_t leasekey,
uint32_t leasestate)
{
- smb2_generic_create(io, ls, dir, name, NTCREATEX_DISP_OPEN_IF,
- SMB2_OPLOCK_LEVEL_LEASE, leasekey, leasestate);
+ smb2_lease_create_share(io, ls, dir, name,
+ smb2_util_share_access("RWD"),
+ leasekey, leasestate);
}
void smb2_oplock_create(struct smb2_create *io, const char *name, uint8_t oplock)