Handle hostnames with upper-case letters
[webmin.git] / pam / backup_config.pl
1
2 do 'pam-lib.pl';
3
4 # backup_config_files()
5 # Returns files and directories that can be backed up
6 sub backup_config_files
7 {
8 local @conf = &get_pam_config();
9 local @rv = map { $_->{'file'} } @conf;
10 local $p;
11 foreach $p (@conf) {
12         local $m;
13         foreach $m (@{$p->{'mods'}}) {
14                 if ($m->{'args'} =~ /file=(\/\S+)/ && -r $1 && !-d $1) {
15                         push(@rv, $1);
16                         }
17                 }
18         }
19 return &unique(@rv);
20 }
21
22 # pre_backup(&files)
23 # Called before the files are actually read
24 sub pre_backup
25 {
26 return undef;
27 }
28
29 # post_backup(&files)
30 # Called after the files are actually read
31 sub post_backup
32 {
33 return undef;
34 }
35
36 # pre_restore(&files)
37 # Called before the files are restored from a backup
38 sub pre_restore
39 {
40 return undef;
41 }
42
43 # post_restore(&files)
44 # Called after the files are restored from a backup
45 sub post_restore
46 {
47 return undef;
48 }
49
50 1;
51