From 6a1c1918c88c9c83c4d30d6a9497b2bad8001430 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 5 Mar 2015 11:09:36 +0100 Subject: [PATCH] On SME8, smeserver-doivecot isn't always installed Make sure it is before enabling CAS Auth --- root/etc/e-smith/templates/etc/pam.d/dovecot/05cas | 2 +- root/etc/e-smith/templates/etc/sogo/sogo.conf/55authSource | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/root/etc/e-smith/templates/etc/pam.d/dovecot/05cas b/root/etc/e-smith/templates/etc/pam.d/dovecot/05cas index 50aeac0..7dcfee1 100644 --- a/root/etc/e-smith/templates/etc/pam.d/dovecot/05cas +++ b/root/etc/e-smith/templates/etc/pam.d/dovecot/05cas @@ -1,6 +1,6 @@ { my $auth = $sogod{'Authentication'} || 'cas'; -if (lc $auth eq 'cas'){ +if (lc $auth eq 'cas' && -d '/var/service/dovecot'){ $OUT .=<<"HERE"; auth sufficient pam_cas.so -simap://localhost -f/etc/pam_cas.conf HERE diff --git a/root/etc/e-smith/templates/etc/sogo/sogo.conf/55authSource b/root/etc/e-smith/templates/etc/sogo/sogo.conf/55authSource index 4d1819e..0714283 100644 --- a/root/etc/e-smith/templates/etc/sogo/sogo.conf/55authSource +++ b/root/etc/e-smith/templates/etc/sogo/sogo.conf/55authSource @@ -57,7 +57,7 @@ ); { my $auth = $sogod{'Authentication'} || 'cas'; - if (lc $auth eq 'cas'){ + if (lc $auth eq 'cas' && -d '/var/service/dovecot'){ $OUT .=<<"HERE"; SOGoAuthenticationType = cas; SOGoCASServiceURL = "https://auth.$DomainName/cas/";