mirror of
https://github.com/webmin/webmin.git
synced 2026-03-23 09:50:26 +00:00
Use default LDAP protocols, as seem on RHEL 6
https://sourceforge.net/tracker/?func=detail&atid=117457&aid=3171578&group_id=17457
This commit is contained in:
@@ -758,6 +758,11 @@ if ($gconfig{'os_type'} eq 'redhat-linux') {
|
||||
local %ldap;
|
||||
&read_env_file("/etc/init.d/ldap", \%ldap);
|
||||
&read_env_file("/etc/sysconfig/ldap", \%ldap);
|
||||
if (!$ldap{'SLAPD_LDAP'} &&
|
||||
!$ldap{'SLAPD_LDAPI'} &&
|
||||
!$ldap{'SLAPD
|
||||
&read_env_file("/etc/sysconfig/ldap", \%ldap, 1);
|
||||
}
|
||||
return { 'ldap' => $ldap{'SLAPD_LDAP'} eq 'yes' ? 1 : 0,
|
||||
'ldapi' => $ldap{'SLAPD_LDAPI'} eq 'yes' ? 1 : 0,
|
||||
'ldaps' => $ldap{'SLAPD_LDAPS'} eq 'yes' ? 1 : 0,
|
||||
|
||||
@@ -4798,7 +4798,7 @@ if (!@main::list_languages_cache) {
|
||||
return @main::list_languages_cache;
|
||||
}
|
||||
|
||||
=head2 read_env_file(file, &hash)
|
||||
=head2 read_env_file(file, &hash, [include-commented])
|
||||
|
||||
Similar to Webmin's read_file function, but handles files containing shell
|
||||
environment variables formatted like :
|
||||
@@ -4815,6 +4815,10 @@ sub read_env_file
|
||||
local $_;
|
||||
&open_readfile(FILE, $_[0]) || return 0;
|
||||
while(<FILE>) {
|
||||
if ($_[2]) {
|
||||
# Remove start of line comments
|
||||
s/^\s*#+\s*//;
|
||||
}
|
||||
s/#.*$//g;
|
||||
if (/^\s*(export\s*)?([A-Za-z0-9_\.]+)\s*=\s*"(.*)"/i ||
|
||||
/^\s*(export\s*)?([A-Za-z0-9_\.]+)\s*=\s*'(.*)'/i ||
|
||||
|
||||
Reference in New Issue
Block a user