From: Amos Jeffries Date: Mon, 31 May 2010 09:32:19 +0000 (+1200) Subject: Substitute Perl shell path into Basic auth helper scripts X-Git-Tag: SQUID_3_2_0_1~173 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=c2cf387f35af178e5294847f9fae3c226e88a2f7;p=thirdparty%2Fsquid.git Substitute Perl shell path into Basic auth helper scripts 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 --- diff --git a/doc/release-notes/release-3.2.sgml b/doc/release-notes/release-3.2.sgml index 78b571c71a..971fb5c02b 100644 --- a/doc/release-notes/release-3.2.sgml +++ b/doc/release-notes/release-3.2.sgml @@ -97,12 +97,12 @@ Most user-facing changes are reflected in squid.conf (see below). squid_ldap_auth - basic_ldap_auth - Authenticate with LDAP user accounts. ncsa_auth - basic_ncsa_auth - Authenticate with NCSA httpd-style password file. pam_auth - basic_pam_auth - Authenticate with the system PAM infrastructure. - pop3.pl - basic_pop3_auth.pl - Authenticate with a mail server POP3/SMTP credentials + pop3.pl - basic_pop3_auth - Authenticate with a mail server POP3/SMTP credentials squid_sasl_auth - basic_sasl_auth - Authenticate with SASL. smb_auth - basic_smb_auth - Authenticate with Samba SMB. yp_auth - basic_nis_auth - Authenticate with NIS security system. mswin_sspi - basic_sspi_auth - Authenticate with a Windows Domain Controller using SSPI. - MSNT-multi-domain - basic_msnt_multi_domain_auth.pl - Authenticate with any one of multiple Windows Domain Controllers. + MSNT-multi-domain - basic_msnt_multi_domain_auth - Authenticate with any one of multiple Windows Domain Controllers. squid_radius_auth - basic_radius_auth - Authenticate with RADIUS. diff --git a/helpers/basic_auth/DB/Makefile.am b/helpers/basic_auth/DB/Makefile.am index f075661426..4d4b71b593 100644 --- a/helpers/basic_auth/DB/Makefile.am +++ b/helpers/basic_auth/DB/Makefile.am @@ -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) diff --git a/helpers/basic_auth/DB/basic_db_auth.in b/helpers/basic_auth/DB/basic_db_auth.pl.in similarity index 100% rename from helpers/basic_auth/DB/basic_db_auth.in rename to helpers/basic_auth/DB/basic_db_auth.pl.in diff --git a/helpers/basic_auth/MSNT-multi-domain/Makefile.am b/helpers/basic_auth/MSNT-multi-domain/Makefile.am index 568bc7c899..26e2366792 100644 --- a/helpers/basic_auth/MSNT-multi-domain/Makefile.am +++ b/helpers/basic_auth/MSNT-multi-domain/Makefile.am @@ -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) diff --git a/helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl b/helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl.in 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 911d34315f..76278fd3a3 100755 --- a/helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl +++ b/helpers/basic_auth/MSNT-multi-domain/basic_msnt_multi_domain_auth.pl.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ # $Id$ #if you define this, debugging output will be printed to STDERR. diff --git a/helpers/basic_auth/POP3/Makefile.am b/helpers/basic_auth/POP3/Makefile.am index 2f3ac28a75..02f190b9ba 100644 --- a/helpers/basic_auth/POP3/Makefile.am +++ b/helpers/basic_auth/POP3/Makefile.am @@ -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) diff --git a/helpers/basic_auth/POP3/basic_pop3_auth.pl b/helpers/basic_auth/POP3/basic_pop3_auth.pl.in 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 c88ebfd880..23bf439754 100755 --- a/helpers/basic_auth/POP3/basic_pop3_auth.pl +++ b/helpers/basic_auth/POP3/basic_pop3_auth.pl.in @@ -1,4 +1,4 @@ -#!/usr/bin/perl +#!@PERL@ # # POP3 authenticator for Squid # Copyright (C) 2006 Henrik Nordstrom diff --git a/src/Common.am b/src/Common.am index b7d410bb7b..00e41356ec 100644 --- a/src/Common.am +++ b/src/Common.am @@ -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)