Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
mariadb
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
10096d91
Commit
10096d91
authored
Mar 20, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixed bad merge (s/rnd/my_rnd/)
parent
42879405
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
sql/password.c
sql/password.c
+3
-3
No files found.
sql/password.c
View file @
10096d91
...
...
@@ -118,7 +118,7 @@ static void old_randominit(struct rand_struct *rand_st,ulong seed1)
Generate Random number
SYNOPSIS
rnd()
my_
rnd()
rand_st INOUT Structure used for number generation
RETURN
...
...
@@ -152,7 +152,7 @@ void create_random_string(int length,struct rand_struct *rand_st,char *target)
char
*
end
=
target
+
length
;
/* Use pointer arithmetics as it is faster way to do so. */
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 */
/* 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 */
sprintf
(
to
+
1
,
"%04x"
,
salt
);
/* First hasing is done without salt */
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment