summaryrefslogtreecommitdiff
path: root/source3/torture/locktest2.c
diff options
context:
space:
mode:
Diffstat (limited to 'source3/torture/locktest2.c')
-rw-r--r--source3/torture/locktest2.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/source3/torture/locktest2.c b/source3/torture/locktest2.c
index 10e2cbe772..9cb531450c 100644
--- a/source3/torture/locktest2.c
+++ b/source3/torture/locktest2.c
@@ -68,7 +68,13 @@ static int try_open(struct cli_state *c, char *nfs, int fstype, const char *fnam
switch (fstype) {
case FSTYPE_SMB:
- return cli_open(c, fname, flags, DENY_NONE);
+ {
+ uint16_t fd;
+ if (!NT_STATUS_IS_OK(cli_open(c, fname, flags, DENY_NONE, &fd))) {
+ return -1;
+ }
+ return fd;
+ }
case FSTYPE_NFS:
if (asprintf(&path, "%s%s", nfs, fname) > 0) {