MySQL 9.1.0
Source Code Documentation
mysql_no_login.cc File Reference

mysql_no_login authentication plugin. More...

#include <mysql/plugin_auth.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include "my_compiler.h"

Functions

static int mysql_no_login (MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
 
static int generate_auth_string_hash (char *outbuf, unsigned int *buflen, const char *inbuf, unsigned int inbuflen)
 
static int validate_auth_string_hash (char *const inbuf, unsigned int buflen)
 
static int set_salt (const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len)
 
 mysql_declare_plugin (mysql_no_login)
 

Variables

static struct st_mysql_auth mysql_no_login_handler
 
 mysql_declare_plugin_end
 

Detailed Description

mysql_no_login authentication plugin.

This plugin exists to support system user accounts, which cannot be accessed externally. This is useful for privileged stored programs, views and events. Such objects can be created with DEFINER = [sys account] SQL SECURITY DEFINER.

Function Documentation

◆ generate_auth_string_hash()

static int generate_auth_string_hash ( char *  outbuf,
unsigned int *  buflen,
const char *  inbuf,
unsigned int  inbuflen 
)
static

◆ mysql_declare_plugin()

mysql_declare_plugin ( mysql_no_login  )

◆ mysql_no_login()

static int mysql_no_login ( MYSQL_PLUGIN_VIO vio,
MYSQL_SERVER_AUTH_INFO info 
)
static

◆ set_salt()

static int set_salt ( const char *  password,
unsigned int  password_len,
unsigned char *  salt,
unsigned char *  salt_len 
)
static

◆ validate_auth_string_hash()

static int validate_auth_string_hash ( char *const  inbuf,
unsigned int  buflen 
)
static

Variable Documentation

◆ mysql_declare_plugin_end

mysql_declare_plugin_end

◆ mysql_no_login_handler

struct st_mysql_auth mysql_no_login_handler
static
Initial value:
= {
nullptr,
nullptr}
static int validate_auth_string_hash(char *const inbuf, unsigned int buflen)
Definition: mysql_no_login.cc:55
static int mysql_no_login(MYSQL_PLUGIN_VIO *vio, MYSQL_SERVER_AUTH_INFO *info)
Definition: mysql_no_login.cc:42
static int set_salt(const char *password, unsigned int password_len, unsigned char *salt, unsigned char *salt_len)
Definition: mysql_no_login.cc:60
static int generate_auth_string_hash(char *outbuf, unsigned int *buflen, const char *inbuf, unsigned int inbuflen)
Definition: mysql_no_login.cc:47
#define AUTH_FLAG_PRIVILEGED_USER_FOR_PASSWORD_CHANGE
Definition: plugin_auth.h:49
#define MYSQL_AUTHENTICATION_INTERFACE_VERSION
Definition: plugin_auth.h:37