]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3: Fix Coverity ID 2727 to 2740 -- UNINIT
authorVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 13:38:25 +0000 (15:38 +0200)
committerVolker Lendecke <vl@samba.org>
Thu, 19 Apr 2012 18:52:27 +0000 (20:52 +0200)
source3/utils/net_rpc_printer.c
source3/winbindd/winbindd_pam.c

index eec5a6cacc425426bba9a00347ab7f15cea4ddee..ef84d9eec0b854c23839f981e90da7976215f759 100644 (file)
@@ -1309,7 +1309,7 @@ static NTSTATUS rpc_printer_publish_internals_args(struct rpc_pipe_client *pipe_
        struct spoolss_SetPrinterInfoCtr info_ctr;
        struct spoolss_DevmodeContainer devmode_ctr;
        struct sec_desc_buf secdesc_ctr;
-       struct policy_handle hnd;
+       struct policy_handle hnd = { 0, };
        WERROR result;
        const char *action_str;
 
@@ -1465,7 +1465,7 @@ NTSTATUS rpc_printer_publish_list_internals(struct net_context *c,
        const char *printername, *sharename;
        union spoolss_PrinterInfo *info_enum;
        union spoolss_PrinterInfo info;
-       struct policy_handle hnd;
+       struct policy_handle hnd = { 0, };
        int state;
        WERROR werr;
 
@@ -1564,7 +1564,8 @@ NTSTATUS rpc_printer_migrate_security_internals(struct net_context *c,
        const char *printername, *sharename;
        struct rpc_pipe_client *pipe_hnd_dst = NULL;
        struct dcerpc_binding_handle *b_dst = NULL;
-       struct policy_handle hnd_src, hnd_dst;
+       struct policy_handle hnd_src = { 0, };
+       struct policy_handle hnd_dst = { 0, };
        union spoolss_PrinterInfo *info_enum;
        struct cli_state *cli_dst = NULL;
        union spoolss_PrinterInfo info_src, info_dst;
@@ -1714,7 +1715,8 @@ NTSTATUS rpc_printer_migrate_forms_internals(struct net_context *c,
        const char *printername, *sharename;
        struct rpc_pipe_client *pipe_hnd_dst = NULL;
        struct dcerpc_binding_handle *b_dst = NULL;
-       struct policy_handle hnd_src, hnd_dst;
+       struct policy_handle hnd_src = { 0, };
+       struct policy_handle hnd_dst = { 0, };
        union spoolss_PrinterInfo *info_enum;
        union spoolss_PrinterInfo info_dst;
        uint32_t num_forms;
@@ -1889,7 +1891,8 @@ NTSTATUS rpc_printer_migrate_drivers_internals(struct net_context *c,
        bool got_dst_driver_share = false;
        struct rpc_pipe_client *pipe_hnd_dst = NULL;
        struct dcerpc_binding_handle *b_dst = NULL;
-       struct policy_handle hnd_src, hnd_dst;
+       struct policy_handle hnd_src = { 0, };
+       struct policy_handle hnd_dst = { 0, };
        union spoolss_DriverInfo drv_info_src;
        union spoolss_PrinterInfo *info_enum;
        union spoolss_PrinterInfo info_dst;
@@ -2110,7 +2113,8 @@ NTSTATUS rpc_printer_migrate_printers_internals(struct net_context *c,
        union spoolss_PrinterInfo info_dst, info_src;
        union spoolss_PrinterInfo *info_enum;
        struct cli_state *cli_dst = NULL;
-       struct policy_handle hnd_dst, hnd_src;
+       struct policy_handle hnd_src = { 0, };
+       struct policy_handle hnd_dst = { 0, };
        const char *printername, *sharename;
        struct rpc_pipe_client *pipe_hnd_dst = NULL;
        struct dcerpc_binding_handle *b_dst = NULL;
@@ -2279,7 +2283,8 @@ NTSTATUS rpc_printer_migrate_settings_internals(struct net_context *c,
        const char *printername, *sharename;
        struct rpc_pipe_client *pipe_hnd_dst = NULL;
        struct dcerpc_binding_handle *b_dst = NULL;
-       struct policy_handle hnd_src, hnd_dst;
+       struct policy_handle hnd_src = { 0, };
+       struct policy_handle hnd_dst = { 0, };
        union spoolss_PrinterInfo *info_enum;
        union spoolss_PrinterInfo info_dst_publish;
        union spoolss_PrinterInfo info_dst;
index 6757f3611e777a42b6c769866e13316c51dabb19..216e1ffc339e6d3a77fd9078b45296809305d62d 100644 (file)
@@ -2213,8 +2213,8 @@ enum winbindd_result winbindd_dual_pam_chng_pswd_auth_crap(struct winbindd_domai
                        state->request->data.chng_pswd_auth_crap.old_lm_hash_enc,
                        state->request->data.chng_pswd_auth_crap.old_lm_hash_enc_len);
        } else {
-               new_lm_password.length = 0;
-               old_lm_hash_enc.length = 0;
+               new_lm_password = data_blob_null;
+               old_lm_hash_enc = data_blob_null;
        }
 
        /* Get sam handle */