projects
/
webmin.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
0e00c4c
)
Cache MD5 mode lookup
author
Jamie Cameron
<jcameron@webmin.com>
Thu, 26 Nov 2009 07:10:24 +0000
(23:10 -0800)
committer
Jamie Cameron
<jcameron@webmin.com>
Thu, 26 Nov 2009 07:10:24 +0000
(23:10 -0800)
useradmin/linux-lib.pl
patch
|
blob
|
history
diff --git
a/useradmin/linux-lib.pl
b/useradmin/linux-lib.pl
index
de90fdf
..
218a3d1
100755
(executable)
--- a/
useradmin/linux-lib.pl
+++ b/
useradmin/linux-lib.pl
@@
-63,6
+63,10
@@
return @rv;
# Returns 1 if pam is set up to use MD5 encryption
sub use_md5
{
+if (defined($use_md5_cache)) {
+ # Don't re-look this up
+ return $use_md5_cache;
+ }
local $md5 = 0;
if (&foreign_check("pam")) {
# Use the PAM module if we can
@@
-114,6
+118,7
@@
if (&open_readfile(DEFS, "/etc/login.defs")) {
}
close(DEFS);
}
+$use_md5_cache = $md5;
return $md5;
}