summaryrefslogtreecommitdiff
path: root/source3/smbd/sesssetup.c
diff options
context:
space:
mode:
authorGerald Carter <jerry@samba.org>2005-03-22 15:12:50 +0000
committerGerald (Jerry) Carter <jerry@samba.org>2007-10-10 10:56:11 -0500
commit4b831f8e16d305666b0f2b018c35f5427efc21cc (patch)
treece306794ce0ca21f7a35e489a01d8738a594e967 /source3/smbd/sesssetup.c
parentdbd5c968d7b90576fb63dc574e02bbb89a5dcd74 (diff)
downloadsamba-4b831f8e16d305666b0f2b018c35f5427efc21cc.tar.gz
samba-4b831f8e16d305666b0f2b018c35f5427efc21cc.tar.bz2
samba-4b831f8e16d305666b0f2b018c35f5427efc21cc.zip
r5952: BUG 2469: patch from Jason Mader to cleanup compiler warning when not using krb5
(This used to be commit 19a639ac468237b22f16d917c0150fbf10c9623e)
Diffstat (limited to 'source3/smbd/sesssetup.c')
-rw-r--r--source3/smbd/sesssetup.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/source3/smbd/sesssetup.c b/source3/smbd/sesssetup.c
index 40ea28a86d..e1fb71d575 100644
--- a/source3/smbd/sesssetup.c
+++ b/source3/smbd/sesssetup.c
@@ -417,7 +417,9 @@ static int reply_spnego_negotiate(connection_struct *conn,
DATA_BLOB secblob;
int i;
DATA_BLOB chal;
- BOOL got_kerberos = False;
+#ifdef HAVE_KRB5
+ BOOL got_kerberos_mechanism = False;
+#endif
NTSTATUS nt_status;
/* parse out the OIDs and the first sec blob */
@@ -434,11 +436,13 @@ static int reply_spnego_negotiate(connection_struct *conn,
server sent back krb5/mskrb5/ntlmssp as mechtypes, but the
client (2ksp3) replied with ntlmssp/mskrb5/krb5 and an
NTLMSSP mechtoken. --jerry */
-
+
+#ifdef HAVE_KRB5
if (strcmp(OID_KERBEROS5, OIDs[0]) == 0 ||
strcmp(OID_KERBEROS5_OLD, OIDs[0]) == 0) {
- got_kerberos = True;
+ got_kerberos_mechanism = True;
}
+#endif
for (i=0;OIDs[i];i++) {
DEBUG(3,("Got OID %s\n", OIDs[i]));
@@ -447,7 +451,7 @@ static int reply_spnego_negotiate(connection_struct *conn,
DEBUG(3,("Got secblob of size %lu\n", (unsigned long)secblob.length));
#ifdef HAVE_KRB5
- if (got_kerberos && (SEC_ADS == lp_security())) {
+ if (got_kerberos_mechanism && (SEC_ADS == lp_security())) {
int ret = reply_spnego_kerberos(conn, inbuf, outbuf,
length, bufsize, &secblob);
data_blob_free(&secblob);