diff options
Diffstat (limited to 'source4/torture/raw')
-rw-r--r-- | source4/torture/raw/acls.c | 29 | ||||
-rw-r--r-- | source4/torture/raw/open.c | 10 | ||||
-rw-r--r-- | source4/torture/raw/qfileinfo.c | 2 | ||||
-rw-r--r-- | source4/torture/raw/streams.c | 8 |
4 files changed, 31 insertions, 18 deletions
diff --git a/source4/torture/raw/acls.c b/source4/torture/raw/acls.c index 666d164c969..01ee8be6a9f 100644 --- a/source4/torture/raw/acls.c +++ b/source4/torture/raw/acls.c @@ -1846,6 +1846,7 @@ done: return ret; } +#if 0 static bool test_inheritance_flags(struct torture_context *tctx, struct smbcli_state *cli) { @@ -2073,6 +2074,7 @@ done: smbcli_deltree(cli->tree, BASEDIR); return ret; } +#endif /* test dynamic acl inheritance @@ -2201,13 +2203,14 @@ static bool test_inheritance_dynamic(struct torture_context *tctx, smbcli_unlink(cli->tree, fname1); done: - torture_comment(tctx, "put back original sd\n"); - set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC; - set.set_secdesc.in.file.fnum = fnum; - set.set_secdesc.in.secinfo_flags = SECINFO_DACL; - set.set_secdesc.in.sd = sd_orig; - status = smb_raw_setfileinfo(cli->tree, &set); - + if (sd_orig != NULL) { + torture_comment(tctx, "put back original sd\n"); + set.set_secdesc.level = RAW_SFILEINFO_SEC_DESC; + set.set_secdesc.in.file.fnum = fnum; + set.set_secdesc.in.secinfo_flags = SECINFO_DACL; + set.set_secdesc.in.sd = sd_orig; + status = smb_raw_setfileinfo(cli->tree, &set); + } smbcli_close(cli->tree, fnum); smbcli_rmdir(cli->tree, dname); smb_raw_exit(cli->session); @@ -2244,6 +2247,8 @@ done: CHECK_STATUS_FOR_BIT_ACTION(status, bits, do {} while (0)); \ } while (0) +#if 0 + /* test what access mask is needed for getting and setting security_descriptors Test copied to smb2/acls.c for SMB2. */ static bool test_sd_get_set(struct torture_context *tctx, @@ -2433,6 +2438,7 @@ done: return ret; } +#endif /* basic testing of security descriptor calls @@ -2450,11 +2456,14 @@ struct torture_suite *torture_raw_acls(TALLOC_CTX *mem_ctx) torture_suite_add_1smb_test(suite, "owner", test_owner_bits); torture_suite_add_1smb_test(suite, "inheritance", test_inheritance); - /* torture_suite_add_1smb_test(suite, "INHERITFLAGS", test_inheritance_flags); */ +#if 0 + torture_suite_add_1smb_test(suite, "INHERITFLAGS", test_inheritance_flags); +#endif torture_suite_add_1smb_test(suite, "dynamic", test_inheritance_dynamic); - /* XXX This test does not work against XP or Vista. +#if 0 + /* XXX This test does not work against XP or Vista. */ torture_suite_add_1smb_test(suite, "GETSET", test_sd_get_set); - */ +#endif return suite; } diff --git a/source4/torture/raw/open.c b/source4/torture/raw/open.c index 89042d77dc2..8a66a12cd57 100644 --- a/source4/torture/raw/open.c +++ b/source4/torture/raw/open.c @@ -130,7 +130,7 @@ static const char *rdwr_string(enum rdwr_mode m) if ((v) != (finfo.all_info.out.field)) { \ torture_result(tctx, TORTURE_FAIL, \ "(%s) wrong value for field %s 0x%x - 0x%x\n", \ - __location__, #field, (int)v, (int)(finfo.all_info.out.field)); \ + __location__, #field, (unsigned int)(v), (unsigned int)(finfo.all_info.out.field)); \ dump_all_info(tctx, &finfo); \ ret = false; \ }} while (0) @@ -139,7 +139,7 @@ static const char *rdwr_string(enum rdwr_mode m) if ((v) != (correct)) { \ torture_result(tctx, TORTURE_FAIL, \ "(%s) wrong value for %s 0x%x - should be 0x%x\n", \ - __location__, #v, (int)(v), (int)correct); \ + __location__, #v, (unsigned int)(v), (unsigned int)(correct)); \ ret = false; \ }} while (0) @@ -152,7 +152,7 @@ static const char *rdwr_string(enum rdwr_mode m) status = smb_raw_setpathinfo(cli->tree, &sfinfo); \ if (!NT_STATUS_IS_OK(status)) { \ torture_warning(tctx, "(%s) Failed to set attrib 0x%x on %s\n", \ - __location__, sattrib, fname); \ + __location__, (unsigned int)(sattrib), fname); \ }} while (0) /* @@ -337,7 +337,7 @@ static bool test_openx(struct torture_context *tctx, struct smbcli_state *cli) __location__, nt_errstr(status), nt_errstr(open_funcs[i].correct_status), i, (int)open_funcs[i].with_file, - (int)open_funcs[i].open_func); + open_funcs[i].open_func); ret = false; } if (NT_STATUS_IS_OK(status)) { @@ -602,7 +602,7 @@ static bool test_t2open(struct torture_context *tctx, struct smbcli_state *cli) __location__, nt_errstr(status), nt_errstr(open_funcs[i].correct_status), i, (int)open_funcs[i].with_file, - (int)open_funcs[i].open_func); + open_funcs[i].open_func); ret = false; } if (NT_STATUS_IS_OK(status)) { diff --git a/source4/torture/raw/qfileinfo.c b/source4/torture/raw/qfileinfo.c index 414084080b9..ca5f66795e6 100644 --- a/source4/torture/raw/qfileinfo.c +++ b/source4/torture/raw/qfileinfo.c @@ -779,7 +779,7 @@ static bool torture_raw_qfileinfo_internals(struct torture_context *torture, s1 = fnum_find("BASIC_INFO"); if (s1 && is_ipc) { if (s1->basic_info.out.attrib != FILE_ATTRIBUTE_NORMAL) { - printf("(%d) attrib basic_info/nlink incorrect - %d should be %d\n", __LINE__, s1->basic_info.out.attrib, FILE_ATTRIBUTE_NORMAL); + printf("(%d) attrib basic_info/nlink incorrect - %d should be %d\n", __LINE__, s1->basic_info.out.attrib, (int)FILE_ATTRIBUTE_NORMAL); ret = false; } } diff --git a/source4/torture/raw/streams.c b/source4/torture/raw/streams.c index 5ce9b756efc..ae3bc2a7131 100644 --- a/source4/torture/raw/streams.c +++ b/source4/torture/raw/streams.c @@ -1629,6 +1629,7 @@ static bool test_stream_create_disposition(struct torture_context *tctx, return ret; } +#if 0 /* Test streaminfo with enough streams on a file to fill up the buffer. */ static bool test_stream_large_streaminfo(struct torture_context *tctx, struct smbcli_state *cli) @@ -1674,6 +1675,7 @@ static bool test_stream_large_streaminfo(struct torture_context *tctx, smbcli_deltree(cli->tree, BASEDIR); return ret; } +#endif /* Test the effect of setting attributes on a stream. */ static bool test_stream_attributes(struct torture_context *tctx, @@ -1913,8 +1915,10 @@ struct torture_suite *torture_raw_streams(TALLOC_CTX *tctx) torture_suite_add_1smb_test(suite, "attr", test_stream_attributes); torture_suite_add_1smb_test(suite, "sumtab", test_stream_summary_tab); - /* torture_suite_add_1smb_test(suite, "LARGESTREAMINFO", */ - /* test_stream_large_streaminfo); */ +#if 0 + torture_suite_add_1smb_test(suite, "LARGESTREAMINFO", + test_stream_large_streaminfo); +#endif return suite; } |