Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 242060 - net-proxy/squid-3.0.9 lacks kerberos use flag
Summary: net-proxy/squid-3.0.9 lacks kerberos use flag
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High enhancement (vote)
Assignee: Gentoo Network Proxy Developers (OBSOLETE)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2008-10-14 14:41 UTC by Klaus Birkelund Jensen
Modified: 2008-11-30 19:22 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Add 'kerberos' use flag for squid. (squid-3.0.9_add_kerberos_useflag.diff,1.29 KB, patch)
2008-10-14 14:44 UTC, Klaus Birkelund Jensen
Details | Diff
Change squid_kerb_auth Makefiles to use heimdal (squid-3.0.9-heimdal.patch,1.57 KB, patch)
2008-10-17 14:12 UTC, Martin von Gagern
Details | Diff
Add 'SQUID_KEYTAB' to /etc/conf.d/squid (squid.confd_add_keytab.patch,402 bytes, patch)
2008-11-04 14:44 UTC, Klaus Birkelund Jensen
Details | Diff
Make the init-script pass KRB5_KTNAME to the squid executable (squid.initd_add_keytab.patch,309 bytes, patch)
2008-11-04 14:47 UTC, Klaus Birkelund Jensen
Details | Diff
Make the init-script pass KRB5_KTNAME to the squid executable (squid.initd-logrotate_add_keytab.patch,329 bytes, patch)
2008-11-04 14:49 UTC, Klaus Birkelund Jensen
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Klaus Birkelund Jensen 2008-10-14 14:41:47 UTC
Squid 3.0.9 includes support for the squid_kerb_auth helper program but is never built.

This patch adds the 'kerberos' use flag to configure squid with --enable-negotiate-auth-helpers="squid_kerb_auth"

Reproducible: Always

Steps to Reproduce:
1. USE="kerberos" emerge -av squid
Actual Results:  
Squid is build without the squid_kerb_auth helper.

Expected Results:  
Squid is build with the squid_kerb_auth helper.
Comment 1 Klaus Birkelund Jensen 2008-10-14 14:44:27 UTC
Created attachment 168428 [details, diff]
Add 'kerberos' use flag for squid.

This patch solves the problem.
Comment 2 Alin Năstac (RETIRED) gentoo-dev 2008-10-16 19:11:13 UTC
Fixed in versions 3.0.9 and 2.7.4-r2. Thanks!

The only thing I changed is the dependency atom. According to the readme file, app-crypt/heimdal can also be used.
Comment 3 Martin von Gagern 2008-10-17 14:12:33 UTC
Created attachment 168790 [details, diff]
Change squid_kerb_auth Makefiles to use heimdal

(In reply to comment #2)
> According to the readme file, app-crypt/heimdal can also be used.

It might, but not out of the box. Looking at section 2 of the file helpers/negotiate_auth/squid_kerb_auth/readme.txt there are some settings different for heimdal than for MIT kerberos. Most importantly the -DHEIMDAL switch needs to be passed to the compiler, but isn't right now, leading to these errors:

squid_kerb_auth.c:59:35: error: gssapi/gssapi_generic.h: No such file or directory
squid_kerb_auth.c: In function ‘main’:
squid_kerb_auth.c:395: error: ‘gss_nt_service_name’ undeclared (first use in this function)
squid_kerb_auth.c:395: error: (Each undeclared identifier is reported only once
squid_kerb_auth.c:395: error: for each function it appears in.)
make[3]: *** [squid_kerb_auth.o] Error 1

It looks like the build system doesn't provide any flags to change the configuration, so one has to in fact patch the Makefiles for this helper.
The attached patch does so. I'd leave the decision whether or not to use it to the ebuild. The following line seems to get the job done.

[[ "$(best_version app-crypt/heimdal)" ]] \
  && epatch "${FILESDIR}"/squid-3.0.9-heimdal.patch

By the way: I'm using the kerberos overlay from bug 185899, so other heimdal setups out there, especially pre-1.x, might work different yet again.
Comment 4 Alin Năstac (RETIRED) gentoo-dev 2008-10-17 20:23:34 UTC
Oops, fixed in versions 3.0.9 and 2.7.4-r2 (no revbumps). Thanks again!

I made 2 changes:
 1) patched only the Makefile.am file (eautoreconf is called after patching)
 2) since mit-krb5 is the preferred alternative, I've used this line to apply the patch:
    has_version app-crypt/mit-krb5 || epatch "${FILESDIR}"/${P}-heimdal.patch
Comment 5 Klaus Birkelund Jensen 2008-11-04 14:44:51 UTC
Created attachment 170713 [details, diff]
Add 'SQUID_KEYTAB' to /etc/conf.d/squid
Comment 6 Klaus Birkelund Jensen 2008-11-04 14:47:58 UTC
Created attachment 170714 [details, diff]
Make the init-script pass KRB5_KTNAME to the squid executable
Comment 7 Klaus Birkelund Jensen 2008-11-04 14:49:25 UTC
Created attachment 170715 [details, diff]
Make the init-script pass KRB5_KTNAME to the squid executable

With kerberos support enabled, I propose that these new patches be applied. I don't know if this is too much, but I think that the init-script should be ready for kerberos support too.
Comment 8 Alin Năstac (RETIRED) gentoo-dev 2008-11-30 19:22:20 UTC
Your patches have been merged in our source tree. Thanks!