summaryrefslogtreecommitdiff
path: root/source4/torture/basic/base.c
diff options
context:
space:
mode:
Diffstat (limited to 'source4/torture/basic/base.c')
-rw-r--r--source4/torture/basic/base.c19
1 files changed, 18 insertions, 1 deletions
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";