blob: 022aff0fdef6dd7107c693c67c2769660f34cd19 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
|
#include "cracklib.hpp"
#include <cstdlib>
#include "crack.h"
PasswordCheck checkPassword( const std::string login, const std::string name, const std::string password )
{
PasswordCheck c;
const char *m;
m = FascistCheckUser( password.c_str( ), NULL, login.c_str( ), name.c_str( ) );
if( m == NULL ) {
c.ok = true;
c.msg = "Password ok";
} else {
c.ok = false;
c.msg = std::string( m );
}
return c;
}
|