summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorJelmer Vernooij <jelmer@samba.org>2008-10-19 10:05:48 +0200
committerJelmer Vernooij <jelmer@samba.org>2008-10-19 10:05:48 +0200
commit7275952568bbf003299d895b71b246f75851db93 (patch)
tree7ec15c35176685b8a486ae86055b6de36423ca2f /source3/libsmb
parentb1a1fbcbfb8f7d9b09bd26407ca4185b2cb4a0e3 (diff)
downloadsamba-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.c5
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;
}