WL#1054: code style remarks fixed.
This commit is contained in:
parent
353739fdef
commit
5f9c629da0
@ -30,6 +30,13 @@
|
||||
|
||||
#include <mysql/plugin_auth_common.h>
|
||||
|
||||
/* defines for MYSQL_SERVER_AUTH_INFO.password_used */
|
||||
|
||||
#define PASSWORD_USED_NO 0
|
||||
#define PASSWORD_USED_YES 1
|
||||
#define PASSWORD_USED_NO_MENTION 2
|
||||
|
||||
|
||||
/**
|
||||
Provides server plugin access to authentication information
|
||||
*/
|
||||
|
@ -46,7 +46,7 @@ static int socket_auth(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
||||
return CR_ERROR;
|
||||
}
|
||||
|
||||
info->password_used = 2;
|
||||
info->password_used= PASSWORD_USED_NO_MENTION;
|
||||
|
||||
vio->info(vio, &vio_info);
|
||||
if (vio_info.protocol != MYSQL_VIO_SOCKET)
|
||||
|
@ -78,10 +78,10 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
||||
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
|
||||
return CR_ERROR;
|
||||
|
||||
info->password_used = 1;
|
||||
info->password_used= PASSWORD_USED_YES;
|
||||
|
||||
/* fail if the password is wrong */
|
||||
if (strcmp((const char *)pkt, info->auth_string))
|
||||
if (strcmp((const char *) pkt, info->auth_string))
|
||||
return CR_ERROR;
|
||||
|
||||
/* send the last, ordinary, question */
|
||||
@ -93,7 +93,7 @@ static int two_questions(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
||||
return CR_ERROR;
|
||||
|
||||
/* check the reply */
|
||||
return strcmp((const char *)pkt, "yes, of course") ? CR_ERROR : CR_OK;
|
||||
return strcmp((const char *) pkt, "yes, of course") ? CR_ERROR : CR_OK;
|
||||
}
|
||||
|
||||
static struct st_mysql_auth two_handler=
|
||||
@ -120,7 +120,7 @@ static int three_attempts(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
||||
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
|
||||
return CR_ERROR;
|
||||
|
||||
info->password_used = 1;
|
||||
info->password_used= PASSWORD_USED_YES;
|
||||
|
||||
/*
|
||||
finish, if the password is correct.
|
||||
@ -310,7 +310,7 @@ static int init_dialog(char *unused1 __attribute__((unused)),
|
||||
va_list unused4 __attribute__((unused)))
|
||||
{
|
||||
void *sym= dlsym(RTLD_DEFAULT, "mysql_authentication_dialog_ask");
|
||||
ask= sym ? (mysql_authentication_dialog_ask_t)sym : builtin_ask;
|
||||
ask= sym ? (mysql_authentication_dialog_ask_t) sym : builtin_ask;
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
@ -70,7 +70,7 @@ static int auth_test_plugin(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
|
||||
if ((pkt_len= vio->read_packet(vio, &pkt)) < 0)
|
||||
return CR_ERROR;
|
||||
|
||||
info->password_used = 1;
|
||||
info->password_used= PASSWORD_USED_YES;
|
||||
|
||||
/* fail if the password is wrong */
|
||||
if (strcmp((const char *) pkt, info->auth_string))
|
||||
@ -177,7 +177,8 @@ static int test_plugin_client(MYSQL_PLUGIN_VIO *vio, MYSQL *mysql)
|
||||
if (!reply)
|
||||
return CR_ERROR;
|
||||
/* send the reply to the server */
|
||||
res= vio->write_packet(vio, (const unsigned char *)reply, strlen(reply)+1);
|
||||
res= vio->write_packet(vio, (const unsigned char *) reply,
|
||||
strlen(reply) + 1);
|
||||
|
||||
if (res)
|
||||
return CR_ERROR;
|
||||
|
607
sql/sql_acl.cc
607
sql/sql_acl.cc
File diff suppressed because it is too large
Load Diff
Loading…
x
Reference in New Issue
Block a user