diff options
Diffstat (limited to 'source3/utils')
-rw-r--r-- | source3/utils/net_rpc_join.c | 4 | ||||
-rw-r--r-- | source3/utils/net_rpc_trust.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/source3/utils/net_rpc_join.c b/source3/utils/net_rpc_join.c index ed81aacac79..7167cf9f3c4 100644 --- a/source3/utils/net_rpc_join.c +++ b/source3/utils/net_rpc_join.c @@ -401,7 +401,9 @@ int net_rpc_join_newstyle(struct net_context *c, int argc, const char **argv) /* Create a random machine account password */ - clear_trust_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH); + clear_trust_password = generate_random_password(talloc_tos(), + DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH, + DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH); E_md4hash(clear_trust_password, md4_trust_password); /* Set password on machine account */ diff --git a/source3/utils/net_rpc_trust.c b/source3/utils/net_rpc_trust.c index d15d10c0d42..9060700be1d 100644 --- a/source3/utils/net_rpc_trust.c +++ b/source3/utils/net_rpc_trust.c @@ -518,11 +518,11 @@ static int rpc_trust_common(struct net_context *net_ctx, int argc, } DEBUG(0, ("Using random trust password.\n")); - /* FIXME: why only 8 characters work? Would it be possible to use a - * random binary password? */ - trust_pw = generate_random_str(mem_ctx, 8); + trust_pw = generate_random_password(mem_ctx, + DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH, + DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH); if (trust_pw == NULL) { - DEBUG(0, ("generate_random_str failed.\n")); + DEBUG(0, ("generate_random_password failed.\n")); goto done; } } else { |