diff options
author | Andrew Tridgell <tridge@samba.org> | 2002-03-05 19:51:05 +0000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2002-03-05 19:51:05 +0000 |
commit | b71a729e14e928fae288daeab4226d7e1f8b1dc5 (patch) | |
tree | e5f74ee5db231219c8525f46bbf33d3c9a71f6af | |
parent | 509ac24525a0d1aaecc819a99590425a164aaf44 (diff) | |
download | samba-b71a729e14e928fae288daeab4226d7e1f8b1dc5.tar.gz samba-b71a729e14e928fae288daeab4226d7e1f8b1dc5.tar.xz samba-b71a729e14e928fae288daeab4226d7e1f8b1dc5.zip |
fixed NBENCH code for NT4 server ntcreatex semantics
-rw-r--r-- | source/torture/nbio.c | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/source/torture/nbio.c b/source/torture/nbio.c index 7ce709dedda..40533fe48aa 100644 --- a/source/torture/nbio.c +++ b/source/torture/nbio.c @@ -86,7 +86,7 @@ static int find_handle(int handle) for (i=0;i<MAX_FILES;i++) { if (ftable[i].handle == handle) return i; } - printf("ERROR: handle %d was not found\n", + printf("(%d) ERROR: handle %d was not found\n", line_count, handle); exit(1); } @@ -128,11 +128,17 @@ void nb_createx(char *fname, unsigned create_options, unsigned create_disposition, int handle) { int fd, i; - static int count; + uint32 desired_access; + + if (create_options & FILE_DIRECTORY_FILE) { + desired_access = FILE_READ_DATA; + } else { + desired_access = FILE_READ_DATA | FILE_WRITE_DATA; + } fd = cli_nt_create_full(c, fname, - FILE_READ_DATA | FILE_WRITE_DATA, - 0, + desired_access, + 0x0, FILE_SHARE_READ|FILE_SHARE_WRITE, create_disposition, create_options); |