Roxen.git / server / modules / security / userdb_sql.pike

version» Context lines:

Roxen.git/server/modules/security/userdb_sql.pike:3:      inherit UserDB;   constant name = "sql";      inherit "module";   #include <module.h>      int inited;      constant cvs_version = -  "$Id: userdb_sql.pike,v 1.12 2009/12/05 01:04:00 jonasw Exp $"; +  "$Id$";      LocaleString module_name = _(1,"Authentication: SQL user database");   LocaleString module_doc = _(2,"This module implements a user database via "    "a SQL server.\n");      class SqlUser   {    inherit User;    protected mapping ent;   
Roxen.git/server/modules/security/userdb_sql.pike:39:    // Return 1 if the password is correct, 0 otherwise.    {    switch(query("passwd_type")) {    case "password":    return (int)sql_query("SELECT PASSWORD(%s) = %s as pswmatch",    password, crypted_password())[0]->pswmatch;    case "old-password":    return (int)sql_query("SELECT OLD_PASSWORD(%s) = %s as pswmatch",    password, crypted_password())[0]->pswmatch;    case "crypt": -  return (crypt(password, crypted_password())); +  return (verify_password(password, crypted_password()));    case "clear text":    return (password == crypted_password());    case "md5 crypt":    catch {return Crypto.verify_crypt_md5 (password, crypted_password());};    return 0;    }    }       protected void create( UserDB p, mapping e )    {