mirror of
https://github.com/webmin/webmin.git
synced 2026-09-20 12:30:44 +01:00
Fixed PAM MD5 password detection
This commit is contained in:
@@ -35,3 +35,4 @@ Use the nscd -i command to refresh its cache after adding a user or group.
|
||||
In a user batch file, # is only treated as a comment at the start of a line.
|
||||
---- Changes since 1.380 ----
|
||||
The real base directory for homes is now respected when batch creating users.
|
||||
Improved MD5 encryption auto-detection with newer PAM config files.
|
||||
|
||||
@@ -69,7 +69,7 @@ if (&foreign_check("pam")) {
|
||||
&foreign_require("pam", "pam-lib.pl");
|
||||
local @conf = &foreign_call("pam", "get_pam_config");
|
||||
local ($svc) = grep { $_->{'name'} eq 'passwd' } @conf;
|
||||
LOOP: foreach $m (@{$svc->{'mods'}}) {
|
||||
LOOP: foreach my $m (@{$svc->{'mods'}}) {
|
||||
if ($m->{'type'} eq 'password') {
|
||||
if ($m->{'args'} =~ /md5/) { $md5++; }
|
||||
elsif ($m->{'module'} =~ /pam_stack\.so/ &&
|
||||
@@ -79,6 +79,13 @@ if (&foreign_check("pam")) {
|
||||
if ($svc) { goto LOOP }
|
||||
else { last; }
|
||||
}
|
||||
elsif ($m->{'control'} eq 'include') {
|
||||
# Include another section
|
||||
($svc) = grep { $_->{'name'} eq $m->{'module'} }
|
||||
@conf;
|
||||
if ($svc) { goto LOOP }
|
||||
else { last; }
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user