]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s4: torture: Remove the wildcard unlink test code.
authorJeremy Allison <jra@samba.org>
Wed, 1 Dec 2021 20:05:20 +0000 (12:05 -0800)
committerRalph Boehme <slow@samba.org>
Thu, 9 Dec 2021 18:06:35 +0000 (18:06 +0000)
This is pre WindowXP SMB1 functionality, and we
need to remove this from the server in order to
move towards SMB2-only, so the test must go.

Signed-off-by: Jeremy Allison <jra@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source4/torture/raw/unlink.c

index 4f198fa27595ec0ac81a6b33359e983fb18072d0..53059aa576af1742baf7da0b2fe1f654f26b57f2 100644 (file)
@@ -112,78 +112,6 @@ static bool test_unlink(struct torture_context *tctx, struct smbcli_state *cli)
        status = smb_raw_unlink(cli->tree, &io);
        CHECK_STATUS(status, NT_STATUS_FILE_IS_A_DIRECTORY);
 
-       printf("Trying wildcards\n");
-       smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
-       io.unlink.in.pattern = BASEDIR "\\t*.t";
-       io.unlink.in.attrib = 0;
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
-
-       io.unlink.in.pattern = BASEDIR "\\z*";
-       io.unlink.in.attrib = 0;
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
-
-       io.unlink.in.pattern = BASEDIR "\\z*";
-       io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
-       status = smb_raw_unlink(cli->tree, &io);
-
-       if (torture_setting_bool(tctx, "samba3", false)) {
-               /*
-                * In Samba3 we gave up upon getting the error codes in
-                * wildcard unlink correct. Trying gentest showed that this is
-                * irregular beyond our capabilities. So for
-                * FILE_ATTRIBUTE_DIRECTORY we always return NAME_INVALID.
-                * Tried by jra and vl. If others feel like solving this
-                * puzzle, please tell us :-)
-                */
-               CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-       }
-       else {
-               CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
-       }
-
-       io.unlink.in.pattern = BASEDIR "\\*";
-       io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
-       io.unlink.in.pattern = BASEDIR "\\?";
-       io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-
-       io.unlink.in.pattern = BASEDIR "\\t*";
-       io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
-       status = smb_raw_unlink(cli->tree, &io);
-       if (torture_setting_bool(tctx, "samba3", false)) {
-               CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-       }
-       else {
-               CHECK_STATUS(status, NT_STATUS_OK);
-       }
-
-       smbcli_close(cli->tree, smbcli_open(cli->tree, fname, O_RDWR|O_CREAT, DENY_NONE));
-
-       io.unlink.in.pattern = BASEDIR "\\*.dat";
-       io.unlink.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
-       status = smb_raw_unlink(cli->tree, &io);
-       if (torture_setting_bool(tctx, "samba3", false)) {
-               CHECK_STATUS(status, NT_STATUS_OBJECT_NAME_INVALID);
-       }
-       else {
-               CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
-       }
-
-       io.unlink.in.pattern = BASEDIR "\\*.tx?";
-       io.unlink.in.attrib = 0;
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_OK);
-
-       status = smb_raw_unlink(cli->tree, &io);
-       CHECK_STATUS(status, NT_STATUS_NO_SUCH_FILE);
-
-
 done:
        smb_raw_exit(cli->session);
        smbcli_deltree(cli->tree, BASEDIR);