mirror of
https://github.com/samba-team/samba.git
synced 2024-12-24 21:34:56 +03:00
s3: torture: Add simple tests to samba3.base.attr to check INVALID_PARAMETER returned on SMB1 out-of-range attribute use.
Signed-off-by: Jeremy Allison <jra@samba.org> Reviewed-by: Volker Lendecke <vl@samba.org>
This commit is contained in:
parent
199a7343ee
commit
c7e3a00396
@ -4015,6 +4015,13 @@ static bool run_attrtest(int dummy)
|
||||
return False;
|
||||
}
|
||||
|
||||
/* Ensure we can't unlink with out-of-range (unknown) attribute. */
|
||||
status = cli_unlink(cli, fname, 0x20000);
|
||||
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
|
||||
correct = false;
|
||||
goto out;
|
||||
}
|
||||
|
||||
cli_unlink(cli, fname, FILE_ATTRIBUTE_SYSTEM | FILE_ATTRIBUTE_HIDDEN);
|
||||
cli_openx(cli, fname,
|
||||
O_RDWR | O_CREAT | O_TRUNC, DENY_NONE, &fnum);
|
||||
@ -4035,6 +4042,13 @@ static bool run_attrtest(int dummy)
|
||||
|
||||
t2 = t-60*60*24; /* 1 day ago */
|
||||
|
||||
/* Ensure we can't set with out-of-range (unknown) attribute. */
|
||||
status = cli_setatr(cli, fname, 0x20000, t2);
|
||||
if (!NT_STATUS_EQUAL(status, NT_STATUS_INVALID_PARAMETER)) {
|
||||
correct = false;
|
||||
goto out;
|
||||
}
|
||||
|
||||
status = cli_setatr(cli, fname, 0, t2);
|
||||
if (!NT_STATUS_IS_OK(status)) {
|
||||
printf("setatr failed (%s)\n", nt_errstr(status));
|
||||
|
Loading…
Reference in New Issue
Block a user