]> git.ipfire.org Git - thirdparty/samba.git/commitdiff
s3:rpc_client: Use C99 inititializer in dcerpc_samr_chgpasswd_user()
authorAndreas Schneider <asn@samba.org>
Mon, 21 Jan 2019 12:16:56 +0000 (13:16 +0100)
committerAndreas Schneider <asn@cryptomilk.org>
Thu, 27 Jun 2019 12:54:24 +0000 (12:54 +0000)
This also cleans up after using them.

Signed-off-by: Andreas Schneider <asn@samba.org>
Reviewed-by: Andrew Bartlett <abartlet@samba.org>
source3/rpc_client/cli_samr.c
source3/wscript_build

index e2bf08de4a02c4752519e559b549d8af7b30da21..7764e1a8540e73fb6a5c86c0f382e506eafb2d59 100644 (file)
@@ -41,15 +41,10 @@ NTSTATUS dcerpc_samr_chgpasswd_user(struct dcerpc_binding_handle *h,
        NTSTATUS status;
        struct samr_Password hash1, hash2, hash3, hash4, hash5, hash6;
 
-       uchar old_nt_hash[16];
-       uchar old_lm_hash[16];
-       uchar new_nt_hash[16];
-       uchar new_lm_hash[16];
-
-       ZERO_STRUCT(old_nt_hash);
-       ZERO_STRUCT(old_lm_hash);
-       ZERO_STRUCT(new_nt_hash);
-       ZERO_STRUCT(new_lm_hash);
+       uint8_t old_nt_hash[16] = {0};
+       uint8_t old_lm_hash[16] = {0};
+       uint8_t new_nt_hash[16] = {0};
+       uint8_t new_lm_hash[16] = {0};
 
        DEBUG(10,("rpccli_samr_chgpasswd_user\n"));
 
@@ -81,6 +76,11 @@ NTSTATUS dcerpc_samr_chgpasswd_user(struct dcerpc_binding_handle *h,
                                                &hash6,
                                                presult);
 
+       ZERO_ARRAY(old_nt_hash);
+       ZERO_ARRAY(old_lm_hash);
+       ZERO_ARRAY(new_nt_hash);
+       ZERO_ARRAY(new_lm_hash);
+
        return status;
 }
 
index b61fc3cc95f476376fa1cf311aaf09129c47c43f..7d44071225ea3ecd3c7d5a78bfa5cf67eb1f3e7d 100644 (file)
@@ -1062,7 +1062,7 @@ bld.SAMBA3_SUBSYSTEM('INIT_NETLOGON',
 
 bld.SAMBA3_SUBSYSTEM('INIT_SAMR',
                     source='rpc_client/init_samr.c',
-                    deps='samba-util')
+                    deps='samba-util GNUTLS_HELPERS')
 
 bld.SAMBA3_SUBSYSTEM('LIBLSA',
                      source='lib/lsa.c')