r24529: Against samba3, treat EAS_NOT_SUPPORTED as acceptable for t2open
authorVolker Lendecke <vlendec@samba.org>
Fri, 17 Aug 2007 19:48:27 +0000 (19:48 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 20:02:11 +0000 (15:02 -0500)
Many hosts in the build farm don't have EA support
(This used to be commit 3cca299c72e0ae7da3d28d7284f1993eef9f1cea)

source4/torture/raw/samba3misc.c

index fe413495ea6d4f34501cbb65991fc94b99bde997..e36be6436a349c330cdf3c95ce5468bcb2cd3fd8 100644 (file)
@@ -537,9 +537,17 @@ BOOL torture_samba3_badpath(struct torture_context *torture)
        CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
 
        status = raw_smbcli_t2open(cli_nt->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
-       CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_EAS_NOT_SUPPORTED)
+           || !lp_parm_bool(-1, "torture", "samba3", False)) {
+               /* Against samba3, treat EAS_NOT_SUPPORTED as acceptable */
+               CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);
+       }
        status = raw_smbcli_t2open(cli_dos->tree, fpath, O_RDONLY | O_CREAT| O_EXCL, DENY_NONE, NULL);
-       CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
+       if (!NT_STATUS_EQUAL(status, NT_STATUS_DOS(ERRDOS,ERReasnotsupported))
+           || !lp_parm_bool(-1, "torture", "samba3", False)) {
+               /* Against samba3, treat EAS_NOT_SUPPORTED as acceptable */
+               CHECK_STATUS(status, NT_STATUS_DOS(ERRDOS,ERRfilexists));
+       }
 
        status = raw_smbcli_ntcreate(cli_nt->tree, fpath, NULL);
        CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_COLLISION);