]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Basic Authentication Helper name upgrades
authorAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Jan 2010 12:06:08 +0000 (01:06 +1300)
committerAmos Jeffries <squid3@treenet.co.nz>
Sat, 2 Jan 2010 12:06:08 +0000 (01:06 +1300)
This nearly completes renaming and C++ compiling of the basic auth helpers.
MSNT is still pending cleanup in it's smb library code.

TODO: other helper types updated.

51 files changed:
configure.in
doc/release-notes/release-3.2.html
doc/release-notes/release-3.2.sgml
helpers/basic_auth/MSNT-multi-domain/Makefile.am [new file with mode: 0644]
helpers/basic_auth/MSNT-multi-domain/README.txt [moved from helpers/basic_auth/multi-domain-NTLM/README.txt with 100% similarity]
helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl [moved from helpers/basic_auth/multi-domain-NTLM/smb_auth.pl with 98% similarity]
helpers/basic_auth/MSNT-multi-domain/config.test [moved from helpers/basic_auth/multi-domain-NTLM/config.test with 100% similarity]
helpers/basic_auth/Makefile.am
helpers/basic_auth/NIS/Makefile.am [new file with mode: 0644]
helpers/basic_auth/NIS/basic_nis_auth.cc [moved from helpers/basic_auth/YP/yp_auth.c with 91% similarity]
helpers/basic_auth/NIS/config.test [moved from helpers/basic_auth/YP/config.test with 100% similarity]
helpers/basic_auth/NIS/nis_support.cc [moved from helpers/basic_auth/YP/nis_support.c with 100% similarity]
helpers/basic_auth/NIS/nis_support.h [moved from helpers/basic_auth/YP/nis_support.h with 100% similarity]
helpers/basic_auth/PAM/Makefile.am
helpers/basic_auth/PAM/basic_pam_auth.8 [moved from helpers/basic_auth/PAM/pam_auth.8 with 89% similarity]
helpers/basic_auth/PAM/basic_pam_auth.cc [moved from helpers/basic_auth/PAM/pam_auth.c with 95% similarity]
helpers/basic_auth/POP3/Makefile.am
helpers/basic_auth/POP3/basic_pop3_auth.pl [moved from helpers/basic_auth/POP3/pop3.pl with 100% similarity]
helpers/basic_auth/RADIUS/COPYRIGHT [moved from helpers/basic_auth/squid_radius_auth/COPYRIGHT with 100% similarity]
helpers/basic_auth/RADIUS/Changelog [moved from helpers/basic_auth/squid_radius_auth/Changelog with 100% similarity]
helpers/basic_auth/RADIUS/Make.inc [moved from helpers/basic_auth/squid_radius_auth/Make.inc with 100% similarity]
helpers/basic_auth/RADIUS/Makefile.am [new file with mode: 0644]
helpers/basic_auth/RADIUS/Makefile.default [moved from helpers/basic_auth/squid_radius_auth/Makefile.default with 100% similarity]
helpers/basic_auth/RADIUS/Makefile.solaris [moved from helpers/basic_auth/squid_radius_auth/Makefile.solaris with 100% similarity]
helpers/basic_auth/RADIUS/README [moved from helpers/basic_auth/squid_radius_auth/README with 85% similarity]
helpers/basic_auth/RADIUS/basic_radius_auth.8 [moved from helpers/basic_auth/squid_radius_auth/squid_radius_auth.8 with 89% similarity]
helpers/basic_auth/RADIUS/basic_radius_auth.cc [moved from helpers/basic_auth/squid_radius_auth/squid_rad_auth.c with 95% similarity]
helpers/basic_auth/RADIUS/config.test [moved from helpers/basic_auth/squid_radius_auth/config.test with 100% similarity]
helpers/basic_auth/RADIUS/radius-util.cc [moved from helpers/basic_auth/squid_radius_auth/radius-util.c with 100% similarity]
helpers/basic_auth/RADIUS/radius-util.h [moved from helpers/basic_auth/squid_radius_auth/radius-util.h with 100% similarity]
helpers/basic_auth/RADIUS/radius.h [moved from helpers/basic_auth/squid_radius_auth/radius.h with 100% similarity]
helpers/basic_auth/SASL/Makefile.am
helpers/basic_auth/SASL/README
helpers/basic_auth/SASL/basic_sasl_auth.cc [moved from helpers/basic_auth/SASL/sasl_auth.c with 95% similarity]
helpers/basic_auth/SASL/basic_sasl_auth.conf [moved from helpers/basic_auth/SASL/squid_sasl_auth.conf with 100% similarity]
helpers/basic_auth/SASL/basic_sasl_auth.pam [moved from helpers/basic_auth/SASL/squid_sasl_auth with 100% similarity]
helpers/basic_auth/SMB/ChangeLog
helpers/basic_auth/SMB/Makefile.am
helpers/basic_auth/SMB/README [deleted file]
helpers/basic_auth/SMB/basic_smb_auth.cc [moved from helpers/basic_auth/SMB/smb_auth.c with 98% similarity]
helpers/basic_auth/SMB/basic_smb_auth.sh [moved from helpers/basic_auth/SMB/smb_auth.sh with 100% similarity]
helpers/basic_auth/SSPI/Makefile.am [new file with mode: 0644]
helpers/basic_auth/SSPI/basic_sspi_auth.cc [moved from helpers/basic_auth/mswin_sspi/mswin_auth.c with 99% similarity]
helpers/basic_auth/SSPI/config.test [moved from helpers/basic_auth/mswin_sspi/config.test with 100% similarity]
helpers/basic_auth/SSPI/readme.txt [moved from helpers/basic_auth/mswin_sspi/readme.txt with 100% similarity]
helpers/basic_auth/SSPI/valid.cc [moved from helpers/basic_auth/mswin_sspi/valid.c with 99% similarity]
helpers/basic_auth/SSPI/valid.h [moved from helpers/basic_auth/mswin_sspi/valid.h with 100% similarity]
helpers/basic_auth/YP/Makefile.am [deleted file]
helpers/basic_auth/mswin_sspi/Makefile.am [deleted file]
helpers/basic_auth/multi-domain-NTLM/Makefile.am [deleted file]
helpers/basic_auth/squid_radius_auth/Makefile.am [deleted file]

index cdde491f5e2a4e0737e132c59ffb79d0c79174fc..303f4586352c333655dd0bc32124cb0a4149c52b 100644 (file)
@@ -4284,19 +4284,19 @@ AC_CONFIG_FILES([\
        doc/manuals/Makefile \
        helpers/Makefile \
        helpers/basic_auth/Makefile \
+       helpers/basic_auth/DB/Makefile \
+       helpers/basic_auth/getpwnam/Makefile \
        helpers/basic_auth/LDAP/Makefile \
        helpers/basic_auth/MSNT/Makefile \
+       helpers/basic_auth/MSNT-multi-domain/Makefile \
        helpers/basic_auth/NCSA/Makefile \
+       helpers/basic_auth/NIS/Makefile \
        helpers/basic_auth/PAM/Makefile \
-       helpers/basic_auth/SMB/Makefile \
-       helpers/basic_auth/mswin_sspi/Makefile \
-       helpers/basic_auth/YP/Makefile \
-       helpers/basic_auth/getpwnam/Makefile \
-       helpers/basic_auth/multi-domain-NTLM/Makefile \
-       helpers/basic_auth/SASL/Makefile \
        helpers/basic_auth/POP3/Makefile \
-       helpers/basic_auth/DB/Makefile \
-       helpers/basic_auth/squid_radius_auth/Makefile \
+       helpers/basic_auth/RADIUS/Makefile \
+       helpers/basic_auth/SASL/Makefile \
+       helpers/basic_auth/SMB/Makefile \
+       helpers/basic_auth/SSPI/Makefile \
        helpers/digest_auth/Makefile \
        helpers/digest_auth/password/Makefile \
        helpers/digest_auth/ldap/Makefile \
index f6cc73d6f8e16bd5a01c94f1f29b88e0dd31e79f..f1c7e741bc5964a021b1316d368e50cdde153d30 100644 (file)
@@ -151,7 +151,8 @@ the reduction in direct helper spawned by Squid can result in a great reduction
 <P>To improve the understanding of what each helper does and where it should be used the helper binaries
 which are bundled with Squid have undergone a naming change in this release.</P>
 
-<P>Below is a list of the old helper names and what their names have changed to.</P>
+<P>Below is a list of the old helper names and what their names have changed to.
+For several helpers the directory name used in --enable-X-helpers configure option has also changed.</P>
 
 <H3>Basic Authentication protocol helpers</H3>
 
@@ -161,6 +162,14 @@ which are bundled with Squid have undergone a naming change in this release.</P>
 <LI>getpwnam_auth - basic_getpwname_auth - Authenticate with local system user accounts.</LI>
 <LI>squid_ldap_auth - basic_ldap_auth - Authenticate with LDAP user accounts.</LI>
 <LI>ncsa_auth - basic_ncsa_auth - Authenticate with NCSA httpd-style password file.</LI>
+<LI>pam_auth - basic_pam_auth - Authenticate with the system PAM infrastructure.</LI>
+<LI>pop3.pl - basic_pop3_auth.pl - Authenticate with a mail server POP3/SMTP credentials</LI>
+<LI>squid_sasl_auth - basic_sasl_auth - Authenticate with SASL ???</LI>
+<LI>smb_auth - basic_smb_auth - Authenticate with Samba SMB ???</LI>
+<LI>yp_auth - basic_nis_auth - Authenticate with NIS security system.</LI>
+<LI>mswin_sspi - basic_sspi_auth - Authenticate with a Windows Domain Controller using SSPI.</LI>
+<LI>MSNT-muti-domain - basic_msnt_multi_domain_auth.pl - Authenticate with any one of multiple Windows Domain Controllers.</LI>
+<LI>squid_radius_auth - basic_radius_auth - Authenticate with RADIUS.</LI>
 </UL>
 </P>
 
@@ -238,7 +247,6 @@ This move begins the Localization of the internal administrator facing manuals.<
 </P>
 
 
-
 <H2><A NAME="newtags"></A> <A NAME="ss3.1">3.1</A> <A HREF="#toc3.1">New tags</A>
 </H2>
 
index c136476dfaf98dc061aa358a6b01393fd543cdde..443c20334205f135a5a44c2b33096b3d7ae708f2 100644 (file)
@@ -88,6 +88,7 @@ Most user-facing changes are reflected in squid.conf (see below).
    which are bundled with Squid have undergone a naming change in this release.
 
 <p>Below is a list of the old helper names and what their names have changed to.
+   For several helpers the directory name used in --enable-X-helpers configure option has also changed.
 
 <sect2>Basic Authentication protocol helpers
 <p><itemize>
@@ -95,6 +96,14 @@ Most user-facing changes are reflected in squid.conf (see below).
        <item>getpwnam_auth - basic_getpwname_auth - Authenticate with local system user accounts.
        <item>squid_ldap_auth - basic_ldap_auth - Authenticate with LDAP user accounts.
        <item>ncsa_auth - basic_ncsa_auth - Authenticate with NCSA httpd-style password file.
+       <item>pam_auth - basic_pam_auth - Authenticate with the system PAM infrastructure.
+       <item>pop3.pl - basic_pop3_auth.pl - Authenticate with a mail server POP3/SMTP credentials
+       <item>squid_sasl_auth - basic_sasl_auth - Authenticate with SASL.
+       <item>smb_auth - basic_smb_auth - Authenticate with Samba SMB.
+       <item>yp_auth - basic_nis_auth - Authenticate with NIS security system.
+       <item>mswin_sspi - basic_sspi_auth - Authenticate with a Windows Domain Controller using SSPI.
+       <item>MSNT-multi-domain - basic_msnt_multi_domain_auth.pl - Authenticate with any one of multiple Windows Domain Controllers.
+       <item>squid_radius_auth - basic_radius_auth - Authenticate with RADIUS.
 </itemize>
 
 <sect2>Digest Authentication protocol helpers
@@ -151,7 +160,6 @@ This section gives a thorough account of those changes in three categories:
 </itemize>
 <p>
 
-
 <sect1>New tags<label id="newtags">
 <p>
 <descrip>
diff --git a/helpers/basic_auth/MSNT-multi-domain/Makefile.am b/helpers/basic_auth/MSNT-multi-domain/Makefile.am
new file mode 100644 (file)
index 0000000..2d5aa7d
--- /dev/null
@@ -0,0 +1,3 @@
+
+libexec_SCRIPTS        = basic_msnt_multi_domain_auth.pl
+EXTRA_DIST = basic_msnt_multi_domain_auth.pl README.txt
similarity index 98%
rename from helpers/basic_auth/multi-domain-NTLM/smb_auth.pl
rename to helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl
index bc5790593c02a6cd2c256a07055c4a0060549346..911d34315fa4a4945ea83fcdf8d758ea0a44700e 100755 (executable)
@@ -24,7 +24,7 @@
 #  fall back to the %controllers hack.
 $try_reverse_dns=1;
 
-# Soem servers (at least mine) don't like to be called by their fully
+# Some servers (at least mine) don't like to be called by their fully
 #  qualified name. define this if you wish to call them ONLY by their
 #  hostname.
 $dont_use_fqdn=1;
@@ -134,4 +134,3 @@ sub discover_dc {
   return ($pdc,$bdc) if ($pdc);
   return 0;
 }
-
index 939df4b1fb4130a5c148f193178014f7bfc048ce..a113d8559c57ddd0f952fcc923d2e33ff9ed0b4a 100644 (file)
@@ -4,14 +4,14 @@ DIST_SUBDIRS = \
        getpwnam \
        LDAP \
        MSNT \
-       mswin_sspi \
-       multi-domain-NTLM \
+       MSNT-multi-domain \
        NCSA \
+       NIS \
        PAM \
        POP3 \
-       squid_radius_auth \
+       RADIUS \
        SASL \
        SMB \
-       YP
+       SSPI
 
 SUBDIRS        = $(BASIC_AUTH_HELPERS)
diff --git a/helpers/basic_auth/NIS/Makefile.am b/helpers/basic_auth/NIS/Makefile.am
new file mode 100644 (file)
index 0000000..98fd46c
--- /dev/null
@@ -0,0 +1,16 @@
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+libexec_PROGRAMS = basic_nis_auth
+
+basic_nis_auth_SOURCES = \
+       basic_nis_auth.cc \
+       nis_support.h \
+       nis_support.cc
+
+basic_nis_auth_LDADD = \
+       $(COMPAT_LIB) \
+       $(CRYPTLIB) \
+       $(XTRA_LIBS)
similarity index 91%
rename from helpers/basic_auth/YP/yp_auth.c
rename to helpers/basic_auth/NIS/basic_nis_auth.cc
index 379adabe04129caf7a3800f7b0b4d16c4325f134..75166726c7e34a7e4667369db30c0121dd6122f3 100644 (file)
@@ -4,7 +4,10 @@
  */
 
 #include "config.h"
+#include "hash.h"
+#include "nis_support.h"
 #include "rfc1738.h"
+#include "util.h"
 
 #if HAVE_STDIO_H
 #include <stdio.h>
 #include <crypt.h>
 #endif
 
-#include "util.h"
-#include "hash.h"
-
-#include "nis_support.h"
-
 int
 main(int argc, char **argv)
 {
@@ -45,9 +43,9 @@ main(int argc, char **argv)
     setbuf(stdout, NULL);
 
     if (argc != 3) {
-        fprintf(stderr, "Usage: yp_auth <domainname> <nis map for password>\n");
+        fprintf(stderr, "Usage: basic_yp_auth <domainname> <nis map for password>\n");
         fprintf(stderr, "\n");
-        fprintf(stderr, "Example yp_auth mydomain.com passwd.byname\n");
+        fprintf(stderr, "Example basic_yp_auth mydomain.com passwd.byname\n");
         exit(1);
     }
     nisdomain = argv[1];
index c6a65aec56aa88d25b2eae0a54f8904396375d96..ff3f90fccbbc861a9149270a5fde61c6a85562b6 100644 (file)
@@ -1,22 +1,11 @@
-#
-#  Makefile for the Squid PAM authentication helper
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
 include $(top_srcdir)/src/Common.am
 
-man_MANS               = pam_auth.8
-EXTRA_DIST             = pam_auth.8
-libexec_PROGRAMS       = pam_auth
-
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
+man_MANS               = basic_pam_auth.8
+EXTRA_DIST             = basic_pam_auth.8
+libexec_PROGRAMS       = basic_pam_auth
+basic_pam_auth_SOURCES = basic_pam_auth.cc
 
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
+basic_pam_auth_LDADD = \
+       $(COMPAT_LIB) \
        -lpam \
-       $(XTRA_LIBS)
+       @XTRA_LIBS@
similarity index 89%
rename from helpers/basic_auth/PAM/pam_auth.8
rename to helpers/basic_auth/PAM/basic_pam_auth.8
index 14108900b0a1920b8770658ef518344b47a887a1..42276562782756bac2448932284819226d06412a 100644 (file)
@@ -1,10 +1,10 @@
-.TH pam_auth 8 "5 Sep 2003" "Squid PAM Auth"
+.TH basic_pam_auth 8 "5 Sep 2003" "Squid PAM Basic Auth"
 .
 .SH NAME
-pam_auth - Squid PAM authentication helper
+pam_auth - Squid PAM Basic authentication helper
 .
 .SH SYNOPSIS
-squid_pam_auth [-n "service name"] [-t TTL] [-o] [-1]
+basic_pam_auth [-n "service name"] [-t TTL] [-o] [-1]
 .
 .SH DESCRIPTION
 This helper allows Squid to connect to a mostly any available PAM
@@ -68,11 +68,11 @@ fully audited and the author cannot be held responsible for any security
 issues due to such installations.
 .
 .SH AUTHOR
-Squid pam_auth and this manual is written by
+Squid basic_pam_auth and this manual is written by
 .I Henrik Nordstrom <hno@squid-cache.org>
 .
 .SH COPYRIGHT
-Squid pam_auth and this manual is Copyright 1999,2002,2003
+Squid basic_pam_auth and this manual is Copyright 1999,2002,2003
 Henrik Nordstrom <hno@squid-cache.org>
 .
 .SH QUESTIONS
similarity index 95%
rename from helpers/basic_auth/PAM/pam_auth.c
rename to helpers/basic_auth/PAM/basic_pam_auth.cc
index a80ac1d5138fd4b277a7acd8e1491972a7588685..0802a1fd0279d454fe0970b04945e72d673a0a3f 100644 (file)
@@ -37,6 +37,9 @@
  *
  * Change Log:
  *
+ *   Version 2.3, 2009-11-06
+ *      Converted to C++. Brought into line with Squid-3 code styles.
+ *
  *   Version 2.2, 2003-11-05
  *      One shot mode is now the default mode of operation
  *      with persistent PAM connections enabled by -t option.
  *   Version 1.1, 1999-05-11
  *     Initial version
  *
- * Compile this program with: gcc -o pam_auth pam_auth.c -lpam -ldl
+ * Compile this program with: gcc -o basic_pam_auth basic_pam_auth.cc -lpam -ldl
  */
+#include "config.h"
 
 #include "rfc1738.h"
 #include "util.h"
 
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_ASSERT_H
 #include <assert.h>
+#endif
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STRING_H
 #include <string.h>
+#endif
+#if HAVE_SIGNAL_H
 #include <signal.h>
+#endif
+#if HAVE_TIME_H
 #include <time.h>
+#endif
+#if HAVE_UNISTD_H
 #include <unistd.h>
-
+#endif
+#if HAVE_SECURITY_PAM_APPL_H
 #include <security/pam_appl.h>
+#endif
 
 #define BUFSIZE 8192
 
 #define DEFAULT_SQUID_PAM_TTL 0
 #endif
 
+#if _SQUID_SOLARIS_
 static char *password = NULL;  /* Workaround for Solaris 2.6 brokenness */
+#endif
 
-/*
+/**
  * A simple "conversation" function returning the supplied password.
  * Has a bit to much error control, but this is my first PAM application
  * so I'd rather check everything than make any mistakes. The function
@@ -250,7 +271,7 @@ error:
         }
         /* cleanup */
         retval = PAM_SUCCESS;
-#ifdef PAM_AUTHTOK
+#if defined(PAM_AUTHTOK)
         if (ttl != 0) {
             if (retval == PAM_SUCCESS)
                 retval = pam_set_item(pamh, PAM_AUTHTOK, NULL);
index a41a18128672a492ba7265adcad2232bc68446b2..36ab1df47a52209d2bb3cf183ab2ef0f5dfe79fd 100644 (file)
@@ -1,13 +1,2 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
-libexec_SCRIPTS        = \
-       pop3.pl
-
-EXTRA_DIST = \
-       pop3.pl
+libexec_SCRIPTS        = basic_pop3_auth.pl
+EXTRA_DIST = basic_pop3_auth.pl
diff --git a/helpers/basic_auth/RADIUS/Makefile.am b/helpers/basic_auth/RADIUS/Makefile.am
new file mode 100644 (file)
index 0000000..bfd160f
--- /dev/null
@@ -0,0 +1,18 @@
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+libexec_PROGRAMS       = basic_radius_auth
+man_MANS               = basic_radius_auth.8
+EXTRA_DIST             = basic_radius_auth.8
+basic_radius_auth_SOURCES = \
+                       basic_radius_auth.cc \
+                       radius.h \
+                       radius-util.cc \
+                       radius-util.h
+
+basic_radius_auth_LDADD = \
+       $(COMPAT_LIB) \
+       $(SSLLIB) \
+       $(XTRA_LIBS)
similarity index 85%
rename from helpers/basic_auth/squid_radius_auth/README
rename to helpers/basic_auth/RADIUS/README
index 2c625423682971f1707eab8b682980c8eaddae56..6ed4fef04f227bd8c4a8454f7b2e5d6d0358c8fb 100644 (file)
@@ -1,4 +1,4 @@
-Squid_radius_auth V1.09
+basic_radius_auth V1.09
 
 This kit is loosely based on radtest from the Cistron-radiusd which
 again is based on Livingston sources. See COPYRIGHT for details.
@@ -16,7 +16,7 @@ make clean
 make install
 
 or if you want the helper installed elsewhere than /usr/local/squid
-(the default installation path of Squid-2.5) use something like:
+(the default installation path of Squid) use something like:
 
 make CONFDIR=/etc PREFIX=/usr BINDIR='${PREFIX}/libexec/squid' install
 
@@ -35,12 +35,12 @@ Configuration:
 The RADIUS authenticator is configured using a small configuration file.
 
 The configuration file should look like this:
-# squid_rad_auth configuration file
+# basic_radius_auth configuration file
 # MvS: 28-10-1998
 server suncone.cistron.nl
 secret testje
 
-An example can be found in etc/squid_rad_auth.conf 
+An example can be found in etc/basic_radius_auth.conf 
 
 
 /etc/services:
@@ -53,12 +53,12 @@ Adding this is not mandatory because it used the default port 1812 anyway.
 Note: Some old RADIUS servers uses the unofficial port 1645, and you may
 need to override the service port used either by editing /etc/services
 or by specifying the port using the -p command line option or the port
-tag in squid_rad_auth.conf
+tag in basic_radius_auth.conf
 
 
 Test it:
 
-Start squid_rad_auth and type a username and a username. The authenticator
+Start basic_radius_auth and type a username and a username. The authenticator
 returns OK if the radiusd accepted your password. In any other case you'll
 get ERR.
 
similarity index 89%
rename from helpers/basic_auth/squid_radius_auth/squid_radius_auth.8
rename to helpers/basic_auth/RADIUS/basic_radius_auth.8
index c381873ae73f5ec6025320572b0e8cda68f39821..454616d713fbf68a541699aae72edae607785c80 100644 (file)
@@ -1,13 +1,13 @@
-.TH squid_radius_auth 8 "7 August 2004" "Squid RADIUS Auth"
+.TH basic_radius_auth 8 "7 August 2004" "Squid RADIUS Auth"
 .
 .SH NAME
-squid_radius_auth - Squid RADIUS authentication helper
+basic_radius_auth - Squid RADIUS authentication helper
 .
 .SH SYNOPSIS
-.B squid_radius_auth
+.B basic_radius_auth
 -f configfile
 .br
-.B squid_radius_auth
+.B basic_radius_auth
 -h "server" [-p port] [-i identifier] -w secret
 .
 .SH DESCRIPTION
@@ -56,7 +56,7 @@ specifies the shared RADIUS secret.
 .
 .TP
 .BI "identifier " nameofserver
-specifies what the proxy should identify itsels as to the RADIUS server.
+specifies what the proxy should identify itself as to the RADIUS server.
 This directive is optional.
 .
 .TP
@@ -66,7 +66,7 @@ Specifies the port number or service name where the helper should connect.
 This manual page was written by 
 .I Henrik Nordstrom <hno@squid-cache.org>
 .P
-squid_radius_auth is written by 
+basic_radius_auth is written by 
 .I Marc van Selm <selm@cistron.nl>
 with contributions from
 .I Henrik Nordstrom <hno@squid-cache.org>
similarity index 95%
rename from helpers/basic_auth/squid_radius_auth/squid_rad_auth.c
rename to helpers/basic_auth/RADIUS/basic_radius_auth.cc
index 8e59ba464d7995fb7c0964631fc09fde31f23581..0320c9321db2c8318bf752f407cada2cea2e6fd7 100644 (file)
  *      Copyright (C) 2006 Henrik Nordstrom <hno@squid-cache.org>
  */
 
-/* Squid_rad_auth is a RADIUS authenticator for Squid-2.5 and later.
+/* basic_radius_auth is a RADIUS authenticator for Squid-2.5 and later.
  * The authenticator reads a line with a user and password combination.
  * If access is granted OK is returned. Else ERR.
  *
- * Squid_rad_auth-1.0 is based on modules from the Cistron-radiusd-1.5.4.
+ * basic_radius_auth-1.0 is based on modules from the Cistron-radiusd-1.5.4.
  *
  * Currently you should only start 1 authentificator at a time because the
  * the ID's of the different programs can start to conflict. I'm not sure it
  */
 
 #include       "config.h"
+#include       "md5.h"
+#include       "radius.h"
+#include       "radius-util.h"
 
 #if HAVE_SYS_TYPES_H
-#include       <sys/types.h>
+#include <sys/types.h>
 #endif
 #if HAVE_SYS_SOCKET_H
-#include       <sys/socket.h>
+#include <sys/socket.h>
 #endif
 #if HAVE_NETINET_IN_H
-#include       <netinet/in.h>
+#include <netinet/in.h>
 #endif
 #if HAVE_SYS_TIME_H
-#include       <sys/time.h>
+#include <sys/time.h>
 #endif
 #if HAVE_UNISTD_H
-#include       <unistd.h>
+#include <unistd.h>
 #endif
 #if HAVE_FCNTL_H
-#include       <fcntl.h>
+#include <fcntl.h>
 #endif
 #ifdef _SQUID_WIN32_
 #include <io.h>
 #endif
-
 #if HAVE_CTYPE_H
-#include       <ctype.h>
+#include <ctype.h>
 #endif
 #if HAVE_STDIO_H
-#include       <stdio.h>
+#include <stdio.h>
 #endif
 #if HAVE_UNISTD_H
-#include       <unistd.h>
+#include <unistd.h>
 #endif
 #if HAVE_NETDB_H
-#include       <netdb.h>
+#include <netdb.h>
 #endif
 #if HAVE_PWD_H
-#include       <pwd.h>
+#include <pwd.h>
 #endif
 #if HAVE_STDLIB_H
-#include       <stdlib.h>
+#include <stdlib.h>
 #endif
 #if HAVE_TIME_H
-#include       <time.h>
+#include <time.h>
 #endif
 #if HAVE_STRING_H
-#include       <string.h>
+#include <string.h>
 #endif
 #if HAVE_GETOPT_H
 #include <getopt.h>
 #include <errno.h>
 #endif
 
-#include       "md5.h"
-#include       "radius.h"
-#include       "radius-util.h"
-
 #define MAXPWNAM       254
 #define MAXPASS                254
 #define MAXLINE         254
@@ -127,7 +125,7 @@ static u_int32_t nas_ipaddr;
 static u_int32_t auth_ipaddr;
 static int retries = 30;
 
-char progname[] = "squid_rad_auth";
+char progname[] = "basic_radius_auth";
 int debug_flag = 0;
 
 #ifdef _SQUID_MSWIN_
@@ -189,7 +187,7 @@ result_recv(u_int32_t host, u_short udp_port, char *buffer, int length)
 
     if (totallen != length) {
         fprintf(stderr,
-                "Squid_rad_auth: Received invalid reply length from server (want %d/ got %d)\n",
+                "basic_radius_auth: Received invalid reply length from server (want %d/ got %d)\n",
                 totallen, length);
         return -1;
     }
@@ -235,7 +233,7 @@ random_vector(char *aVector)
 
 /* read the config file
  * The format should be something like:
- * # squid_rad_auth configuration file
+ * # basic_radius_auth configuration file
  * # MvS: 28-10-1998
  * server suncone.cistron.nl
  * secret testje
index d30bf67182eca81aa61291f75fb691922866a44a..1fca0b49cc4819c27deccb83e19b08e1fce5c849 100644 (file)
@@ -1,22 +1,10 @@
-#
-#  Makefile for the Squid SASL authentication helper
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
 include $(top_srcdir)/src/Common.am
 
-libexec_PROGRAMS       = sasl_auth
-
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
-
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
+libexec_PROGRAMS = basic_sasl_auth
+basic_sasl_auth_SOURCES = basic_sasl_auth.cc
+basic_sasl_auth_LDADD = \
+       $(COMPAT_LIB) \
        $(LIBSASL) \
        $(XTRA_LIBS)
 
-EXTRA_DIST             = squid_sasl_auth squid_sasl_auth.conf
+EXTRA_DIST = basic_sasl_auth.pam basic_sasl_auth.conf
index 286bda4776408aa213a418ffdca2d01992e56803..33a36e40d25e2e1207a45da005f217eba1d62faf 100644 (file)
@@ -7,9 +7,9 @@ against SASL identifies itself with an application name. Each
 
 For this authenticator, the SASL application name is, by default,
 
-       squid_sasl_auth
+       basic_sasl_auth
 
-To configure the authentication method used the file "squid_sasl_auth.conf" 
+To configure the authentication method used the file "basic_sasl_auth.conf" 
 can be placed in the appropriate location, usually "/usr/lib/sasl".
 
 The authentication database is defined by the "pwcheck_method" parameter.
@@ -39,9 +39,9 @@ will typically fail with "-1, generic error".
        chown root.mail sasl_auth
        chmod ug+s sasl_auth
 
-If the application name ("squid_sasl_auth") will also be used for the
+If the application name ("basic_sasl_auth") will also be used for the
 pam service name if pwcheck_method:pam is chosen. And example pam
-configuration file  "squid_sasl_auth" is also included.
+configuration file  "basic_sasl_auth.pam" is also included.
 
 
 Ian Castle
similarity index 95%
rename from helpers/basic_auth/SASL/sasl_auth.c
rename to helpers/basic_auth/SASL/basic_sasl_auth.cc
index 6efa30dfeaf0bd6522099f69fe43f6855247cbcd..620a1554a2575682e05ca6f6ee42bfcbda902422 100644 (file)
  *             or with SASL2: gcc -Wall -o sasl_auth sasl_auth.c -lsasl2
  *
  */
+#include "config.h"
+#include "rfc1738.h"
+#include "util.h"
+
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_ERRNO_H
 #include <errno.h>
+#endif
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STRING_H
 #include <string.h>
-
-#include "rfc1738.h"
-#include "util.h"
-
+#endif
 #ifdef HAVE_SASL_SASL_H
 #include <sasl/sasl.h>
 #else
 #include <sasl.h>
 #endif
 
-#define APP_NAME_SASL  "squid_sasl_auth"
+#define APP_NAME_SASL  "basic_sasl_auth"
 
 int
 main(int argc, char *argv[])
index 21d35355c93b17b7c9edaab4cc70c1f57c9c5bbe..6c136ca52318a2da88d4ab67123f3ba6d67fe007 100644 (file)
@@ -1,3 +1,7 @@
+7 November 2009, version 0.05
+
+- Naming change for helpers in Squid-3.
+
 28 September 1999, version 0.05
 
 - Easier debugging: added the -d option to smb_auth.
index 82aa4b42ea23ddfc8a3bb3995933ab9c2955cde2..e8f868564963ef4ebc5636a1ac6d020bde62c5b3 100644 (file)
@@ -1,11 +1,3 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
 include $(top_srcdir)/src/Common.am
 
 # SAMBAPREFIX must point to the directory where Samba has been installed.
@@ -15,19 +7,15 @@ include $(top_srcdir)/src/Common.am
 
 ## FIXME: autoconf should test for the samba path.
 
-SMB_AUTH_HELPER        = smb_auth.sh
+SMB_AUTH_HELPER        = basic_smb_auth.sh
 SAMBAPREFIX=/usr/local/samba
 SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER)
 
 libexec_SCRIPTS        = $(SMB_AUTH_HELPER)
-libexec_PROGRAMS = smb_auth
-smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
-EXTRA_DIST = smb_auth.sh COPYING-2.0
 
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
+libexec_PROGRAMS = basic_smb_auth
+basic_smb_auth_SOURCES= basic_smb_auth.cc
+basic_smb_auth_CFLAGS = -DSAMBAPREFIX=\"$(SAMBAPREFIX)\" -DHELPERSCRIPT=\"$(SMB_AUTH_HELPER_PATH)\"
+basic_smb_auth_LDADD = $(COMPAT_LIB) $(XTRA_LIBS)
 
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
-       $(XTRA_LIBS)
+EXTRA_DIST = basic_smb_auth.sh COPYING-2.0
diff --git a/helpers/basic_auth/SMB/README b/helpers/basic_auth/SMB/README
deleted file mode 100644 (file)
index f550dc3..0000000
+++ /dev/null
@@ -1,3 +0,0 @@
-For documentation, please refer to
-
-       http://www.hacom.nl/~richard/software/smb_auth.html
similarity index 98%
rename from helpers/basic_auth/SMB/smb_auth.c
rename to helpers/basic_auth/SMB/basic_smb_auth.cc
index e81eb2f1205ca33372176cdf658e45be13ecbbc3..4ea3a3daebcc2e4415c816e1e9986d91c5918e40 100644 (file)
@@ -1,5 +1,5 @@
 /*
- *  smb_auth - SMB proxy authentication module
+ *  basic_smb_auth - SMB proxy authentication module
  *  Copyright (C) 1998  Richard Huveneers <richard@hekkihek.hacom.nl>
  *
  *  This program is free software; you can redistribute it and/or modify
  *  along with this program; if not, write to the Free Software
  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
  */
+#include "config.h"
+#include "rfc1738.h"
+#include "util.h"
 
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if HAVE_STDLIB_H
 #include <stdlib.h>
+#endif
+#if HAVE_STRING_H
 #include <string.h>
+#endif
 
-#include "util.h"
-#include "rfc1738.h"
 
 #define BUFSIZE                        256
 #define NMB_UNICAST            1
diff --git a/helpers/basic_auth/SSPI/Makefile.am b/helpers/basic_auth/SSPI/Makefile.am
new file mode 100644 (file)
index 0000000..f7cec10
--- /dev/null
@@ -0,0 +1,14 @@
+include $(top_srcdir)/src/Common.am
+
+## we need our local files too (but avoid -I. at all costs)
+INCLUDES += -I$(srcdir)
+
+libexec_PROGRAMS = basic_sspi_auth
+
+basic_sspi_auth_SOURCES = basic_sspi_auth.cc valid.cc valid.h
+basic_sspi_auth_LDADD = \
+       $(COMPAT_LIB) \
+       -lnetapi32 -ladvapi32 -lsspwin32 \
+       $(XTRA_LIBS)
+
+EXTRA_DIST = readme.txt
similarity index 99%
rename from helpers/basic_auth/mswin_sspi/mswin_auth.c
rename to helpers/basic_auth/SSPI/basic_sspi_auth.cc
index 08a45abd4a863e674032c7094c2a2a6b27a43a9b..adcefe9b3ab1cec5dc01d81e27feefa12d15a3b0 100644 (file)
 */
 
 #include "config.h"
+#include "util.h"
+
+#if HAVE_STDIO_H
 #include <stdio.h>
+#endif
+#if GETOPT_H
 #include <getopt.h>
-#include "util.h"
+#endif
 
 /* Check if we try to compile on a Windows Platform */
 #if defined(_SQUID_CYGWIN_) || defined(_SQUID_MSWIN_)
similarity index 99%
rename from helpers/basic_auth/mswin_sspi/valid.c
rename to helpers/basic_auth/SSPI/valid.cc
index 42c1747f8540fa21d14af4c09f81f38049d48d15..9e7d901c07254c7cd958bfa8acd7c2d4bd7c50f3 100644 (file)
@@ -26,6 +26,7 @@
  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
 */
 
+#include "config.h"
 #include "util.h"
 
 /* Check if we try to compile on a Windows Platform */
diff --git a/helpers/basic_auth/YP/Makefile.am b/helpers/basic_auth/YP/Makefile.am
deleted file mode 100644 (file)
index 79f5561..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#
-
-include $(top_srcdir)/src/Common.am
-
-libexec_PROGRAMS = yp_auth
-yp_auth_SOURCES        = yp_auth.c nis_support.h nis_support.c
-
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
-
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
-       $(CRYPTLIB) \
-       $(XTRA_LIBS)
diff --git a/helpers/basic_auth/mswin_sspi/Makefile.am b/helpers/basic_auth/mswin_sspi/Makefile.am
deleted file mode 100644 (file)
index 4d915d5..0000000
+++ /dev/null
@@ -1,24 +0,0 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
-include $(top_srcdir)/src/Common.am
-
-libexec_PROGRAMS = mswin_auth
-
-mswin_auth_SOURCES = mswin_auth.c valid.c valid.h
-
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
-       -lnetapi32 -ladvapi32 -lsspwin32 \
-       $(XTRA_LIBS)
-
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
-
-EXTRA_DIST = readme.txt
diff --git a/helpers/basic_auth/multi-domain-NTLM/Makefile.am b/helpers/basic_auth/multi-domain-NTLM/Makefile.am
deleted file mode 100644 (file)
index 364248f..0000000
+++ /dev/null
@@ -1,14 +0,0 @@
-#
-#  Makefile for the Squid Object Cache server
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
-libexec_SCRIPTS        = \
-       smb_auth.pl
-
-EXTRA_DIST = \
-       smb_auth.pl \
-       README.txt
diff --git a/helpers/basic_auth/squid_radius_auth/Makefile.am b/helpers/basic_auth/squid_radius_auth/Makefile.am
deleted file mode 100644 (file)
index 34be307..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-#
-#  Makefile for the Squid LDAP authentication helper
-#
-#  $Id$
-#
-#  Uncomment and customize the following to suit your needs:
-#
-
-include $(top_srcdir)/src/Common.am
-
-libexec_PROGRAMS       = squid_radius_auth
-man_MANS               = squid_radius_auth.8
-EXTRA_DIST             = squid_radius_auth.8
-squid_radius_auth_SOURCES = \
-                       squid_rad_auth.c \
-                       radius.h \
-                       radius-util.c \
-                       radius-util.h
-
-## we need our local files too (but avoid -I. at all costs)
-INCLUDES += -I$(srcdir)
-
-LDADD = \
-       $(top_builddir)/compat/libcompat.la \
-       -L$(top_builddir)/lib -lmiscutil \
-       $(SSLLIB) \
-       $(XTRA_LIBS)