]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Author: Markus Moeller <huaraz@moeller.plus.com>
authorAmos Jeffries <squid3@treenet.co.nz>
Fri, 11 Sep 2009 00:48:42 +0000 (12:48 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Fri, 11 Sep 2009 00:48:42 +0000 (12:48 +1200)
Kerberos helepr updates.

helpers/negotiate_auth/kerberos/negotiate_kerberos_auth.cc
helpers/negotiate_auth/kerberos/negotiate_kerberos_auth_test.cc

index f12674e38c963e4202fa1351de487d47f576a7e7..6ee901398ecc67339b870d4676ef54f686079184 100644 (file)
@@ -55,7 +55,6 @@
 #elif HAVE_GSSAPI_H
 #include <gssapi.h>
 #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 <gssapi/gssapi.h>
@@ -69,6 +68,9 @@
 #include <gssapi/gssapi_generic.h>
 #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 <stdio.h>
+#include <stdlib.h>
+#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 */
index f60add2bad7202f7bfca45b501340a289c874b2b..2f573550880c8c2e09158cc9c2b9c1bc56b8de31 100644 (file)
@@ -239,4 +239,11 @@ main(int argc, char *argv[])
 
     exit(0);
 }
+#else
+#include <stdlib.h>
+int
+main(int argc, char *argv[])
+{
+  exit(-1);
+}
 #endif /* HAVE_GSSAPI */