diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-10-19 10:05:48 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-10-19 10:05:48 +0200 |
commit | 7275952568bbf003299d895b71b246f75851db93 (patch) | |
tree | 7ec15c35176685b8a486ae86055b6de36423ca2f /source3/libsmb | |
parent | b1a1fbcbfb8f7d9b09bd26407ca4185b2cb4a0e3 (diff) | |
download | samba-7275952568bbf003299d895b71b246f75851db93.tar.gz samba-7275952568bbf003299d895b71b246f75851db93.tar.bz2 samba-7275952568bbf003299d895b71b246f75851db93.zip |
Add TALLOC_CTX pointer to generate_random_str(), for consistency with
Samba 4.
Diffstat (limited to 'source3/libsmb')
-rw-r--r-- | source3/libsmb/trusts_util.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/source3/libsmb/trusts_util.c b/source3/libsmb/trusts_util.c index 2f336f14e6..f0595695d2 100644 --- a/source3/libsmb/trusts_util.c +++ b/source3/libsmb/trusts_util.c @@ -33,13 +33,12 @@ NTSTATUS trust_pw_change_and_store_it(struct rpc_pipe_client *cli, TALLOC_CTX *m { unsigned char new_trust_passwd_hash[16]; char *new_trust_passwd; - char *str; NTSTATUS nt_status; /* Create a random machine account password */ - str = generate_random_str(DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH); + new_trust_passwd = generate_random_str(mem_ctx, DEFAULT_TRUST_ACCOUNT_PASSWORD_LENGTH); - if ((new_trust_passwd = talloc_strdup(mem_ctx, str)) == NULL) { + if (new_trust_passwd == NULL) { DEBUG(0, ("talloc_strdup failed\n")); return NT_STATUS_NO_MEMORY; } |