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 --- e-smith-samba-1.14.0/root/etc/e-smith/templates/etc/smb.conf/11unixPasswordSync 2006-03-16 02:01:15.000000000 -0500 +++ 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 @@ -11,3 +11,4 @@ passwd program = /usr/bin/passwd %u passwd chat = *New*UNIX*password* %n\n *ReType*new*UNIX*password* %n\n *passwd:*all*authentication*tokens*updated*successfully* +check password script = /sbin/e-smith/samba_check_password 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 --- e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 1969-12-31 19:00:00.000000000 -0500 +++ mezzanine_patched_e-smith-samba-1.14.0/root/sbin/e-smith/samba_check_password 2006-06-07 11:48:11.000000000 -0400 @@ -0,0 +1,23 @@ +#!/usr/bin/perl -T + +use strict; +use warnings; +use esmith::ConfigDB; +use Crypt::Cracklib; +use CGI::FormMagick::Validator::Network; + +our $db = esmith::ConfigDB->open or + die "Couldn't open configuration database (permissions problems?)"; + +my $strength = $db->get_prop('passwordstrength', 'Users'); +my $pass = <>; +chomp $pass; + +exit 0 if ($strength eq "none"); + +my $reason = ($strength eq 'strong') ? + fascist_check($pass, '/usr/lib/cracklib_dict') : + CGI::FormMagick::Validator::password(undef, $pass); + +exit 0 if (ul($reason) eq "ok"); +exit 1;