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
d32fc5b8
Commit
d32fc5b8
authored
Jun 12, 2023
by
Sergei Golubchik
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
MDEV-31461 mariadb SIGSEGV when built with -DCLIENT_PLUGIN_DIALOG=STATIC
parent
f5dceafd
Changes
16
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
25 additions
and
21 deletions
+25
-21
client/mysql.cc
client/mysql.cc
+2
-2
client/mysql_upgrade.c
client/mysql_upgrade.c
+1
-1
client/mysqladmin.cc
client/mysqladmin.cc
+3
-3
client/mysqlbinlog.cc
client/mysqlbinlog.cc
+1
-1
client/mysqlcheck.c
client/mysqlcheck.c
+1
-1
client/mysqldump.c
client/mysqldump.c
+1
-1
client/mysqlimport.c
client/mysqlimport.c
+1
-1
client/mysqlshow.c
client/mysqlshow.c
+1
-1
client/mysqlslap.c
client/mysqlslap.c
+1
-1
client/mysqltest.cc
client/mysqltest.cc
+1
-1
include/my_sys.h
include/my_sys.h
+1
-1
libmysqld/libmysqld.c
libmysqld/libmysqld.c
+4
-0
mysys/get_password.c
mysys/get_password.c
+4
-4
tests/async_queries.c
tests/async_queries.c
+1
-1
tests/mysql_client_fw.c
tests/mysql_client_fw.c
+1
-1
tests/thread_test.c
tests/thread_test.c
+1
-1
No files found.
client/mysql.cc
View file @
d32fc5b8
...
...
@@ -1958,7 +1958,7 @@ static int get_options(int argc, char **argv)
current_db
=
my_strdup
(
*
argv
,
MYF
(
MY_WME
));
}
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
if
(
debug_info_flag
)
my_end_arg
=
MY_CHECK_ERROR
|
MY_GIVE_INFO
;
if
(
debug_check_flag
)
...
...
@@ -4659,7 +4659,7 @@ char *mysql_authentication_dialog_ask(MYSQL *mysql, int type,
if
(
type
==
2
)
/* password */
{
s
=
get_tty_password
(
""
);
s
=
my_
get_tty_password
(
""
);
strnmov
(
buf
,
s
,
buf_len
);
buf
[
buf_len
-
1
]
=
0
;
my_free
(
s
);
...
...
client/mysql_upgrade.c
View file @
d32fc5b8
...
...
@@ -1350,7 +1350,7 @@ int main(int argc, char **argv)
if
(
tty_password
)
{
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
/* add password to defaults file */
add_one_option_cnf_file
(
&
ds_args
,
"password"
,
opt_password
);
}
...
...
client/mysqladmin.cc
View file @
d32fc5b8
...
...
@@ -339,7 +339,7 @@ int main(int argc,char *argv[])
}
commands
=
temp_argv
;
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
(
void
)
signal
(
SIGINT
,
endprog
);
/* Here if abort */
(
void
)
signal
(
SIGTERM
,
endprog
);
/* Here if abort */
...
...
@@ -1128,8 +1128,8 @@ static int execute_commands(MYSQL *mysql,int argc, char **argv)
else
if
(
argc
==
1
)
{
/* prompt for password */
typed_password
=
get_tty_password
(
"New password: "
);
verified
=
get_tty_password
(
"Confirm new password: "
);
typed_password
=
my_
get_tty_password
(
"New password: "
);
verified
=
my_
get_tty_password
(
"Confirm new password: "
);
if
(
strcmp
(
typed_password
,
verified
)
!=
0
)
{
my_printf_error
(
0
,
"Passwords don't match"
,
MYF
(
ME_BELL
));
...
...
client/mysqlbinlog.cc
View file @
d32fc5b8
...
...
@@ -2095,7 +2095,7 @@ get_one_option(int optid, const struct my_option *opt __attribute__((unused)),
break
;
}
if
(
tty_password
)
pass
=
get_tty_password
(
NullS
);
pass
=
my_
get_tty_password
(
NullS
);
return
0
;
}
...
...
client/mysqlcheck.c
View file @
d32fc5b8
...
...
@@ -458,7 +458,7 @@ static int get_options(int *argc, char ***argv)
DBUG_RETURN
(
1
);
}
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
if
(
debug_info_flag
)
my_end_arg
=
MY_CHECK_ERROR
|
MY_GIVE_INFO
;
if
(
debug_check_flag
)
...
...
client/mysqldump.c
View file @
d32fc5b8
...
...
@@ -1233,7 +1233,7 @@ static int get_options(int *argc, char ***argv)
return
EX_USAGE
;
}
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
return
(
0
);
}
/* get_options */
...
...
client/mysqlimport.c
View file @
d32fc5b8
...
...
@@ -299,7 +299,7 @@ static int get_options(int *argc, char ***argv)
current_db
=
*
((
*
argv
)
++
);
(
*
argc
)
--
;
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
return
(
0
);
}
...
...
client/mysqlshow.c
View file @
d32fc5b8
...
...
@@ -352,7 +352,7 @@ get_options(int *argc,char ***argv)
exit
(
ho_error
);
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
if
(
opt_count
)
{
/*
...
...
client/mysqlslap.c
View file @
d32fc5b8
...
...
@@ -1523,7 +1523,7 @@ get_options(int *argc,char ***argv)
}
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
DBUG_RETURN
(
0
);
}
...
...
client/mysqltest.cc
View file @
d32fc5b8
...
...
@@ -7293,7 +7293,7 @@ int parse_args(int argc, char **argv)
if
(
argc
==
1
)
opt_db
=
*
argv
;
if
(
tty_password
)
opt_pass
=
get_tty_password
(
NullS
);
/* purify tested */
opt_pass
=
my_
get_tty_password
(
NullS
);
/* purify tested */
if
(
debug_info_flag
)
my_end_arg
=
MY_CHECK_ERROR
|
MY_GIVE_INFO
;
if
(
debug_check_flag
)
...
...
include/my_sys.h
View file @
d32fc5b8
...
...
@@ -1058,7 +1058,7 @@ extern void add_compiled_collation(struct charset_info_st *cs);
extern
size_t
escape_string_for_mysql
(
CHARSET_INFO
*
charset_info
,
char
*
to
,
size_t
to_length
,
const
char
*
from
,
size_t
length
);
extern
char
*
get_tty_password
(
const
char
*
opt_message
);
extern
char
*
my_
get_tty_password
(
const
char
*
opt_message
);
#ifdef __WIN__
#define BACKSLASH_MBTAIL
/* File system character set */
...
...
libmysqld/libmysqld.c
View file @
d32fc5b8
...
...
@@ -226,3 +226,7 @@ mysql_real_connect(MYSQL *mysql,const char *host, const char *user,
DBUG_RETURN
(
0
);
}
char
*
get_tty_password
(
const
char
*
opt_message
)
{
return
my_get_tty_password
(
opt_message
);
}
mysys/get_password.c
View file @
d32fc5b8
...
...
@@ -60,11 +60,11 @@
/* were just going to fake it here and get input from
the keyboard */
char
*
get_tty_password
(
const
char
*
opt_message
)
char
*
my_
get_tty_password
(
const
char
*
opt_message
)
{
char
to
[
80
];
char
*
pos
=
to
,
*
end
=
to
+
sizeof
(
to
)
-
1
;
DBUG_ENTER
(
"get_tty_password"
);
DBUG_ENTER
(
"
my_
get_tty_password"
);
_cputs
(
opt_message
?
opt_message
:
"Enter password: "
);
for
(;;)
{
...
...
@@ -145,7 +145,7 @@ static void get_password(char *to,uint length,int fd, my_bool echo)
#endif
/* ! HAVE_GETPASS */
char
*
get_tty_password
(
const
char
*
opt_message
)
char
*
my_
get_tty_password
(
const
char
*
opt_message
)
{
#ifdef HAVE_GETPASS
char
*
passbuff
;
...
...
@@ -154,7 +154,7 @@ char *get_tty_password(const char *opt_message)
#endif
/* HAVE_GETPASS */
char
buff
[
80
];
DBUG_ENTER
(
"get_tty_password"
);
DBUG_ENTER
(
"
my_
get_tty_password"
);
#ifdef HAVE_GETPASS
passbuff
=
getpass
(
opt_message
?
opt_message
:
"Enter password: "
);
...
...
tests/async_queries.c
View file @
d32fc5b8
...
...
@@ -371,7 +371,7 @@ main(int argc, char *argv[])
if
(
err
)
exit
(
err
);
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
if
(
opt_query_file
)
{
...
...
tests/mysql_client_fw.c
View file @
d32fc5b8
...
...
@@ -1362,7 +1362,7 @@ static void get_options(int *argc, char ***argv)
exit
(
ho_error
);
if
(
tty_password
)
opt_password
=
get_tty_password
(
NullS
);
opt_password
=
my_
get_tty_password
(
NullS
);
return
;
}
...
...
tests/thread_test.c
View file @
d32fc5b8
...
...
@@ -174,7 +174,7 @@ static void get_options(int argc, char **argv)
free_defaults
(
argv
);
if
(
tty_password
)
password
=
get_tty_password
(
NullS
);
password
=
my_
get_tty_password
(
NullS
);
return
;
}
...
...
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