From 414c47633d89d87011fda08c3c2b8dcbbfbcc2a8 Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Wed, 28 Jun 2006 22:09:03 +0000 Subject: r16657: Test Jerry's iTunes bug, along with some more error conditions Volker (This used to be commit 12aa900eb2ffde3711a30c7e063bfba95128e91d) --- source4/torture/basic/base.c | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) (limited to 'source4/torture/basic') diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index b670b8a30a..55f0b6e543 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -1621,7 +1621,7 @@ static BOOL torture_samba3_errorpaths(struct torture_context *torture) const char *os2_fname = ".+,;=[]."; const char *dname = "samba3_errordir"; union smb_open io; - TALLOC_CTX *mem_ctx = talloc_init(NULL); + TALLOC_CTX *mem_ctx = talloc_init("samba3_errorpaths"); NTSTATUS status; if (mem_ctx == NULL) { @@ -1707,6 +1707,23 @@ static BOOL torture_samba3_errorpaths(struct torture_context *torture) goto fail; } + io.ntcreatex.in.create_options = NTCREATEX_OPTIONS_DIRECTORY; + status = smb_raw_open(cli_nt->tree, mem_ctx, &io); + if (!NT_STATUS_EQUAL(status, NT_STATUS_OBJECT_NAME_COLLISION)) { + printf("(%s) incorrect status %s should be %s\n", + __location__, nt_errstr(status), + nt_errstr(NT_STATUS_OBJECT_NAME_COLLISION)); + goto fail; + } + + status = smb_raw_open(cli_dos->tree, mem_ctx, &io); + if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS, ERRfilexists))) { + printf("(%s) incorrect status %s should be %s\n", + __location__, nt_errstr(status), + nt_errstr(NT_STATUS_DOS(ERRDOS, ERRfilexists))); + goto fail; + } + { /* Test an invalid DOS deny mode */ const char *fname = "test.txt"; -- cgit