summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Tridgell <tridge@samba.org>2002-02-22 03:14:58 +0000
committerAndrew Tridgell <tridge@samba.org>2002-02-22 03:14:58 +0000
commit566fafdb251de4b88d2f6f71bd210d464b1d2a0a (patch)
tree5c1d3d2c8dd399ca1e47d995060bb48c2c5f61de
parent27439c53c54f1821e90c4db383abe512a2f3db6b (diff)
downloadsamba-566fafdb251de4b88d2f6f71bd210d464b1d2a0a.tar.gz
samba-566fafdb251de4b88d2f6f71bd210d464b1d2a0a.tar.bz2
samba-566fafdb251de4b88d2f6f71bd210d464b1d2a0a.zip
don't do an ADS init when not in ADS mode
(This used to be commit 68693ba4e80257bf895b1c8db18c138d5d9919bb)
-rw-r--r--source3/smbd/negprot.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/source3/smbd/negprot.c b/source3/smbd/negprot.c
index 073edd70db..934d594853 100644
--- a/source3/smbd/negprot.c
+++ b/source3/smbd/negprot.c
@@ -193,16 +193,15 @@ static int negprot_spnego(char *p)
return 16;
}
#endif
- {
+ if (lp_security() != SEC_ADS) {
+ blob = spnego_gen_negTokenInit(guid, OIDs_plain, "NONE");
+ } else {
ADS_STRUCT *ads;
ads = ads_init(NULL, NULL, NULL, NULL);
-
/* win2000 uses host$@REALM, which we will probably use eventually,
but for now this works */
asprintf(&principal, "HOST/%s@%s", guid, ads->realm);
- blob = spnego_gen_negTokenInit(guid,
- lp_security()==SEC_ADS ? OIDs_krb5 : OIDs_plain,
- principal);
+ blob = spnego_gen_negTokenInit(guid, OIDs_krb5, principal);
free(principal);
ads_destroy(&ads);
}