The branch, master has been updated via 30231b2 s3-torture: Call cli_flush(). via 5f92c81 krb5_wrap: Move function declaration outside the function. via 1461d87 s3-libsmb: Fix a memory leak in get_pdc_ip(). via 1439070 s3-torture: Make sure status is used initialized. via 1d7b909 s3-torture: Fix several memory leaks in delete_fn(). via c5e73bc s3-utils: Fix a memory leak in smbget. via 4f06c68 s4-torture: Use talloc for asprintf. via b871c39 s4-torture: Fix out of bound array access. via 34f4985 s3-torture: Comment out dead code in spoolss test. via 3b3b52c s4-torture: Fix some compile warnings in spoolss. via 09cc58c s4-torture: Make sure handles are correctly initialized. via ef2cd51 s4-torture: Make sure the handles are initialized correctly. via 13e33ab s4-torture: Make sure the handles are not used uninitialized. via 9d53d9f s4-libcli: Add smb2_util_handle_empty(). via 5be0995 torture: match Windows responses to bad shadow copy IDs via dbb6f07 torture: test duplicate shares in FSRVP shadow-copy set from c1b7cf5 smbd: Fix a panic when a smb2 brlock times out
http://gitweb.samba.org/?p=samba.git;a=shortlog;h=master - Log ----------------------------------------------------------------- commit 30231b256d8b14337a7ffe04fc031cf5693110f4 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:02:00 2013 +0100 s3-torture: Call cli_flush(). Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> Autobuild-User(master): Michael Adam <ob...@samba.org> Autobuild-Date(master): Fri Dec 6 03:07:32 CET 2013 on sn-devel-104 commit 5f92c81fb67687cc4586e675e722192350745971 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:59 2013 +0100 krb5_wrap: Move function declaration outside the function. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 1461d873a49fbc02b809d804e52627760a8714f7 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:58 2013 +0100 s3-libsmb: Fix a memory leak in get_pdc_ip(). Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 143907025b19ced780e7b1a3455de80d96eb0432 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:57 2013 +0100 s3-torture: Make sure status is used initialized. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 1d7b909bd2fec8b0c2f7056b61d9ca5d6776ed7d Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:56 2013 +0100 s3-torture: Fix several memory leaks in delete_fn(). Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit c5e73bccd5af8404df8bfaf2e6a40e93ead47f2e Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:55 2013 +0100 s3-utils: Fix a memory leak in smbget. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 4f06c681b91446f4e85d7e46bdb20b25bf222aad Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:54 2013 +0100 s4-torture: Use talloc for asprintf. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit b871c3907afe666ff7195c2906b43011138e4bf7 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:53 2013 +0100 s4-torture: Fix out of bound array access. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 34f498525cb7f6007c7d757e58fcaed7a607a4a2 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:52 2013 +0100 s3-torture: Comment out dead code in spoolss test. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 3b3b52c013bdf61fdf58c9725eb4a0843a1a1fb6 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:51 2013 +0100 s4-torture: Fix some compile warnings in spoolss. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 09cc58c1a7ffa29b509a688ab011503ebc7fd660 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:50 2013 +0100 s4-torture: Make sure handles are correctly initialized. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit ef2cd51586a359d192ae1d07898d9e10cb5fb1b0 Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:49 2013 +0100 s4-torture: Make sure the handles are initialized correctly. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 13e33ab98e8c7ffa5b9a6fd8089688c6be961ffb Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:48 2013 +0100 s4-torture: Make sure the handles are not used uninitialized. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 9d53d9f7e55e07bb079d3e91018e6c407c91573a Author: Andreas Schneider <a...@samba.org> Date: Wed Dec 4 14:01:47 2013 +0100 s4-libcli: Add smb2_util_handle_empty(). Will be used in the next commit. Signed-off-by: Andreas Schneider <a...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit 5be0995d98cec1585997ea630d7d871352074f12 Author: David Disseldorp <dd...@samba.org> Date: Thu Dec 5 20:12:53 2013 +0100 torture: match Windows responses to bad shadow copy IDs test_fsrvp_bad_id() issues DeleteShareMapping requests with invalid shadow copy IDs, expect Windows Server 2012 return codes. Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> commit dbb6f07728e654a8f02badf8d41e431443b395a6 Author: David Disseldorp <dd...@samba.org> Date: Thu Dec 5 20:12:52 2013 +0100 torture: test duplicate shares in FSRVP shadow-copy set MS-FSRVP 3.1.4.4 documents the requirement for failure when duplicate volume names are encountered on AddToShadowCopySet. Signed-off-by: David Disseldorp <dd...@samba.org> Reviewed-by: Michael Adam <ob...@samba.org> ----------------------------------------------------------------------- Summary of changes: lib/krb5_wrap/krb5_samba.c | 17 +++++++------- source3/libsmb/namequery.c | 1 + source3/torture/cmd_vfs.c | 7 ++--- source3/torture/nbio.c | 9 ++++++- source3/utils/smbget.c | 1 + source4/libcli/smb2/util.c | 9 +++++++ source4/torture/raw/setfileinfo.c | 22 ++++++++---------- source4/torture/rpc/fsrvp.c | 43 ++++++++++++++++++++++++------------- source4/torture/rpc/spoolss.c | 28 +++++++++++++++++------- source4/torture/rpc/winreg.c | 5 +++- source4/torture/smb2/streams.c | 8 ++++++- 11 files changed, 99 insertions(+), 51 deletions(-) Changeset truncated at 500 lines: diff --git a/lib/krb5_wrap/krb5_samba.c b/lib/krb5_wrap/krb5_samba.c index 024e188..b218437 100644 --- a/lib/krb5_wrap/krb5_samba.c +++ b/lib/krb5_wrap/krb5_samba.c @@ -1334,6 +1334,15 @@ static krb5_error_code smb_krb5_get_credentials_for_user_opt(krb5_context contex #endif /* HAVE_KRB5_GET_CREDS_OPT_SET_IMPERSONATE */ #ifdef HAVE_KRB5_GET_CREDENTIALS_FOR_USER + +#if !HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER +krb5_error_code KRB5_CALLCONV +krb5_get_credentials_for_user(krb5_context context, krb5_flags options, + krb5_ccache ccache, krb5_creds *in_creds, + krb5_data *subject_cert, + krb5_creds **out_creds); +#endif /* !HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER */ + static krb5_error_code smb_krb5_get_credentials_for_user(krb5_context context, krb5_ccache ccache, krb5_principal me, @@ -1344,14 +1353,6 @@ static krb5_error_code smb_krb5_get_credentials_for_user(krb5_context context, krb5_error_code ret; krb5_creds in_creds; -#if !HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER -krb5_error_code KRB5_CALLCONV -krb5_get_credentials_for_user(krb5_context context, krb5_flags options, - krb5_ccache ccache, krb5_creds *in_creds, - krb5_data *subject_cert, - krb5_creds **out_creds); -#endif /* !HAVE_DECL_KRB5_GET_CREDENTIALS_FOR_USER */ - ZERO_STRUCT(in_creds); if (impersonate_princ) { diff --git a/source3/libsmb/namequery.c b/source3/libsmb/namequery.c index f2fffde..7d6d6bb 100644 --- a/source3/libsmb/namequery.c +++ b/source3/libsmb/namequery.c @@ -2976,6 +2976,7 @@ bool get_pdc_ip(const char *domain, struct sockaddr_storage *pss) &count, lp_name_resolve_order()); if (!NT_STATUS_IS_OK(status)) { + SAFE_FREE(ip_list); return false; } } diff --git a/source3/torture/cmd_vfs.c b/source3/torture/cmd_vfs.c index f923ed5..1ccdfe3 100644 --- a/source3/torture/cmd_vfs.c +++ b/source3/torture/cmd_vfs.c @@ -1489,6 +1489,7 @@ static NTSTATUS cmd_set_nt_acl(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int a return NT_STATUS_UNSUCCESSFUL; } + status = NT_STATUS_OK; ret = SMB_VFS_FSTAT(fsp, &smb_fname->st); if (ret == -1) { /* If we have an fd, this stat should succeed. */ @@ -1545,7 +1546,6 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) { int fd; - NTSTATUS status; SMB_ACL_T acl; char *acl_text; @@ -1567,7 +1567,7 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, acl = SMB_VFS_SYS_ACL_GET_FD(vfs->files[fd], talloc_tos()); if (!acl) { printf("sys_acl_get_fd failed (%s)\n", strerror(errno)); - return status; + return NT_STATUS_UNSUCCESSFUL; } acl_text = sys_acl_to_text(acl, NULL); printf("%s", acl_text); @@ -1579,7 +1579,6 @@ static NTSTATUS cmd_sys_acl_get_fd(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, int argc, const char **argv) { - NTSTATUS status; SMB_ACL_T acl; char *acl_text; int type; @@ -1592,7 +1591,7 @@ static NTSTATUS cmd_sys_acl_get_file(struct vfs_state *vfs, TALLOC_CTX *mem_ctx, acl = SMB_VFS_SYS_ACL_GET_FILE(vfs->conn, argv[1], type, talloc_tos()); if (!acl) { printf("sys_acl_get_file failed (%s)\n", strerror(errno)); - return status; + return NT_STATUS_UNSUCCESSFUL; } acl_text = sys_acl_to_text(acl, NULL); printf("%s", acl_text); diff --git a/source3/torture/nbio.c b/source3/torture/nbio.c index 0c918c1..fba83ea 100644 --- a/source3/torture/nbio.c +++ b/source3/torture/nbio.c @@ -306,7 +306,8 @@ void nb_flush(int fnum) { int i; i = find_handle(fnum); - /* hmmm, we don't have cli_flush() yet */ + + cli_flush(NULL, c, i); } static int total_deleted; @@ -323,6 +324,7 @@ static NTSTATUS delete_fn(const char *mnt, struct file_info *finfo, n = SMB_STRDUP(name); n[strlen(n)-1] = 0; if (asprintf(&s, "%s%s", n, finfo->name) == -1) { + free(n); printf("asprintf failed\n"); return NT_STATUS_NO_MEMORY; } @@ -330,12 +332,15 @@ static NTSTATUS delete_fn(const char *mnt, struct file_info *finfo, char *s2; if (asprintf(&s2, "%s\\*", s) == -1) { printf("asprintf failed\n"); + free(s); + free(n); return NT_STATUS_NO_MEMORY; } status = cli_list(c, s2, FILE_ATTRIBUTE_DIRECTORY, delete_fn, NULL); + free(s2); if (!NT_STATUS_IS_OK(status)) { + free(s); free(n); - free(s2); return status; } nb_rmdir(s); diff --git a/source3/utils/smbget.c b/source3/utils/smbget.c index 5cb6849..28d5647 100644 --- a/source3/utils/smbget.c +++ b/source3/utils/smbget.c @@ -159,6 +159,7 @@ static int smb_download_dir(const char *base, const char *name, int resume) char *newname; if(!strcmp(dirent->name, ".") || !strcmp(dirent->name, ".."))continue; if (asprintf(&newname, "%s/%s", tmpname, dirent->name) == -1) { + free(tmpname); return 1; } switch(dirent->smbc_type) { diff --git a/source4/libcli/smb2/util.c b/source4/libcli/smb2/util.c index 8b4a86f..e28c910 100644 --- a/source4/libcli/smb2/util.c +++ b/source4/libcli/smb2/util.c @@ -230,3 +230,12 @@ bool smb2_util_handle_equal(const struct smb2_handle h1, { return (h1.data[0] == h2.data[0]) && (h1.data[1] == h2.data[1]); } + +bool smb2_util_handle_empty(const struct smb2_handle h) +{ + struct smb2_handle empty; + + ZERO_STRUCT(empty); + + return smb2_util_handle_equal(h, empty); +} diff --git a/source4/torture/raw/setfileinfo.c b/source4/torture/raw/setfileinfo.c index 95ce060..a08191d 100644 --- a/source4/torture/raw/setfileinfo.c +++ b/source4/torture/raw/setfileinfo.c @@ -36,7 +36,6 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state bool ret = true; int fnum = -1; char *fnum_fname; - char *fnum_fname_new; char *path_fname; char *path_fname_new; union smb_fileinfo finfo1, finfo2; @@ -47,10 +46,9 @@ torture_raw_sfileinfo_base(struct torture_context *torture, struct smbcli_state bool check_fnum; int n = time(NULL) % 100; - asprintf(&path_fname, BASEDIR "\\fname_test_%d.txt", n); - asprintf(&path_fname_new, BASEDIR "\\fname_test_new_%d.txt", n); - asprintf(&fnum_fname, BASEDIR "\\fnum_test_%d.txt", n); - asprintf(&fnum_fname_new, BASEDIR "\\fnum_test_new_%d.txt", n); + path_fname = talloc_asprintf(torture, BASEDIR "\\fname_test_%d.txt", n); + path_fname_new = talloc_asprintf(torture, BASEDIR "\\fname_test_new_%d.txt", n); + fnum_fname = talloc_asprintf(torture, BASEDIR "\\fnum_test_%d.txt", n); torture_assert(torture, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR); @@ -481,13 +479,13 @@ torture_raw_sfileinfo_rename(struct torture_context *torture, const char *call_name; bool check_fnum; int n = time(NULL) % 100; - - asprintf(&path_fname, BASEDIR "\\fname_test_%d.txt", n); - asprintf(&path_fname_new, BASEDIR "\\fname_test_new_%d.txt", n); - asprintf(&fnum_fname, BASEDIR "\\fnum_test_%d.txt", n); - asprintf(&fnum_fname_new, BASEDIR "\\fnum_test_new_%d.txt", n); - asprintf(&path_dname, BASEDIR "\\dname_test_%d", n); - asprintf(&path_dname_new, BASEDIR "\\dname_test_new_%d", n); + + path_fname = talloc_asprintf(torture, BASEDIR "\\fname_test_%d.txt", n); + path_fname_new = talloc_asprintf(torture, BASEDIR "\\fname_test_new_%d.txt", n); + fnum_fname = talloc_asprintf(torture, BASEDIR "\\fnum_test_%d.txt", n); + fnum_fname_new = talloc_asprintf(torture, BASEDIR "\\fnum_test_new_%d.txt", n); + path_dname = talloc_asprintf(torture, BASEDIR "\\dname_test_%d", n); + path_dname_new = talloc_asprintf(torture, BASEDIR "\\dname_test_new_%d", n); torture_assert(torture, torture_setup_dir(cli, BASEDIR), "Failed to setup up test directory: " BASEDIR); diff --git a/source4/torture/rpc/fsrvp.c b/source4/torture/rpc/fsrvp.c index d7645c9..f853ecf 100644 --- a/source4/torture/rpc/fsrvp.c +++ b/source4/torture/rpc/fsrvp.c @@ -3,7 +3,7 @@ test suite for File Server Remote VSS Protocol operations - Copyright (C) David Disseldorp 2012 + Copyright (C) David Disseldorp 2012-2013 This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by @@ -138,7 +138,8 @@ static bool test_fsrvp_sc_create(struct torture_context *tctx, struct fss_GetSupportedVersion r_version_get; struct fss_SetContext r_context_set; struct fss_StartShadowCopySet r_scset_start; - struct fss_AddToShadowCopySet r_scset_add; + struct fss_AddToShadowCopySet r_scset_add1; + struct fss_AddToShadowCopySet r_scset_add2; struct fss_PrepareShadowCopySet r_scset_prep; struct fss_CommitShadowCopySet r_scset_commit; struct fss_ExposeShadowCopySet r_scset_expose; @@ -189,19 +190,31 @@ static bool test_fsrvp_sc_create(struct torture_context *tctx, torture_comment(tctx, "%s: shadow-copy set created\n", GUID_string(tmp_ctx, r_scset_start.out.pShadowCopySetId)); - ZERO_STRUCT(r_scset_add); - r_scset_add.in.ClientShadowCopyId = GUID_random(); - r_scset_add.in.ShadowCopySetId = *r_scset_start.out.pShadowCopySetId; - r_scset_add.in.ShareName = share; - status = dcerpc_fss_AddToShadowCopySet_r(b, tmp_ctx, &r_scset_add); + ZERO_STRUCT(r_scset_add1); + r_scset_add1.in.ClientShadowCopyId = GUID_random(); + r_scset_add1.in.ShadowCopySetId = *r_scset_start.out.pShadowCopySetId; + r_scset_add1.in.ShareName = share; + status = dcerpc_fss_AddToShadowCopySet_r(b, tmp_ctx, &r_scset_add1); torture_assert_ntstatus_ok(tctx, status, "AddToShadowCopySet failed"); - torture_assert_int_equal(tctx, r_scset_add.out.result, 0, + torture_assert_int_equal(tctx, r_scset_add1.out.result, 0, "failed AddToShadowCopySet response"); torture_comment(tctx, "%s(%s): %s added to shadow-copy set\n", GUID_string(tmp_ctx, r_scset_start.out.pShadowCopySetId), - GUID_string(tmp_ctx, r_scset_add.out.pShadowCopyId), - r_scset_add.in.ShareName); + GUID_string(tmp_ctx, r_scset_add1.out.pShadowCopyId), + r_scset_add1.in.ShareName); + + /* attempts to add the same share twice should fail */ + ZERO_STRUCT(r_scset_add2); + r_scset_add2.in.ClientShadowCopyId = GUID_random(); + r_scset_add2.in.ShadowCopySetId = *r_scset_start.out.pShadowCopySetId; + r_scset_add2.in.ShareName = share; + status = dcerpc_fss_AddToShadowCopySet_r(b, tmp_ctx, &r_scset_add2); + torture_assert_ntstatus_ok(tctx, status, + "AddToShadowCopySet failed"); + torture_assert_int_equal(tctx, r_scset_add2.out.result, + FSRVP_E_OBJECT_ALREADY_EXISTS, + "failed AddToShadowCopySet response"); start_time = time_mono(NULL); ZERO_STRUCT(r_scset_prep); @@ -244,9 +257,9 @@ static bool test_fsrvp_sc_create(struct torture_context *tctx, (unsigned long long)(time_mono(NULL) - start_time)); ZERO_STRUCT(r_sharemap_get); - r_sharemap_get.in.ShadowCopyId = *r_scset_add.out.pShadowCopyId; + r_sharemap_get.in.ShadowCopyId = *r_scset_add1.out.pShadowCopyId; r_sharemap_get.in.ShadowCopySetId = *r_scset_start.out.pShadowCopySetId; - r_sharemap_get.in.ShareName = r_scset_add.in.ShareName; + r_sharemap_get.in.ShareName = r_scset_add1.in.ShareName; r_sharemap_get.in.Level = 1; status = dcerpc_fss_GetShareMapping_r(b, tmp_ctx, &r_sharemap_get); torture_assert_ntstatus_ok(tctx, status, "GetShareMapping failed"); @@ -402,7 +415,7 @@ static bool test_fsrvp_bad_id(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "DeleteShareMapping failed"); torture_assert_int_equal(tctx, r_sharemap_del.out.result, - FSRVP_E_BAD_ID, + FSRVP_E_OBJECT_NOT_FOUND, "incorrect DeleteShareMapping response"); r_sharemap_del.in.ShadowCopySetId = sc_map->ShadowCopySetId; @@ -411,7 +424,7 @@ static bool test_fsrvp_bad_id(struct torture_context *tctx, torture_assert_ntstatus_ok(tctx, status, "DeleteShareMapping failed"); torture_assert_int_equal(tctx, r_sharemap_del.out.result, - FSRVP_E_BAD_ID, + E_INVALIDARG, "incorrect DeleteShareMapping response"); torture_assert(tctx, test_fsrvp_sc_delete(tctx, p, sc_map), "sc del"); @@ -612,7 +625,7 @@ static bool test_fsrvp_enum_created(struct torture_context *tctx, return true; } -static bool fsrvp_rpc_setup (struct torture_context *tctx, void **data) +static bool fsrvp_rpc_setup(struct torture_context *tctx, void **data) { NTSTATUS status; struct torture_rpc_tcase *tcase = talloc_get_type( diff --git a/source4/torture/rpc/spoolss.c b/source4/torture/rpc/spoolss.c index d216e07..e645887 100644 --- a/source4/torture/rpc/spoolss.c +++ b/source4/torture/rpc/spoolss.c @@ -585,7 +585,7 @@ static bool test_EnumPrinterDrivers_findone(struct torture_context *tctx, "failed to enumerate printer drivers"); for (i=0; i < count; i++) { - const char *driver_name_ret; + const char *driver_name_ret = ""; switch (level) { case 1: driver_name_ret = info[i].info1.driver_name; @@ -681,7 +681,7 @@ static bool test_EnumPrinterDrivers(struct torture_context *tctx, for (j=0;j<ctx->driver_count[level - 1];j++) { union spoolss_DriverInfo *cur = &ctx->drivers[level - 1][j]; - union spoolss_DriverInfo *ref = &ctx->drivers[8][j]; + union spoolss_DriverInfo *ref = &ctx->drivers[7][j]; switch (level) { case 1: @@ -1439,8 +1439,6 @@ static bool test_PrinterInfo(struct torture_context *tctx, bool ret = true; int i; - torture_skip(tctx, "Printer Info test is currently broken, skipping"); - uint32_t status_list[] = { /* these do not stick PRINTER_STATUS_PAUSED, @@ -1519,6 +1517,9 @@ static bool test_PrinterInfo(struct torture_context *tctx, 0x80000000 */ }; + torture_skip(tctx, "Printer Info test is currently broken, skipping"); + + ZERO_STRUCT(devmode_ctr); ZERO_STRUCT(secdesc_ctr); @@ -2132,7 +2133,6 @@ static bool test_devicemode_full(struct torture_context *tctx, { struct spoolss_SetPrinter s; struct spoolss_GetPrinter q; - struct spoolss_GetPrinter q0; struct spoolss_SetPrinterInfoCtr info_ctr; struct spoolss_SetPrinterInfo8 info8; union spoolss_PrinterInfo info; @@ -2184,7 +2184,6 @@ static bool test_devicemode_full(struct torture_context *tctx, q.in.handle = handle; q.out.info = &info; - q0 = q; #if 0 const char *devicename;/* [charset(UTF16)] */ @@ -3110,6 +3109,7 @@ static bool test_GetJob_args(struct torture_context *tctx, return true; } +#if 0 static bool test_GetJob(struct torture_context *tctx, struct dcerpc_binding_handle *b, struct policy_handle *handle, @@ -3126,6 +3126,7 @@ static bool test_GetJob(struct torture_context *tctx, return true; } +#endif static bool test_SetJob(struct torture_context *tctx, struct dcerpc_binding_handle *b, @@ -3450,6 +3451,8 @@ static bool test_DoPrintTest_add_one_job(struct torture_context *tctx, uint32_t *job_id) { test_DoPrintTest_add_one_job_common(tctx, b, handle, document_name, "RAW", job_id); + + return true; } static bool test_DoPrintTest_add_one_job_v4(struct torture_context *tctx, @@ -3459,6 +3462,8 @@ static bool test_DoPrintTest_add_one_job_v4(struct torture_context *tctx, uint32_t *job_id) { test_DoPrintTest_add_one_job_common(tctx, b, handle, document_name, "XPS_PASS", job_id); + + return true; } @@ -4970,7 +4975,7 @@ static bool test_GetDriverInfo_winreg(struct torture_context *tctx, struct policy_handle *hive_handle, const char *server_name_slash) { - WERROR result; + WERROR result = WERR_OK; union spoolss_DriverInfo info; const char *driver_key; struct policy_handle key_handle; @@ -4987,6 +4992,8 @@ static bool test_GetDriverInfo_winreg(struct torture_context *tctx, const char *driver_version; const char *inbox_driver_version; + ZERO_STRUCT(key_handle); + torture_comment(tctx, "Testing Driver Info and winreg consistency\n"); driver_key = talloc_asprintf(tctx, "%s\\%s\\Drivers\\Version-%d\\%s", @@ -6928,7 +6935,7 @@ static bool test_EnumPrinters_servername(struct torture_context *tctx, return true; } - +#if 0 static bool test_GetPrinterDriver(struct torture_context *tctx, struct dcerpc_binding_handle *b, struct policy_handle *handle, @@ -6963,6 +6970,7 @@ static bool test_GetPrinterDriver(struct torture_context *tctx, return true; } +#endif static bool test_GetPrinterDriver2_level(struct torture_context *tctx, struct dcerpc_binding_handle *b, @@ -7663,6 +7671,7 @@ static bool compose_local_driver_directory(struct torture_context *tctx, return true; } +#if 0 static struct spoolss_DeviceMode *torture_devicemode(TALLOC_CTX *mem_ctx, const char *devicename) { @@ -7703,6 +7712,7 @@ static struct spoolss_DeviceMode *torture_devicemode(TALLOC_CTX *mem_ctx, return r; } +#endif static bool test_architecture_buffer(struct torture_context *tctx, void *private_data) @@ -8034,6 +8044,7 @@ static bool torture_rpc_spoolss_printerexwkn_setup(struct torture_context *tctx, return torture_rpc_spoolss_printer_setup_common(tctx, t); } +#if 0 static bool torture_rpc_spoolss_printerdm_setup(struct torture_context *tctx, void **data) { struct torture_printer_context *t; @@ -8047,6 +8058,7 @@ static bool torture_rpc_spoolss_printerdm_setup(struct torture_context *tctx, vo return torture_rpc_spoolss_printer_setup_common(tctx, t); } +#endif static bool torture_rpc_spoolss_printer_teardown_common(struct torture_context *tctx, struct torture_printer_context *t) { diff --git a/source4/torture/rpc/winreg.c b/source4/torture/rpc/winreg.c index 55164cd..d3c3d05 100644 --- a/source4/torture/rpc/winreg.c +++ b/source4/torture/rpc/winreg.c @@ -2577,7 +2577,10 @@ static bool test_volatile_keys(struct torture_context *tctx, int hkey) { struct policy_handle new_handle, hive_handle; - enum winreg_CreateAction action_taken; + enum winreg_CreateAction action_taken = REG_ACTION_NONE; + + ZERO_STRUCT(new_handle); + ZERO_STRUCT(hive_handle); torture_comment(tctx, "Testing VOLATILE key\n"); diff --git a/source4/torture/smb2/streams.c b/source4/torture/smb2/streams.c index 608b397..6077c5b 100644 --- a/source4/torture/smb2/streams.c +++ b/source4/torture/smb2/streams.c @@ -603,6 +603,9 @@ static bool test_stream_delete(struct torture_context *tctx, goto done; } + ZERO_STRUCT(h); + ZERO_STRUCT(h1); + sname1 = talloc_asprintf(mem_ctx, "%s:%s", fname, "Stream One"); /* clean slate .. */ @@ -696,6 +699,7 @@ static bool test_stream_delete(struct torture_context *tctx, CHECK_STATUS(status, NT_STATUS_DELETE_PENDING); -- Samba Shared Repository