1 |
diff -Nur -x '*.orig' -x '*.rej' e-smith-samba-1.14.0/root/etc/e-smith/templates/etc/smb.conf/11unixPasswordSync mezzanine_patched_e-smith-samba-1.14.0/root/etc/e-smith/templates/etc/smb.conf/11unixPasswordSync |
2 |
--- e-smith-samba-1.14.0/root/etc/e-smith/templates/etc/smb.conf/11unixPasswordSync 2006-03-16 02:01:15.000000000 -0500 |
3 |
+++ mezzanine_patched_e-smith-samba-1.14.0/root/etc/e-smith/templates/etc/smb.conf/11unixPasswordSync 2006-06-09 11:31:44.000000000 -0400 |
4 |
@@ -11,3 +11,4 @@ |
5 |
|
6 |
passwd program = /usr/bin/passwd %u |
7 |
passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* |
8 |
+check password script = /sbin/e-smith/samba_check_password |
9 |
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 |
10 |
--- e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 1969-12-31 19:00:00.000000000 -0500 |
11 |
+++ mezzanine_patched_e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 2006-06-07 11:48:11.000000000 -0400 |
12 |
@@ -0,0 +1,23 @@ |
13 |
+#!/usr/bin/perl -T |
14 |
+ |
15 |
+use strict; |
16 |
+use warnings; |
17 |
+use esmith::ConfigDB; |
18 |
+use Crypt::Cracklib; |
19 |
+use CGI::FormMagick::Validator::Network; |
20 |
+ |
21 |
+our $db = esmith::ConfigDB->open or |
22 |
+ die "Couldn't open configuration database (permissions problems?)"; |
23 |
+ |
24 |
+my $strength = $db->get_prop('passwordstrength', 'Users'); |
25 |
+my $pass = <>; |
26 |
+chomp $pass; |
27 |
+ |
28 |
+exit 0 if ($strength eq "none"); |
29 |
+ |
30 |
+my $reason = ($strength eq 'strong') ? |
31 |
+ fascist_check($pass, '/usr/lib/cracklib_dict') : |
32 |
+ CGI::FormMagick::Validator::password(undef, $pass); |
33 |
+ |
34 |
+exit 0 if (ul($reason) eq "ok"); |
35 |
+exit 1; |