1 /*
2    Copyright (c) 2011, 2018 MariaDB Corporation
3 
4    This program is free software; you can redistribute it and/or modify
5    it under the terms of the GNU General Public License as published by
6    the Free Software Foundation; version 2 of the License.
7 
8    This program is distributed in the hope that it will be useful,
9    but WITHOUT ANY WARRANTY; without even the implied warranty of
10    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
11    GNU General Public License for more details.
12 
13    You should have received a copy of the GNU General Public License
14    along with this program; if not, write to the Free Software
15    Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02111-1301 USA */
16 
17 /*
18   In this file we gather the plugin interface definitions
19   that are same in all the PAM plugin versions.
20   To be included into auth_pam.c and auth_pam_v1.c.
21 */
22 
23 static struct st_mysql_auth info =
24 {
25   MYSQL_AUTHENTICATION_INTERFACE_VERSION,
26   "dialog",
27   pam_auth,
28   NULL, NULL /* no PASSWORD() */
29 };
30 
31 static char use_cleartext_plugin;
32 static MYSQL_SYSVAR_BOOL(use_cleartext_plugin, use_cleartext_plugin,
33        PLUGIN_VAR_NOCMDARG | PLUGIN_VAR_READONLY,
34        "Use mysql_cleartext_plugin on the client side instead of the dialog "
35        "plugin. This may be needed for compatibility reasons, but it only "
36        "supports simple PAM policies that don't require anything besides "
37        "a password", NULL, NULL, 0);
38 
39 static MYSQL_SYSVAR_BOOL(winbind_workaround, winbind_hack, PLUGIN_VAR_OPCMDARG,
40        "Compare usernames case insensitively to work around pam_winbind "
41        "unconditional username lowercasing", NULL, NULL, 0);
42 
43 #ifndef DBUG_OFF
44 static MYSQL_SYSVAR_BOOL(debug, pam_debug, PLUGIN_VAR_OPCMDARG,
45        "Log all PAM activity", NULL, NULL, 0);
46 #endif
47 
48 
49 static struct st_mysql_sys_var* vars[] = {
50   MYSQL_SYSVAR(use_cleartext_plugin),
51   MYSQL_SYSVAR(winbind_workaround),
52 #ifndef DBUG_OFF
53   MYSQL_SYSVAR(debug),
54 #endif
55   NULL
56 };
57