Set exported variables in the global scope only

As the module specific ones are not available for HTTP headers
tags/0.2.7_el5 0.2.7_el5
Daniel Berteaud 10 years ago
parent 00d6eab43d
commit d09770c847
  1. 12
      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"}); } unless ($conf->{'locationRules'}->{"sso-manager.$domain"});
# Add default exported var # Add default exported var
$conf->{'ldapExportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'ldapExportedVars'}->{'mail'} eq 'mail'); $conf->{'exportedVars'}->{'mail'} = 'preferredMail' if ($conf->{'exportedVars'}->{'mail'} eq 'mail');
$conf->{'ldapExportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'ldapExportedVars'}->{'extension'}); $conf->{'exportedVars'}->{'extension'} = 'extensionNumber' unless ($conf->{'exportedVars'}->{'extension'});
$conf->{'ldapExportedVars'}->{'nom'} = 'sn' unless ($conf->{'ldapExportedVars'}->{'nom'}); $conf->{'exportedVars'}->{'nom'} = 'sn' unless ($conf->{'exportedVars'}->{'nom'});
$conf->{'ldapExportedVars'}->{'prenom'} = 'givenName' unless ($conf->{'ldapExportedVars'}->{'prenom'}); $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)){ 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 # Initialize a random key

Loading…
Cancel
Save