summaryrefslogtreecommitdiff
path: root/source3/torture/locktest2.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
committerJeremy Allison <jra@samba.org>2009-04-30 15:26:43 -0700
commit8cf78ff55312768d0b454b1d7e0560e04e6296da (patch)
tree0a2180f063e3bb9872c2565c92075dfb5dccac81 /source3/torture/locktest2.c
parentab4b8c9c0438bc5afca17e3ebf05dde6f98bc0aa (diff)
downloadsamba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.gz
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.tar.bz2
samba-8cf78ff55312768d0b454b1d7e0560e04e6296da.zip
Get medieval on our ass about SMB1 file descriptors being 16 bits, not an int.
Convert all uses of cli_open(), cli_nt_createXXX to NTSTATUS versions. This is smaller than it looks, it just fixes a lot of old code. Next up, ensure all cli_XX functions return NTSTATUS. Jeremy.
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) {