projects
/
webmin.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
Handle hostnames with upper-case letters
[webmin.git]
/
idmapd
/
idmapd-lib.pl
1
# idmapd-lib.pl
2
# Common functions for the idmapd config
3
4
BEGIN { push(@INC, ".."); };
5
use WebminCore;
6
&init_config();
7
8
# get_config()
9
# Returns the idmapd config
10
sub get_config {
11
local %conf;
12
open(FILE, $config{'idmapd_conf'});
13
while(<FILE>) {
14
chomp;
15
s/#.*//;
16
s/^\s+//;
17
s/\s+$//;
18
s/^\[.*$//;
19
next unless length;
20
my ($var, $value) = split(/\s*=\s*/, $_, 2);
21
$conf{$var} = $value;
22
}
23
close(FILE);
24
return %conf;
25
}
26
27
1;