1 |
slords |
1.1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password mezzanine_patched_e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password |
2 |
|
|
--- e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 2006-12-12 08:08:26.000000000 -0700 |
3 |
|
|
+++ mezzanine_patched_e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 2006-12-12 08:07:32.000000000 -0700 |
4 |
|
|
@@ -3,21 +3,16 @@ |
5 |
|
|
use strict; |
6 |
|
|
use warnings; |
7 |
|
|
use esmith::ConfigDB; |
8 |
|
|
-use Crypt::Cracklib; |
9 |
|
|
-use CGI::FormMagick::Validator::Network; |
10 |
|
|
+use esmith::util; |
11 |
|
|
|
12 |
|
|
our $db = esmith::ConfigDB->open or |
13 |
|
|
die "Couldn't open configuration database (permissions problems?)"; |
14 |
|
|
|
15 |
|
|
my $strength = $db->get_prop('passwordstrength', 'Users'); |
16 |
|
|
-my $pass = <>; |
17 |
|
|
-chomp $pass; |
18 |
|
|
+my $password = <>; |
19 |
|
|
+chomp $password; |
20 |
|
|
|
21 |
|
|
-exit 0 if ($strength eq "none"); |
22 |
|
|
- |
23 |
|
|
-my $reason = ($strength eq 'strong') ? |
24 |
|
|
- fascist_check($pass, '/usr/lib/cracklib_dict') : |
25 |
|
|
- CGI::FormMagick::Validator::password(undef, $pass); |
26 |
|
|
+my $reason = esmith::util::validatePassword($password, $strength); |
27 |
|
|
|
28 |
|
|
exit 0 if (lc($reason) eq "ok"); |
29 |
|
|
exit 1; |