summaryrefslogtreecommitdiff
path: root/source3/libads
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2013-02-01 13:14:05 +0100
committerMichael Adam <obnox@samba.org>2013-02-04 17:14:22 +0100
commit9292e5b74310632e1f0b4b2b76a9ef4ccae6874e (patch)
tree0d83eff5d57a9ceccecf64da2505d65ccf87ed6b /source3/libads
parentc5d991e5102069ec712fe609c031a10ee8b0f389 (diff)
downloadsamba-9292e5b74310632e1f0b4b2b76a9ef4ccae6874e.tar.gz
samba-9292e5b74310632e1f0b4b2b76a9ef4ccae6874e.tar.bz2
samba-9292e5b74310632e1f0b4b2b76a9ef4ccae6874e.zip
s3: use generate_random_password() instead of generate_random_str()
Signed-off-by: Stefan Metzmacher <metze@samba.org> Reviewed-by: Michael Adam <obnox@samba.org>
Diffstat (limited to 'source3/libads')
-rw-r--r--source3/libads/util.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/source3/libads/util.c b/source3/libads/util.c
index 6a6b42afc4..2e22bca02e 100644
--- a/source3/libads/util.c
+++ b/source3/libads/util.c
@@ -35,8 +35,10 @@ ADS_STATUS ads_change_trust_account_password(ADS_STRUCT *ads, char *host_princip
return ADS_ERROR_SYSTEM(ENOENT);
}
- new_password = generate_random_str(talloc_tos(), DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
-
+ new_password = generate_random_password(talloc_tos(),
+ DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH,
+ DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH);
+
ret = kerberos_set_password(ads->auth.kdc_server, host_principal, password, host_principal, new_password, ads->auth.time_offset);
if (!ADS_ERR_OK(ret)) {