diff options
author | Andrew Tridgell <tridge@samba.org> | 2008-05-28 20:06:48 +1000 |
---|---|---|
committer | Andrew Tridgell <tridge@samba.org> | 2008-05-28 20:06:48 +1000 |
commit | e013ada415ebb25e925f715791757330ba003b43 (patch) | |
tree | 4a645a359f578762c242186bc820127c3dd26218 | |
parent | 46a0b65742bc0e4277da53df9df823abd4a0d150 (diff) | |
download | samba-e013ada415ebb25e925f715791757330ba003b43.tar.gz |
check that we can't change a file to a directory
-rw-r--r-- | source/torture/smb2/setinfo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/source/torture/smb2/setinfo.c b/source/torture/smb2/setinfo.c index 685bb5a47b1..7a912b4989a 100644 --- a/source/torture/smb2/setinfo.c +++ b/source/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); |