summaryrefslogtreecommitdiff
path: root/source3/passdb/secrets.c
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2006-05-25 15:44:41 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 11:17:12 -0500
commita835b9500a30c647c90a050eb9655bf89ae27e05 (patch)
treecf1c07964a3aa14f743267bd307ff8e33f0bfb6e /source3/passdb/secrets.c
parent9f6631b469366e3617437a12cf40b1a8c7479ad4 (diff)
downloadsamba-a835b9500a30c647c90a050eb9655bf89ae27e05.tar.gz
samba-a835b9500a30c647c90a050eb9655bf89ae27e05.tar.bz2
samba-a835b9500a30c647c90a050eb9655bf89ae27e05.zip
r15888: Fix bug #3804 from jason@ncac.gwu.edu
Invalid comparisons. Jeremy. (This used to be commit 9890a31c5f4a8911b0f56eee67cfbcc46f15ee43)
Diffstat (limited to 'source3/passdb/secrets.c')
-rw-r--r--source3/passdb/secrets.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/source3/passdb/secrets.c b/source3/passdb/secrets.c
index 32793dea58..db560b632f 100644
--- a/source3/passdb/secrets.c
+++ b/source3/passdb/secrets.c
@@ -404,7 +404,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) < 0) {
+ if (push_ucs2_allocate(&uni_dom_name, domain) == (size_t)-1) {
DEBUG(0, ("Could not convert domain name %s to unicode\n",
domain));
return False;
@@ -735,7 +735,7 @@ NTSTATUS secrets_trusted_domains(TALLOC_CTX *mem_ctx, uint32 *num_domains,
}
if (pull_ucs2_talloc(mem_ctx, &dom_info->name,
- pass.uni_name) < 0) {
+ pass.uni_name) == (size_t)-1) {
DEBUG(2, ("pull_ucs2_talloc failed\n"));
tdb_search_list_free(keys);
return NT_STATUS_NO_MEMORY;