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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
d8572f24
Commit
d8572f24
authored
Sep 03, 2003
by
unknown
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
C cleanups
parent
1ef5dce8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
include/mysql_com.h
include/mysql_com.h
+1
-1
libmysql/libmysql.c
libmysql/libmysql.c
+3
-2
sql/password.c
sql/password.c
+3
-3
No files found.
include/mysql_com.h
View file @
d8572f24
...
...
@@ -319,7 +319,7 @@ void randominit(struct rand_struct *, unsigned long seed1,
double
my_rnd
(
struct
rand_struct
*
);
void
create_random_string
(
char
*
to
,
uint
length
,
struct
rand_struct
*
rand_st
);
void
hash_password
(
ulong
*
to
,
const
char
*
password
,
uint
password_len
);
void
hash_password
(
u
nsigned
long
*
to
,
const
char
*
password
,
uint
password_len
);
void
make_scrambled_password_323
(
char
*
to
,
const
char
*
password
);
void
scramble_323
(
char
*
to
,
const
char
*
message
,
const
char
*
password
);
my_bool
check_scramble_323
(
const
char
*
,
const
char
*
message
,
...
...
libmysql/libmysql.c
View file @
d8572f24
...
...
@@ -594,6 +594,8 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
const
char
*
passwd
,
const
char
*
db
)
{
char
buff
[
512
],
*
end
=
buff
;
NET
*
net
=
&
mysql
->
net
;
ulong
pkt_length
;
DBUG_ENTER
(
"mysql_change_user"
);
if
(
!
user
)
...
...
@@ -627,8 +629,7 @@ my_bool STDCALL mysql_change_user(MYSQL *mysql, const char *user,
/* Write authentication package */
simple_command
(
mysql
,
COM_CHANGE_USER
,
buff
,(
ulong
)
(
end
-
buff
),
1
);
NET
*
net
=
&
mysql
->
net
;
ulong
pkt_length
=
net_safe_read
(
mysql
);
pkt_length
=
net_safe_read
(
mysql
);
if
(
pkt_length
==
packet_error
)
goto
error
;
...
...
sql/password.c
View file @
d8572f24
...
...
@@ -170,15 +170,15 @@ void scramble_323(char *to, const char *message, const char *password)
if
(
password
&&
password
[
0
])
{
char
*
to_start
=
to
;
char
extra
,
*
to_start
=
to
;
const
char
*
message_end
=
message
+
SCRAMBLE_LENGTH_323
;
hash_password
(
hash_pass
,
password
,
strlen
(
password
));
hash_password
(
hash_message
,
message
,
SCRAMBLE_LENGTH_323
);
randominit
(
&
rand_st
,
hash_pass
[
0
]
^
hash_message
[
0
],
hash_pass
[
1
]
^
hash_message
[
1
]);
const
char
*
message_end
=
message
+
SCRAMBLE_LENGTH_323
;
for
(;
message
<
message_end
;
message
++
)
*
to
++=
(
char
)
(
floor
(
my_rnd
(
&
rand_st
)
*
31
)
+
64
);
char
extra
=
(
char
)
(
floor
(
my_rnd
(
&
rand_st
)
*
31
));
extra
=
(
char
)
(
floor
(
my_rnd
(
&
rand_st
)
*
31
));
while
(
to_start
!=
to
)
*
(
to_start
++
)
^=
extra
;
}
...
...
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