"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "source3/torture/torture.c" between
samba-4.12.3.tar.gz and samba-4.12.5.tar.gz

About: Samba is the standard Windows interoperability suite of programs for Linux and Unix providing secure, stable and fast file and print services for all clients using the SMB/CIFS protocol. 4.12 series.

torture.c  (samba-4.12.3):torture.c  (samba-4.12.5)
skipping to change at line 11373 skipping to change at line 11373
correct = false; correct = false;
} }
} }
TALLOC_FREE(frame); TALLOC_FREE(frame);
printf("finished large_readx test\n"); printf("finished large_readx test\n");
return correct; return correct;
} }
static NTSTATUS msdfs_attribute_list_fn(const char *mnt,
struct file_info *finfo,
const char *mask,
void *private_data)
{
uint16_t *p_mode = (uint16_t *)private_data;
if (strequal(finfo->name, test_filename)) {
*p_mode = finfo->mode;
}
return NT_STATUS_OK;
}
static bool run_msdfs_attribute(int dummy)
{
static struct cli_state *cli;
bool correct = false;
uint16_t mode = 0;
NTSTATUS status;
printf("Starting MSDFS-ATTRIBUTE test\n");
if (test_filename == NULL || test_filename[0] == '\0') {
printf("MSDFS-ATTRIBUTE test "
"needs -f filename-of-msdfs-link\n");
return false;
}
/*
* NB. We use torture_open_connection_flags() not
* torture_open_connection() as the latter forces
* SMB1.
*/
if (!torture_open_connection_flags(&cli, 0, 0)) {
return false;
}
smbXcli_conn_set_sockopt(cli->conn, sockops);
status = cli_list(cli,
"*",
FILE_ATTRIBUTE_DIRECTORY,
msdfs_attribute_list_fn,
&mode);
if (!NT_STATUS_IS_OK(status)) {
printf("cli_list failed with %s\n",
nt_errstr(status));
goto out;
}
if ((mode & FILE_ATTRIBUTE_REPARSE_POINT) == 0) {
printf("file %s should have "
"FILE_ATTRIBUTE_REPARSE_POINT set. attr = 0x%x\n",
test_filename,
(unsigned int)mode);
goto out;
}
if ((mode & FILE_ATTRIBUTE_DIRECTORY) == 0) {
printf("file %s should have "
"FILE_ATTRIBUTE_DIRECTORY set. attr = 0x%x\n",
test_filename,
(unsigned int)mode);
goto out;
}
correct = true;
out:
torture_close_connection(cli);
return correct;
}
static bool run_cli_echo(int dummy) static bool run_cli_echo(int dummy)
{ {
struct cli_state *cli; struct cli_state *cli;
NTSTATUS status; NTSTATUS status;
printf("starting cli_echo test\n"); printf("starting cli_echo test\n");
if (!torture_open_connection(&cli, 0)) { if (!torture_open_connection(&cli, 0)) {
return false; return false;
} }
smbXcli_conn_set_sockopt(cli->conn, sockops); smbXcli_conn_set_sockopt(cli->conn, sockops);
skipping to change at line 14503 skipping to change at line 14578
}, },
{ {
.name = "WINDOWS-WRITE", .name = "WINDOWS-WRITE",
.fn = run_windows_write, .fn = run_windows_write,
}, },
{ {
.name = "LARGE_READX", .name = "LARGE_READX",
.fn = run_large_readx, .fn = run_large_readx,
}, },
{ {
.name = "MSDFS-ATTRIBUTE",
.fn = run_msdfs_attribute,
},
{
.name = "NTTRANS-CREATE", .name = "NTTRANS-CREATE",
.fn = run_nttrans_create, .fn = run_nttrans_create,
}, },
{ {
.name = "NTTRANS-FSCTL", .name = "NTTRANS-FSCTL",
.fn = run_nttrans_fsctl, .fn = run_nttrans_fsctl,
}, },
{ {
.name = "CLI_ECHO", .name = "CLI_ECHO",
.fn = run_cli_echo, .fn = run_cli_echo,
 End of changes. 2 change blocks. 
0 lines changed or deleted 79 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)