sfinfo.generic.level = RAW_SFILEINFO_ ## call; \
sfinfo.generic.in.file.fnum = fnum; \
status = smb_raw_setfileinfo(cli->tree, &sfinfo); \
- if (!NT_STATUS_EQUAL(status, rightstatus)) { \
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { \
+ torture_warning(torture, \
+ "(%s) %s - %s", __location__, #call, \
+ nt_errstr(status)); \
+ } else if (!NT_STATUS_EQUAL(status, rightstatus)) { \
printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
nt_errstr(status), nt_errstr(rightstatus)); \
ret = false; \
finfo1.generic.level = RAW_FILEINFO_ALL_INFO; \
finfo1.generic.in.file.fnum = fnum; \
status2 = smb_raw_fileinfo(cli->tree, torture, &finfo1); \
- if (!NT_STATUS_IS_OK(status2)) { \
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { \
+ torture_warning(torture, \
+ "(%s) %s - %s", __location__, #call, \
+ nt_errstr(status)); \
+ } else if (!NT_STATUS_IS_OK(status2)) { \
printf("(%s) %s pathinfo - %s\n", __location__, #call, nt_errstr(status)); \
ret = false; \
}} while (0)
sfinfo.generic.in.file.path = path_fname_new; \
status = smb_raw_setpathinfo(cli->tree, &sfinfo); \
} \
- if (!NT_STATUS_EQUAL(status, rightstatus)) { \
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { \
+ torture_warning(torture, \
+ "(%s) %s - %s", __location__, #call, \
+ nt_errstr(status)); \
+ } else if (!NT_STATUS_EQUAL(status, rightstatus)) { \
printf("(%s) %s - %s (should be %s)\n", __location__, #call, \
nt_errstr(status), nt_errstr(rightstatus)); \
ret = false; \
finfo1.generic.in.file.path = path_fname_new; \
status2 = smb_raw_pathinfo(cli->tree, torture, &finfo1); \
} \
- if (!NT_STATUS_IS_OK(status2)) { \
+ if (NT_STATUS_EQUAL(status, NT_STATUS_NOT_SUPPORTED)) { \
+ torture_warning(torture, \
+ "(%s) %s - %s", __location__, #call, \
+ nt_errstr(status)); \
+ } else if (!NT_STATUS_IS_OK(status2)) { \
printf("(%s) %s pathinfo - %s\n", __location__, #call, nt_errstr(status2)); \
ret = false; \
}} while (0)
CHECK_TIME(ALL_INFO, all_info, change_time, basetime + 400);
CHECK_VALUE(ALL_INFO, all_info, attrib, FILE_ATTRIBUTE_NORMAL);
+ torture_comment(torture, "try to change a file to a directory\n");
+ sfinfo.basic_info.in.attrib = FILE_ATTRIBUTE_DIRECTORY;
+ CHECK_CALL_FNUM(BASIC_INFO, NT_STATUS_INVALID_PARAMETER);
+
printf("a zero time means don't change\n");
unix_to_nt_time(&sfinfo.basic_info.in.create_time, 0);
unix_to_nt_time(&sfinfo.basic_info.in.access_time, 0);