summaryrefslogtreecommitdiff
path: root/source3/libsmb
diff options
context:
space:
mode:
authorVolker Lendecke <vlendec@samba.org>2006-10-02 13:30:05 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 12:15:06 -0500
commitbc2a760498a2b3c918ac3823fe275fc273d98071 (patch)
tree73378bf42f939c8c22ce2d02e0f7945960860176 /source3/libsmb
parent4295292734c144275bb6e256677f678ae7023fb4 (diff)
downloadsamba-bc2a760498a2b3c918ac3823fe275fc273d98071.tar.gz
samba-bc2a760498a2b3c918ac3823fe275fc273d98071.tar.bz2
samba-bc2a760498a2b3c918ac3823fe275fc273d98071.zip
r19043: There's no point in #ifdef'ing the detection whether we were offered KRB5 in
SPNEGO, as long as we don't make use of it without krb libs. Makes the code a bit simpler. Volker (This used to be commit 23549e6c082e92e45ced4eee215bcc0094b2a88b)
Diffstat (limited to 'source3/libsmb')
-rw-r--r--source3/libsmb/cliconnect.c10
1 files changed, 2 insertions, 8 deletions
diff --git a/source3/libsmb/cliconnect.c b/source3/libsmb/cliconnect.c
index 070717caef..81188b004f 100644
--- a/source3/libsmb/cliconnect.c
+++ b/source3/libsmb/cliconnect.c
@@ -723,9 +723,7 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
char *principal;
char *OIDs[ASN1_MAX_OIDS];
int i;
-#ifdef HAVE_KRB5
BOOL got_kerberos_mechanism = False;
-#endif
DATA_BLOB blob;
DEBUG(3,("Doing spnego session setup (blob length=%lu)\n", (unsigned long)cli->secblob.length));
@@ -754,18 +752,15 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
/* make sure the server understands kerberos */
for (i=0;OIDs[i];i++) {
DEBUG(3,("got OID=%s\n", OIDs[i]));
-#ifdef HAVE_KRB5
if (strcmp(OIDs[i], OID_KERBEROS5_OLD) == 0 ||
strcmp(OIDs[i], OID_KERBEROS5) == 0) {
got_kerberos_mechanism = True;
}
-#endif
free(OIDs[i]);
}
DEBUG(3,("got principal=%s\n", principal ? principal : "<null>"));
-#ifdef HAVE_KRB5
if (got_kerberos_mechanism && (principal == NULL)) {
/*
* It is WRONG to depend on the principal sent in the negprot
@@ -773,11 +768,10 @@ ADS_STATUS cli_session_setup_spnego(struct cli_state *cli, const char *user,
* segfault later) disable Kerberos when no principal was
* sent. -- VL
*/
- DEBUG(1, ("Kerberos mech was offered, but no principal was sent\n"));
- DEBUGADD(1, ("Disabling Kerberos\n"));
+ DEBUG(1, ("Kerberos mech was offered, but no principal was "
+ "sent, disabling Kerberos\n"));
cli->use_kerberos = False;
}
-#endif
fstrcpy(cli->user_name, user);