summaryrefslogtreecommitdiff
path: root/include/mysql_com.h
diff options
context:
space:
mode:
authorGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
committerGeorgi Kodinov <Georgi.Kodinov@Oracle.com>2010-08-09 11:32:50 +0300
commit881a76699ee68bbfddec0c413c0caf769d32f3c1 (patch)
tree55fa1ceccae107e55c0295dfe2174d04d41583fb /include/mysql_com.h
parenta34236947817013339787f4bf6252112a1d97e0c (diff)
downloadmariadb-git-881a76699ee68bbfddec0c413c0caf769d32f3c1.tar.gz
WL#1054: Pluggable authentication support
Merged the implementation to a new base tree.
Diffstat (limited to 'include/mysql_com.h')
-rw-r--r--include/mysql_com.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/mysql_com.h b/include/mysql_com.h
index 90fe4ac1995..d4223211710 100644
--- a/include/mysql_com.h
+++ b/include/mysql_com.h
@@ -162,9 +162,17 @@ enum enum_server_command
#define CLIENT_MULTI_RESULTS (1UL << 17) /* Enable/disable multi-results */
#define CLIENT_PS_MULTI_RESULTS (1UL << 18) /* Multi-results in PS-protocol */
+#define CLIENT_PLUGIN_AUTH (1UL << 19) /* Client supports plugin authentication */
+
#define CLIENT_SSL_VERIFY_SERVER_CERT (1UL << 30)
#define CLIENT_REMEMBER_OPTIONS (1UL << 31)
+#ifdef HAVE_COMPRESS
+#define CAN_CLIENT_COMPRESS CLIENT_COMPRESS
+#else
+#define CAN_CLIENT_COMPRESS 0
+#endif
+
/* Gather all possible capabilites (flags) supported by the server */
#define CLIENT_ALL_FLAGS (CLIENT_LONG_PASSWORD | \
CLIENT_FOUND_ROWS | \
@@ -186,7 +194,8 @@ enum enum_server_command
CLIENT_MULTI_RESULTS | \
CLIENT_PS_MULTI_RESULTS | \
CLIENT_SSL_VERIFY_SERVER_CERT | \
- CLIENT_REMEMBER_OPTIONS)
+ CLIENT_REMEMBER_OPTIONS | \
+ CLIENT_PLUGIN_AUTH)
/*
Switch off the flags that are optional and depending on build flags
@@ -518,14 +527,14 @@ void create_random_string(char *to, unsigned int length, struct rand_struct *ran
void hash_password(unsigned long *to, const char *password, unsigned int password_len);
void make_scrambled_password_323(char *to, const char *password);
void scramble_323(char *to, const char *message, const char *password);
-my_bool check_scramble_323(const char *, const char *message,
+my_bool check_scramble_323(const unsigned char *reply, const char *message,
unsigned long *salt);
void get_salt_from_password_323(unsigned long *res, const char *password);
void make_password_from_salt_323(char *to, const unsigned long *salt);
void make_scrambled_password(char *to, const char *password);
void scramble(char *to, const char *message, const char *password);
-my_bool check_scramble(const char *reply, const char *message,
+my_bool check_scramble(const unsigned char *reply, const char *message,
const unsigned char *hash_stage2);
void get_salt_from_password(unsigned char *res, const char *password);
void make_password_from_salt(char *to, const unsigned char *hash_stage2);