diff options
author | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
---|---|---|
committer | Jelmer Vernooij <jelmer@samba.org> | 2008-05-21 18:04:47 +0200 |
commit | 20796bcf57a7f5e1921dc12e0568221f985fe4f2 (patch) | |
tree | 8f0540a602a9ea0031d656bc31c0b8bc1e91eb70 /source3/passdb/secrets.c | |
parent | 323be4a6907e4915bb76aa103bf5b868f0b459b1 (diff) | |
parent | 1a416ff13ca7786f2e8d24c66addf00883e9cb12 (diff) | |
download | samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.gz samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.tar.bz2 samba-20796bcf57a7f5e1921dc12e0568221f985fe4f2.zip |
Merge branch 'v3-3-test' of ssh://git.samba.org/data/git/samba into docbook
Conflicts:
source/Makefile.in
(This used to be commit 01987778a123f853fccdcb7fe9566143e2d7c490)
Diffstat (limited to 'source3/passdb/secrets.c')
-rw-r--r-- | source3/passdb/secrets.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c index 34a87bd0d0..a7223b7e9f 100644 --- a/source3/passdb/secrets.c +++ b/source3/passdb/secrets.c @@ -685,6 +685,7 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, { smb_ucs2_t *uni_dom_name; bool ret; + size_t converted_size; /* packing structures */ uint8 *pass_buf = NULL; @@ -693,7 +694,7 @@ bool secrets_store_trusted_domain_password(const char* domain, const char* pwd, struct trusted_dom_pass pass; ZERO_STRUCT(pass); - if (push_ucs2_allocate(&uni_dom_name, domain) == (size_t)-1) { + if (!push_ucs2_allocate(&uni_dom_name, domain, &converted_size)) { DEBUG(0, ("Could not convert domain name %s to unicode\n", domain)); return False; @@ -926,7 +927,7 @@ struct list_trusted_domains_state { static int list_trusted_domain(struct db_record *rec, void *private_data) { const size_t prefix_len = strlen(SECRETS_DOMTRUST_ACCT_PASS); - size_t packed_size = 0; + size_t converted_size, packed_size = 0; struct trusted_dom_pass pass; struct trustdom_info *dom_info; @@ -960,8 +961,8 @@ static int list_trusted_domain(struct db_record *rec, void *private_data) return 0; } - if (pull_ucs2_talloc(dom_info, &dom_info->name, - pass.uni_name) == (size_t)-1) { + if (!pull_ucs2_talloc(dom_info, &dom_info->name, pass.uni_name, + &converted_size)) { DEBUG(2, ("pull_ucs2_talloc failed\n")); TALLOC_FREE(dom_info); return 0; |