summaryrefslogtreecommitdiff
path: root/source3
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-03-05 19:51:05 +0000
committerAndrew Tridgell <tridge@samba.org>2002-03-05 19:51:05 +0000
commitced46b906b40b6c4e201894cfeb7b43fe1e33dc2 (patch)
treedb7cfa6e4f7ff845184e32caa2a1ab345b847818 /source3
parenta4ff0924d6ec313c67abd5f8214803706d51a348 (diff)
downloadsamba-ced46b906b40b6c4e201894cfeb7b43fe1e33dc2.tar.gz
samba-ced46b906b40b6c4e201894cfeb7b43fe1e33dc2.tar.bz2
samba-ced46b906b40b6c4e201894cfeb7b43fe1e33dc2.zip
fixed NBENCH code for NT4 server ntcreatex semantics
(This used to be commit b71a729e14e928fae288daeab4226d7e1f8b1dc5)
Diffstat (limited to 'source3')
-rw-r--r--source3/torture/nbio.c14
1 files changed, 10 insertions, 4 deletions
diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c
index 7ce709dedd..40533fe48a 100644
--- a/source3/torture/nbio.c
+++ b/source3/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);