s3:net_rpc_trust: make use of trust_pw_new_value()
authorStefan Metzmacher <metze@samba.org>
Tue, 23 Aug 2016 08:42:30 +0000 (10:42 +0200)
committerRalph Boehme <slow@samba.org>
Tue, 21 Feb 2017 15:09:22 +0000 (16:09 +0100)
BUG: https://bugzilla.samba.org/show_bug.cgi?id=12262

Signed-off-by: Stefan Metzmacher <metze@samba.org>
Reviewed-by: Ralph Boehme <slow@samba.org>
source3/utils/net_rpc_trust.c

index 5e58103fb0308588ff3402c9a11147eeac313a00..5c13e06a28f03b511d216afa148c0149949eb357 100644 (file)
@@ -518,9 +518,9 @@ static int rpc_trust_common(struct net_context *net_ctx, int argc,
                        }
 
                        DEBUG(0, ("Using random trust password.\n"));
                        }
 
                        DEBUG(0, ("Using random trust password.\n"));
-                       trust_pw = generate_random_password(mem_ctx,
-                                       DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH,
-                                       DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+                       trust_pw = trust_pw_new_value(mem_ctx,
+                                                     SEC_CHAN_DOMAIN,
+                                                     SEC_DOMAIN);
                        if (trust_pw == NULL) {
                                DEBUG(0, ("generate_random_password failed.\n"));
                                goto done;
                        if (trust_pw == NULL) {
                                DEBUG(0, ("generate_random_password failed.\n"));
                                goto done;