From e8d7e4849aa67efe405c9222f657a45c6d64bf7f Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Tue, 17 Sep 2013 10:28:45 +0200 Subject: [PATCH] Small modifications to apache templates to support SOGo CAS auth --- .../conf/httpd.conf/LemonLDAPPortal/80LemonLDAPPortal | 14 ++++++++++++++ .../templates/var/lib/lemonldap-ng/conf/lmConf/000open | 1 + 2 files changed, 15 insertions(+) diff --git a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/LemonLDAPPortal/80LemonLDAPPortal b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/LemonLDAPPortal/80LemonLDAPPortal index 034e4fa..c723095 100644 --- a/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/LemonLDAPPortal/80LemonLDAPPortal +++ b/root/etc/e-smith/templates/etc/httpd/conf/httpd.conf/LemonLDAPPortal/80LemonLDAPPortal @@ -20,6 +20,7 @@ else{ # SSL Authentication my $SSLAuth = $lemonldap{'SSLAuth'} || 'disabled'; my $sslDirectives = ' # SSL Auth is disabled'; + my $sogoWorkArround = ''; if ((-e '/etc/pki/tls/certs/cacert.pem') && ($SSLAuth =~ m/^(require)|(optional)$/)) { $sslDirectives =<<"HERE"; @@ -31,6 +32,18 @@ else{ HERE } + if (-e '/usr/lib/perl5/site_perl/Apache/FilterChangeLength.pm'){ + # Looks like iPasserelle groupware is installed + # SOPE doesn't supports chunked encoding + # the following makes it happy + # see http://sogo.nu/bugs/view.php?id=2408 + $sogoWorkArround =<<"HERE"; + + BrowserMatch "SOPE/" downgrade-1.0 + PerlOutputFilterHandler Apache::FilterChangeLength + +HERE + } $OUT .=<<"EOF"; @@ -59,6 +72,7 @@ HERE Options +ExecCGI +FollowSymlinks $sslDirectives +$sogoWorkArround # Perl script diff --git a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/000open b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/000open index a69f1a3..f595815 100644 --- a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/000open +++ b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/000open @@ -9,6 +9,7 @@ $c = esmith::ConfigDB->open_ro or die "Error opening ConfigDB\n"; $d = esmith::DomainsDB->open_ro or die "Error opening DomainsDB\n"; $n = esmith::NetworksDB->open_ro or die "Error opening NetworksDB\n"; $domain = $c->get('DomainName')->value; +$host = $c->get('SystemName')->value; $base = esmith::util::ldapBase ($domain); $ldap = $c->get('ldap') || die "Error reading ldap service entry\n"; $port = $ldap->prop('TCPPort') || '389';