mirror of
https://github.com/MariaDB/server.git
synced 2025-07-30 16:24:05 +03:00
fixed bad merge (s/rnd/my_rnd/)
This commit is contained in:
@ -118,7 +118,7 @@ static void old_randominit(struct rand_struct *rand_st,ulong seed1)
|
|||||||
Generate Random number
|
Generate Random number
|
||||||
|
|
||||||
SYNOPSIS
|
SYNOPSIS
|
||||||
rnd()
|
my_rnd()
|
||||||
rand_st INOUT Structure used for number generation
|
rand_st INOUT Structure used for number generation
|
||||||
|
|
||||||
RETURN
|
RETURN
|
||||||
@ -152,7 +152,7 @@ void create_random_string(int length,struct rand_struct *rand_st,char *target)
|
|||||||
char *end=target+length;
|
char *end=target+length;
|
||||||
/* Use pointer arithmetics as it is faster way to do so. */
|
/* Use pointer arithmetics as it is faster way to do so. */
|
||||||
for (; target<end ; target++)
|
for (; target<end ; target++)
|
||||||
*target= (char) (rnd(rand_st)*94+33);
|
*target= (char) (my_rnd(rand_st)*94+33);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -293,7 +293,7 @@ void make_scrambled_password(char *to,const char *password,
|
|||||||
{
|
{
|
||||||
to[0]=PVERSION41_CHAR; /* New passwords have version prefix */
|
to[0]=PVERSION41_CHAR; /* New passwords have version prefix */
|
||||||
/* Rnd returns number from 0 to 1 so this would be good salt generation.*/
|
/* Rnd returns number from 0 to 1 so this would be good salt generation.*/
|
||||||
salt=(unsigned short) (rnd(rand_st)*65535+1);
|
salt=(unsigned short) (my_rnd(rand_st)*65535+1);
|
||||||
/* Use only 2 first bytes from it */
|
/* Use only 2 first bytes from it */
|
||||||
sprintf(to+1,"%04x",salt);
|
sprintf(to+1,"%04x",salt);
|
||||||
/* First hasing is done without salt */
|
/* First hasing is done without salt */
|
||||||
|
Reference in New Issue
Block a user