From 1eabf8155486d007a69667175ae7f6bebc440122 Mon Sep 17 00:00:00 2001 From: Andrew Tridgell Date: Wed, 28 May 2008 20:06:48 +1000 Subject: check that we can't change a file to a directory (This used to be commit e013ada415ebb25e925f715791757330ba003b43) --- source4/torture/smb2/setinfo.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source4') diff --git a/source4/torture/smb2/setinfo.c b/source4/torture/smb2/setinfo.c index 685bb5a47b..7a912b4989 100644 --- a/source4/torture/smb2/setinfo.c +++ b/source4/torture/smb2/setinfo.c @@ -175,6 +175,10 @@ bool torture_smb2_setinfo(struct torture_context *torture) CHECK_CALL(BASIC_INFORMATION, NT_STATUS_OK); CHECK_VALUE(SMB2_ALL_INFORMATION, all_info2, attrib, FILE_ATTRIBUTE_HIDDEN); + printf("can't change a file to a directory\n"); + sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_DIRECTORY; + CHECK_CALL(BASIC_INFORMATION, NT_STATUS_INVALID_PARAMETER); + printf("restore attribute\n"); sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_NORMAL; CHECK_CALL(BASIC_INFORMATION, NT_STATUS_OK); -- cgit