From: Amos Jeffries Date: Fri, 11 Sep 2009 00:48:42 +0000 (+1200) Subject: Author: Markus Moeller X-Git-Tag: SQUID_3_2_0_1~612^2~20 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6989c6dcc2a01b8147d6d92ff8d3508aa3d7a647;p=thirdparty%2Fsquid.git Author: Markus Moeller Kerberos helepr updates. --- diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc index f12674e38c..6ee901398e 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc @@ -55,7 +55,6 @@ #elif HAVE_GSSAPI_H #include #endif /* HAVE_GSSAPI_GSSAPI_H */ -#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE #else /* HAVE_HEIMDAL_KERBEROS */ #if HAVE_GSSAPI_GSSAPI_H #include @@ -69,6 +68,9 @@ #include #endif /* HAVE_GSSAPI_GSSAPI_GENERIC_H */ #endif /* HAVE_HEIMDAL_KERBEROS */ +#ifndef gss_nt_service_name +#define gss_nt_service_name GSS_C_NT_HOSTBASED_SERVICE +#endif #define PROGRAM "squid_kerb_auth" @@ -239,7 +241,7 @@ main(int argc, char *const argv[]) setbuf(stdout, NULL); setbuf(stdin, NULL); - while (-1 != (opt = getopt(argc, argv, "dis:h"))) { + while (-1 != (opt = getopt(argc, argv, "dirs:h"))) { switch (opt) { case 'd': debug = 1; @@ -644,4 +646,24 @@ main(int argc, char *const argv[]) continue; } } +#else +#include +#include +#ifndef MAX_AUTHTOKEN_LEN +#define MAX_AUTHTOKEN_LEN 65535 +#endif +int +main(int argc, char *const argv[]) +{ + setbuf(stdout, NULL); + setbuf(stdin, NULL); + char buf[MAX_AUTHTOKEN_LEN]; + while (1) { + if (fgets(buf, sizeof(buf) - 1, stdin) == NULL) { + fprintf(stdout, "BH input error\n"); + exit(0); + } + fprintf(stdout, "BH Kerberos authentication not supported\n"); + } +} #endif /* HAVE_GSSAPI */ diff --git a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc index f60add2bad..2f57355088 100644 --- a/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc +++ b/helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc @@ -239,4 +239,11 @@ main(int argc, char *argv[]) exit(0); } +#else +#include +int +main(int argc, char *argv[]) +{ + exit(-1); +} #endif /* HAVE_GSSAPI */