diff options
Diffstat (limited to 'source3')
-rw-r--r-- | source3/passdb/passdb.c | 4 | ||||
-rw-r--r-- | source3/winbindd/winbindd_cm.c | 9 |
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. */ |