From d09770c8475b3ac165f26bad28c49eb096ba0be1 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Wed, 11 Feb 2015 11:59:36 +0100 Subject: [PATCH] Set exported variables in the global scope only As the module specific ones are not available for HTTP headers --- .../templates/var/lib/lemonldap-ng/conf/lmConf/007default | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default index f69c44c..5ae9c62 100644 --- a/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default +++ b/root/etc/e-smith/templates/var/lib/lemonldap-ng/conf/lmConf/007default @@ -55,14 +55,14 @@ $conf->{'locationRules'}->{"sso-manager.$domain"} = { } unless ($conf->{'locationRules'}->{"sso-manager.$domain"}); # Add default exported var -$conf->{'ldapExportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'ldapExportedVars'}->{'mail'} eq 'mail'); -$conf->{'ldapExportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'ldapExportedVars'}->{'extension'}); -$conf->{'ldapExportedVars'}->{'nom'} = 'sn' unless ($conf->{'ldapExportedVars'}->{'nom'}); -$conf->{'ldapExportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'ldapExportedVars'}->{'prenom'}); +$conf->{'exportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'exportedVars'}->{'mail'} eq 'mail'); +$conf->{'exportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'exportedVars'}->{'extension'}); +$conf->{'exportedVars'}->{'nom'} = 'sn' unless ($conf->{'exportedVars'}->{'nom'}); +$conf->{'exportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'exportedVars'}->{'prenom'}); -# Remove obsolete exportedVars +# Remove ldapExportedVars which conflicts with exportedVars foreach my $var (qw(mail nom prenom extension)){ - delete $conf->{'exportedVars'}->{$var} if $conf->{'exportedVars'}->{$var}; + delete $conf->{'ldapExportedVars'}->{$var} if ($conf->{'ldapExportedVars'}->{$var} && $conf->{'exportedVars'}->{$var}); } # Initialize a random key