summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Metzmacher <metze@samba.org>2011-08-09 22:21:41 +0200
committerStefan Metzmacher <metze@samba.org>2011-08-10 11:14:56 +0200
commit33a6a4ea854edb6cc667ba78babab0b930755b91 (patch)
tree33463dcd8b8a34553a417dd6fa54b2f1fdac079f
parentd7cdd9651e4e849f19d791fd587f74ad76d370c8 (diff)
downloadsamba-33a6a4ea854edb6cc667ba78babab0b930755b91.tar.gz
samba-33a6a4ea854edb6cc667ba78babab0b930755b91.tar.bz2
samba-33a6a4ea854edb6cc667ba78babab0b930755b91.zip
s3:winbindd_cm: use cli_session_setup() instead of cli_session_setup_spnego()
metze
-rw-r--r--source3/winbindd/winbindd_cm.c33
1 files changed, 18 insertions, 15 deletions
diff --git a/source3/winbindd/winbindd_cm.c b/source3/winbindd/winbindd_cm.c
index 00acc0ee20..09189aaa74 100644
--- a/source3/winbindd/winbindd_cm.c
+++ b/source3/winbindd/winbindd_cm.c
@@ -850,18 +850,19 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
winbindd_set_locator_kdc_envs(domain);
- ads_status = cli_session_setup_spnego(*cli,
- machine_krb5_principal,
- machine_password,
- lp_workgroup(),
- domain->alt_name);
+ result = cli_session_setup(*cli,
+ machine_krb5_principal,
+ machine_password,
+ strlen(machine_password)+1,
+ machine_password,
+ strlen(machine_password)+1,
+ lp_workgroup());
- if (!ADS_ERR_OK(ads_status)) {
+ if (!NT_STATUS_IS_OK(result)) {
DEBUG(4,("failed kerberos session setup with %s\n",
- ads_errstr(ads_status)));
+ nt_errstr(result)));
}
- result = ads_ntstatus(ads_status);
if (NT_STATUS_IS_OK(result)) {
/* Ensure creds are stored for NTLMSSP authenticated pipe access. */
result = cli_init_creds(*cli, machine_account, lp_workgroup(), machine_password);
@@ -879,14 +880,16 @@ static NTSTATUS cm_prepare_connection(const struct winbindd_domain *domain,
"[%s]\\[%s]\n", controller, lp_netbios_name(),
lp_workgroup(), machine_account));
- ads_status = cli_session_setup_spnego(*cli,
- machine_account,
- machine_password,
- lp_workgroup(),
- NULL);
- if (!ADS_ERR_OK(ads_status)) {
+ result = cli_session_setup(*cli,
+ machine_account,
+ machine_password,
+ strlen(machine_password)+1,
+ machine_password,
+ strlen(machine_password)+1,
+ lp_workgroup());
+ if (!NT_STATUS_IS_OK(result)) {
DEBUG(4, ("authenticated session setup failed with %s\n",
- ads_errstr(ads_status)));
+ nt_errstr(result)));
}
result = ads_ntstatus(ads_status);