mirror of
git://git.gnu.org.ua/pam-modules.git
synced 2025-04-29 18:09:53 +03:00
Minor change
git-svn-id: file:///svnroot/pam-modules/trunk@81 56984be4-0537-0410-a56c-fcb268c96130
This commit is contained in:
parent
7a1d93c4eb
commit
9728d1c2f4
1 changed files with 6 additions and 8 deletions
|
@ -188,14 +188,14 @@ mu_check_mysql_4x_password (const char *scrambled, const char *message)
|
|||
char to[2*SHA1_HASH_SIZE + 2];
|
||||
|
||||
/* stage 1: hash password */
|
||||
sha1_init_ctx (&sha1_context);
|
||||
sha1_process_bytes (message, strlen (message), &sha1_context);
|
||||
sha1_finish_ctx (&sha1_context, to);
|
||||
gpam_sha1_init_ctx (&sha1_context);
|
||||
gpam_sha1_process_bytes (message, strlen (message), &sha1_context);
|
||||
gpam_sha1_finish_ctx (&sha1_context, to);
|
||||
|
||||
/* stage 2: hash stage1 output */
|
||||
sha1_init_ctx (&sha1_context);
|
||||
sha1_process_bytes (to, SHA1_HASH_SIZE, &sha1_context);
|
||||
sha1_finish_ctx (&sha1_context, hash_stage2);
|
||||
gpam_sha1_init_ctx (&sha1_context);
|
||||
gpam_sha1_process_bytes (to, SHA1_HASH_SIZE, &sha1_context);
|
||||
gpam_sha1_finish_ctx (&sha1_context, hash_stage2);
|
||||
|
||||
/* convert hash_stage2 to hex string */
|
||||
to[0] = '*';
|
||||
|
@ -282,8 +282,6 @@ check_md5_pass(const char *sqlpass, const char *userpass)
|
|||
return PAM_AUTH_ERR;
|
||||
}
|
||||
|
||||
|
||||
|
||||
static int
|
||||
check_query_result(MYSQL *mysql, const char *pass)
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue