The www/squid autoconfig program does not test for the actual configuration of the net/samba smbclient program. Instead it hardcodes it to /usr/local/samba, while net/samba installs in /usr/local by default. Since smb_auth can not execute smbclient, it returns a failure every time denying all users access to the cache. Fix: This 'fix' is really a bandaid, but it worked for me :) Replace patch-helpers-basic_auth-SMB-smb_auth.sh with: Add patch-helpers-basic_auth-SMB-Makefile.am: Add patch-helpers-basic_auth-SMB-Makefile.in: How-To-Repeat: Set up proxy auth using smb_auth as instructed in the port documentation.
Dear maintainer, Do you approve this update? http://www.freebsd.org/cgi/query-pr.cgi?pr=86850 Thanks -- Marcus Alves Grando marcus(at)corp.grupos.com.br | Grupos Internet S/A mnag(at)FreeBSD.org | FreeBSD.org
State Changed From-To: open->feedback Ask for maintainer approval.
(Somehow the feedback request mail did not reach me yet; I've noticed the PR while checking portsmon.) Hi, thanks for pointing this out; I do not use smb_auth myself and appreciate your report. However, I prefer the patch below (we do not need to mess around with the .in an .am files when we can fix the script directly). I also removed the hardcoded /usr/local assumption for ${LOCALBASE} while at it. Dean, could you try the patch below and see whether it works for you? If it does, this patch should be committed. Index: files/patch-helpers-basic_auth-SMB-smb_auth.sh =================================================================== --- files/patch-helpers-basic_auth-SMB-smb_auth.sh (revision 587) +++ files/patch-helpers-basic_auth-SMB-smb_auth.sh (revision 588) @@ -6,7 +6,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ SAMBAPREFIX=${SAMBAPREFIX:-/usr/local/bin} ++ SAMBAPREFIX=${SAMBAPREFIX:-%%LOCALBASE%%} + read DOMAINNAME read PASSTHROUGH Index: Makefile =================================================================== --- Makefile (revision 587) +++ Makefile (revision 588) @@ -70,7 +70,7 @@ PORTNAME= squid PORTVERSION= 2.5.11 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= \ ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ @@ -348,6 +348,8 @@ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|%%SQUID_UID%%|${SQUID_UID}|g' \ -e 's|%%SQUID_GID%%|${SQUID_GID}|g' ${WRKSRC}/src/cf.data.pre + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/helpers/basic_auth/SMB/smb_auth.sh pre-install: # Prevent installation of .orig files by deleting them.
Responsible Changed From-To: freebsd-ports-bugs->mnag I'll take it.
State Changed From-To: feedback->open Feedback received.
As Glen pointed out to me offline, the previous patch is not enough because SAMBAPREFIX is hardcoded at compile time into ${PREFIX}/libexec/ smb_auth which calls smb_auth.sh with SAMBAPREFIX defined. Setting a sane default for SAMBAPREFIX is in my opinion a good thing nonetheless so I decided to keep files/patch-helpers-basic_auth-SMB-smb_auth.sh and correct an obvious bug no one seems to have noticed :) Added file: files/patch-helpers-basic_auth-SMB-Makefile.in This patchset was tested by Glen and confirmed to work ok: Index: files/patch-helpers-basic_auth-SMB-smb_auth.sh =================================================================== --- files/patch-helpers-basic_auth-SMB-smb_auth.sh (.../www/squid) (revision 589) +++ files/patch-helpers-basic_auth-SMB-smb_auth.sh (.../local/squid) (revision 589) @@ -6,7 +6,7 @@ # along with this program; if not, write to the Free Software # Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. -+ SAMBAPREFIX=${SAMBAPREFIX:-/usr/local/bin} ++ SAMBAPREFIX=${SAMBAPREFIX:-%%LOCALBASE%%} + read DOMAINNAME read PASSTHROUGH Index: files/patch-helpers-basic_auth-SMB-Makefile.in =================================================================== --- files/patch-helpers-basic_auth-SMB-Makefile.in (.../www/squid) (revision 0) +++ files/patch-helpers-basic_auth-SMB-Makefile.in (.../local/squid) (revision 589) @@ -0,0 +1,11 @@ +--- helpers/basic_auth/SMB/Makefile.in.orig Tue Oct 4 07:29:26 2005 ++++ helpers/basic_auth/SMB/Makefile.in Tue Oct 4 07:29:49 2005 +@@ -129,7 +129,7 @@ + makesnmplib = @makesnmplib@ + + SMB_AUTH_HELPER = smb_auth.sh +-SAMBAPREFIX = /usr/local/samba ++SAMBAPREFIX = %%LOCALBASE%% + SMB_AUTH_HELPER_PATH = $(libexecdir)/$(SMB_AUTH_HELPER) + + libexec_SCRIPTS = $(SMB_AUTH_HELPER) Index: Makefile =================================================================== --- Makefile (.../www/squid) (revision 589) +++ Makefile (.../local/squid) (revision 589) @@ -70,7 +70,7 @@ PORTNAME= squid PORTVERSION= 2.5.11 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= www MASTER_SITES= \ ftp://ftp.squid-cache.org/pub/%SUBDIR%/ \ @@ -348,6 +348,9 @@ @${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/configure @${REINPLACE_CMD} -e 's|%%SQUID_UID%%|${SQUID_UID}|g' \ -e 's|%%SQUID_GID%%|${SQUID_GID}|g' ${WRKSRC}/src/cf.data.pre + @${REINPLACE_CMD} -e 's|%%LOCALBASE%%|${LOCALBASE}|g' \ + ${WRKSRC}/helpers/basic_auth/SMB/Makefile.in \ + ${WRKSRC}/helpers/basic_auth/SMB/smb_auth.sh pre-install: # Prevent installation of .orig files by deleting them.
> As Glen pointed out to me offline, the previous patch is not enough > because SAMBAPREFIX is hardcoded at compile time into ${PREFIX}/libexec/ > smb_auth which calls smb_auth.sh with SAMBAPREFIX defined. Doh, the submitter's first name is *Dean*. No cookie for me. Sorry Dean and thanks for helping me fixing this!
State Changed From-To: open->closed Fixed. Thanks.