19 lines
		
	
	
		
			401 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
			
		
		
	
	
			19 lines
		
	
	
		
			401 B
		
	
	
	
		
			Perl
		
	
	
	
	
	
#!/usr/bin/perl -T
 | 
						|
 | 
						|
use strict;
 | 
						|
use warnings;
 | 
						|
use esmith::ConfigDB;
 | 
						|
use esmith::util;
 | 
						|
 | 
						|
our $db = esmith::ConfigDB->open or
 | 
						|
    die "Couldn't open configuration database (permissions problems?)";
 | 
						|
 | 
						|
my $strength = $db->get_prop('passwordstrength', 'Users');
 | 
						|
my $password = <>;
 | 
						|
chomp $password;
 | 
						|
 | 
						|
my $reason = esmith::util::validatePassword($password, $strength);
 | 
						|
 | 
						|
exit 0 if (lc($reason) eq "ok");
 | 
						|
exit 1;
 |