mirror of
https://github.com/webmin/webmin.git
synced 2025-07-21 23:40:34 +00:00
28 lines
451 B
Perl
Executable File
28 lines
451 B
Perl
Executable File
# idmapd-lib.pl
|
|
# Common functions for the idmapd config
|
|
|
|
BEGIN { push(@INC, ".."); };
|
|
use WebminCore;
|
|
&init_config();
|
|
|
|
# get_config()
|
|
# Returns the idmapd config
|
|
sub get_config {
|
|
local %conf;
|
|
open(FILE, "<".$config{'idmapd_conf'});
|
|
while(<FILE>) {
|
|
chomp;
|
|
s/#.*//;
|
|
s/^\s+//;
|
|
s/\s+$//;
|
|
s/^\[.*$//;
|
|
next unless length;
|
|
my ($var, $value) = split(/\s*=\s*/, $_, 2);
|
|
$conf{$var} = $value;
|
|
}
|
|
close(FILE);
|
|
return %conf;
|
|
}
|
|
|
|
1;
|