Browse Source

MDEV-31461 mariadb SIGSEGV when built with -DCLIENT_PLUGIN_DIALOG=STATIC

bb-10.4-MDEV-28622
Sergei Golubchik 2 years ago
parent
commit
d32fc5b8e0
  1. 4
      client/mysql.cc
  2. 2
      client/mysql_upgrade.c
  3. 6
      client/mysqladmin.cc
  4. 2
      client/mysqlbinlog.cc
  5. 2
      client/mysqlcheck.c
  6. 2
      client/mysqldump.c
  7. 2
      client/mysqlimport.c
  8. 2
      client/mysqlshow.c
  9. 2
      client/mysqlslap.c
  10. 2
      client/mysqltest.cc
  11. 2
      include/my_sys.h
  12. 4
      libmysqld/libmysqld.c
  13. 8
      mysys/get_password.c
  14. 2
      tests/async_queries.c
  15. 2
      tests/mysql_client_fw.c
  16. 2
      tests/thread_test.c

4
client/mysql.cc

@ -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);

2
client/mysql_upgrade.c

@ -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);
}

6
client/mysqladmin.cc

@ -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));

2
client/mysqlbinlog.cc

@ -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;
}

2
client/mysqlcheck.c

@ -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)

2
client/mysqldump.c

@ -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 */

2
client/mysqlimport.c

@ -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);
}

2
client/mysqlshow.c

@ -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)
{
/*

2
client/mysqlslap.c

@ -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);
}

2
client/mysqltest.cc

@ -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)

2
include/my_sys.h

@ -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 */

4
libmysqld/libmysqld.c

@ -226,3 +226,7 @@ error:
DBUG_RETURN(0);
}
char *get_tty_password(const char *opt_message)
{
return my_get_tty_password(opt_message);
}

8
mysys/get_password.c

@ -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: ");

2
tests/async_queries.c

@ -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)
{

2
tests/mysql_client_fw.c

@ -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;
}

2
tests/thread_test.c

@ -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;
}

Loading…
Cancel
Save