]> git.ipfire.org Git - thirdparty/squid.git/commitdiff
Substitute Perl shell path into Basic auth helper scripts
authorAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 May 2010 09:32:19 +0000 (21:32 +1200)
committerAmos Jeffries <squid3@treenet.co.nz>
Mon, 31 May 2010 09:32:19 +0000 (21:32 +1200)
This fixes these helpers by default on OS where the perl shell is not at
/usr/bin/perl. The problem of cross-compiling shell variation remains as
it was before.

TODO: roll out to other installed scripts

doc/release-notes/release-3.2.sgml
helpers/basic_auth/DB/Makefile.am
helpers/basic_auth/DB/basic_db_auth.pl.in [moved from helpers/basic_auth/DB/basic_db_auth.in with 100% similarity]
helpers/basic_auth/MSNT-multi-domain/Makefile.am
helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl.in [moved from helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl with 99% similarity]
helpers/basic_auth/POP3/Makefile.am
helpers/basic_auth/POP3/basic_pop3_auth.pl.in [moved from helpers/basic_auth/POP3/basic_pop3_auth.pl with 98% similarity]
src/Common.am

index 78b571c71ae0013beb95f564dd3a054354a96ba0..971fb5c02b1ad183279303eb3b7d964e0a404078 100644 (file)
@@ -97,12 +97,12 @@ Most user-facing changes are reflected in squid.conf (see below).
        <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>pop3.pl - basic_pop3_auth - 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>MSNT-multi-domain - basic_msnt_multi_domain_auth - Authenticate with any one of multiple Windows Domain Controllers.
        <item>squid_radius_auth - basic_radius_auth - Authenticate with RADIUS.
 </itemize>
 
index f075661426b9bcfdd815680af5d126d85dbae00d..4d4b71b5930ba89fcdf0d5758302072af760b58f 100644 (file)
@@ -2,16 +2,15 @@ include $(top_srcdir)/src/Common.am
 
 libexec_SCRIPTS        = basic_db_auth
 CLEANFILES += basic_db_auth basic_db_auth.8
-do_subst = sed -e 's,[@]PERL[@],$(PERL),g'
 man_MANS = basic_db_auth.8
 EXTRA_DIST= \
        basic_db_auth.8 \
        passwd.sql \
-       basic_db_auth.in \
+       basic_db_auth.pl.in \
        config.test
 
 basic_db_auth.8: basic_db_auth
        pod2man basic_db_auth basic_db_auth.8
 
-basic_db_auth: basic_db_auth.in
-       $(do_subst) < $(srcdir)/basic_db_auth.in  >basic_db_auth
+basic_db_auth: basic_db_auth.pl.in
+       $(subst_perlshell)
index 568bc7c899d9419865dac3e6e04cb23d152a6c41..26e23667921298c156ffb40746f692a2e95dee6c 100644 (file)
@@ -1,3 +1,7 @@
+include $(top_srcdir)/src/Common.am
 
-libexec_SCRIPTS        = basic_msnt_multi_domain_auth.pl
-EXTRA_DIST = basic_msnt_multi_domain_auth.pl README.txt config.test
+libexec_SCRIPTS        = basic_msnt_multi_domain_auth
+EXTRA_DIST = basic_msnt_multi_domain_auth.pl.in README.txt config.test
+
+basic_msnt_multi_domain_auth: basic_msnt_multi_domain_auth.pl.in
+       $(subst_perlshell)
similarity index 99%
rename from helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl
rename to helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl.in
index 911d34315fa4a4945ea83fcdf8d758ea0a44700e..76278fd3a3e517af291fda350b25f63594c1f099 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@PERL@
 # $Id$
 
 #if you define this, debugging output will be printed to STDERR.
index 2f3ac28a75a5c385b005b213991f7c02045daeb0..02f190b9ba839e8d7db535944efb9a7391a7639b 100644 (file)
@@ -1,2 +1,7 @@
-libexec_SCRIPTS        = basic_pop3_auth.pl
-EXTRA_DIST = basic_pop3_auth.pl config.test
+include $(top_srcdir)/src/Common.am
+
+libexec_SCRIPTS        = basic_pop3_auth
+EXTRA_DIST = basic_pop3_auth.pl.in config.test
+
+basic_pop3_auth: basic_pop3_auth.pl.in
+       $(subst_perlshell)
similarity index 98%
rename from helpers/basic_auth/POP3/basic_pop3_auth.pl
rename to helpers/basic_auth/POP3/basic_pop3_auth.pl.in
index c88ebfd880e32df431312f850a29248de3063f03..23bf4397544056874ebd7ad75d9024936ba8d5f5 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/perl
+#!@PERL@
 #
 # POP3 authenticator for Squid
 # Copyright (C) 2006 Henrik Nordstrom <henrik@henriknordstrom.net>
index b7d410bb7bd1330fd60e2878e6e215636bdd39b3..00e41356ecb347dda23bb0882c934b6aacd0f099 100644 (file)
@@ -33,3 +33,6 @@ $(OBJS): $(top_srcdir)/include/version.h $(top_builddir)/include/autoconf.h
 COMPAT_LIB = \
        -L$(top_builddir)/lib -lmiscutil \
        $(top_builddir)/compat/libcompat.la
+
+## Some helpers are written in Perl and need the local shell defined properly
+subst_perlshell = sed -e 's,[@]PERL[@],$(PERL),g' <$(srcdir)/$@.pl.in >$@ || ($(RM) -f $@ ; exit 1)