From d2e91a11982ce764f9e7bfc65decd52299c5f4be Mon Sep 17 00:00:00 2001 From: Volker Lendecke Date: Sat, 30 Dec 2006 17:39:27 +0000 Subject: r20422: A torture test extension for Jeremy (This used to be commit 1bcc421dab53adaf3b6c6d7f51c23c80cb637a95) --- source4/torture/basic/base.c | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'source4/torture') diff --git a/source4/torture/basic/base.c b/source4/torture/basic/base.c index 9d067b4df6..a2d9944ee8 100644 --- a/source4/torture/basic/base.c +++ b/source4/torture/basic/base.c @@ -1519,6 +1519,32 @@ static BOOL torture_samba3_errorpaths(struct torture_context *tctx) goto fail; } + { + union smb_mkdir md; + md.t2mkdir.level = RAW_MKDIR_T2MKDIR; + md.t2mkdir.in.path = dname; + md.t2mkdir.in.num_eas = 0; + md.t2mkdir.in.eas = NULL; + + status = smb_raw_mkdir(cli_nt->tree, &md); + if (!NT_STATUS_EQUAL(status, + NT_STATUS_OBJECT_NAME_COLLISION)) { + torture_comment( + tctx, "(%s) incorrect status %s should be " + "NT_STATUS_OBJECT_NAME_COLLISION\n", + __location__, nt_errstr(status)); + goto fail; + } + status = smb_raw_mkdir(cli_dos->tree, &md); + if (!NT_STATUS_EQUAL(status, + NT_STATUS_DOS(ERRDOS, ERRrename))) { + torture_comment(tctx, "(%s) incorrect status %s " + "should be ERRDOS:ERRnoaccess\n", + __location__, nt_errstr(status)); + 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)) { -- cgit