MySQL 8.0.29
Source Code Documentation
multi_factor_passwordopt-vars.h
Go to the documentation of this file.
1/* Copyright (c) 2021, Oracle and/or its affiliates.
2
3 This program is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License, version 2.0,
5 as published by the Free Software Foundation.
6
7 This program is also distributed with certain software (including
8 but not limited to OpenSSL) that is licensed under separate terms,
9 as designated in a particular file or component or in included license
10 documentation. The authors of MySQL hereby grant you an additional
11 permission to link the program and your derivative works with the
12 separately licensed software that they have included with MySQL.
13
14 This program is distributed in the hope that it will be useful,
15 but WITHOUT ANY WARRANTY; without even the implied warranty of
16 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17 GNU General Public License, version 2.0, for more details.
18
19 You should have received a copy of the GNU General Public License
20 along with this program; if not, write to the Free Software
21 Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA */
22
23/**
24 @file include/multi_factor_passwordopt-vars.h
25*/
26
27#ifndef MULTI_FACTOR_PASSWORDOPT_VARS_H
28#define MULTI_FACTOR_PASSWORDOPT_VARS_H
29
30#include "mysql.h"
31
32extern char *opt_password[MAX_AUTH_FACTORS];
34
35/** parse passwords for --password or --password<N> option where N = 1,2,3 */
37 char *argument);
38/** Set password in mysql->options */
40/** Release memory for opt_password */
41void free_passwords();
42
43#define PARSE_COMMAND_LINE_PASSWORD_OPTION \
44 case 'p': \
45 parse_command_line_password_option(opt, argument); \
46 break; \
47 case MYSQL_OPT_USER_PASSWORD: \
48 parse_command_line_password_option(opt, argument); \
49 break;
50
51#endif // MULTI_FACTOR_PASSWORDOPT_VARS_H
bool tty_password[MAX_AUTH_FACTORS]
Definition: multi_factor_passwordopt-vars.cc:33
char * opt_password[MAX_AUTH_FACTORS]
Definition: multi_factor_passwordopt-vars.cc:32
void set_password_options(MYSQL *mysql)
Set password in mysql->options.
Definition: multi_factor_passwordopt-vars.cc:74
void free_passwords()
Release memory for opt_password.
Definition: multi_factor_passwordopt-vars.cc:95
void parse_command_line_password_option(const struct my_option *opt, char *argument)
parse passwords for –password or –password<N> option where N = 1,2,3
Definition: multi_factor_passwordopt-vars.cc:43
static MYSQL mysql
Definition: mysql.cc:153
This file defines the client API to MySQL and also the ABI of the dynamically linked libmysqlclient.
#define MAX_AUTH_FACTORS
Definition: mysql_com.h:86
Definition: mysql.h:298
Definition: my_getopt.h:92