diff options
author | Jeremy Allison <jra@samba.org> | 2021-12-01 12:05:20 -0800 |
---|---|---|
committer | Ralph Boehme <slow@samba.org> | 2021-12-09 18:06:35 +0000 |
commit | 3c9a33ca3463ab010e24430a1743f4669c70a75f (patch) | |
tree | c9086020acaa4cb6998b7916895140ca155110ec /source4/torture/raw/unlink.c | |
parent | ef1d9d31bc3bf620c549a1c609e2ce99ceacff43 (diff) | |
download | samba-3c9a33ca3463ab010e24430a1743f4669c70a75f.tar.gz |
s4: torture: Remove the wildcard unlink test code.
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>
Diffstat (limited to 'source4/torture/raw/unlink.c')
-rw-r--r-- | source4/torture/raw/unlink.c | 72 |
1 files changed, 0 insertions, 72 deletions
diff --git a/source4/torture/raw/unlink.c b/source4/torture/raw/unlink.c index 4f198fa2759..53059aa576a 100644 --- a/source4/torture/raw/unlink.c +++ b/source4/torture/raw/unlink.c @@ -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); |