summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeremy Allison <jra@samba.org>2007-12-17 17:03:07 -0800
committerJeremy Allison <jra@samba.org>2007-12-17 17:03:07 -0800
commit289d793629592b8aff24d3583fc052ac3c30247a (patch)
tree9827aa270ff5a4200cbce5776871e6f411aabc2d
parent2b0a570c77b5e4afba44e670f1ebf0016f96d30a (diff)
parenta62cc944435fb9964c765cb9495f18308823ac8f (diff)
downloadsamba-289d793629592b8aff24d3583fc052ac3c30247a.tar.gz
samba-289d793629592b8aff24d3583fc052ac3c30247a.tar.bz2
samba-289d793629592b8aff24d3583fc052ac3c30247a.zip
Merge branch 'v3-2-test' of ssh://jra@git.samba.org/data/git/samba into v3-2-test
(This used to be commit 8223624fea7c1b61e9231168cb4d82771576cbc5)
-rw-r--r--source3/passdb/passdb.c4
-rw-r--r--source3/winbindd/winbindd_cm.c9
2 files changed, 9 insertions, 4 deletions
diff --git a/source3/passdb/passdb.c b/source3/passdb/passdb.c
index 9311b8a74e..4228f6c32f 100644
--- a/source3/passdb/passdb.c
+++ b/source3/passdb/passdb.c
@@ -1552,7 +1552,9 @@ bool get_trust_pw_clear(const char *domain, char **ret_pwd,
return false;
}
- *channel = SEC_CHAN_DOMAIN;
+ if (channel != NULL) {
+ *channel = SEC_CHAN_DOMAIN;
+ }
if (account_name != NULL) {
*account_name = lp_workgroup();
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index cb366a293c..8ea815535f 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -2003,13 +2003,16 @@ NTSTATUS cm_connect_sam(struct winbindd_domain *domain, TALLOC_CTX *mem_ctx,
goto schannel;
}
domain_name = domain->name;
- goto schannel;
} else {
- machine_password = conn_pwd;
- machine_account = conn->cli->user_name;
+ machine_password = SMB_STRDUP(conn_pwd);
+ machine_account = SMB_STRDUP(conn->cli->user_name);
domain_name = conn->cli->domain;
}
+ if (!machine_password || !machine_account) {
+ result = NT_STATUS_NO_MEMORY;
+ goto done;
+ }
/* We have an authenticated connection. Use a NTLMSSP SPNEGO
authenticated SAMR pipe with sign & seal. */