MySQL 8.4.2
Source Code Documentation
auth_ldap_sasl_client::Krb5_interface Class Reference

Class representing interface to KRB5 functions. More...

#include <krb5_interface.h>

Public Member Functions

 Krb5_interface ()
 Constructor. More...
 
 ~Krb5_interface ()
 Destructor. More...
 
bool initialize ()
 Initialize the object by loading the libraries and setting pointers to the interface functions. More...
 

Private Member Functions

bool load_lib (const char *name, void *&handle)
 Loads single library. More...
 
void close_libs ()
 Closes the libraries. More...
 
template<class T >
bool get_function (void *lib_handle, const char *name, T &function)
 Get pointer to the interface function by its name. More...
 

Private Attributes

void * krb5_lib_handle
 Handle to the library providing krb5_* functions. More...
 
void * profile_lib_handle
 Handle to the library providing profile_* functions. More...
 

Detailed Description

Class representing interface to KRB5 functions.

The functions are located in a library or libraries that are loaded in runtime. The class provides easy and safe access to them.

Constructor & Destructor Documentation

◆ Krb5_interface()

auth_ldap_sasl_client::Krb5_interface::Krb5_interface ( )

Constructor.

The constructor is trivial and the libraries are not loaded by it. This is done in initialize() to give chance the caller to check if succeeded.

◆ ~Krb5_interface()

auth_ldap_sasl_client::Krb5_interface::~Krb5_interface ( )

Destructor.

Closes the libraries.

Member Function Documentation

◆ close_libs()

void auth_ldap_sasl_client::Krb5_interface::close_libs ( )
private

Closes the libraries.

◆ get_function()

template<class T >
bool auth_ldap_sasl_client::Krb5_interface::get_function ( void *  lib_handle,
const char *  name,
T &  function 
)
inlineprivate

Get pointer to the interface function by its name.

Template Parameters
Ttype of the function
Parameters
lib_handle[in] handle to the library providing the function
name[in] name of the function
function[out] pointer to the function
Return values
truesuccess
falsefailure

◆ initialize()

bool auth_ldap_sasl_client::Krb5_interface::initialize ( )

Initialize the object by loading the libraries and setting pointers to the interface functions.

It must be called before any interface functions are called.

Return values
truesuccess
falsefailure

◆ load_lib()

bool auth_ldap_sasl_client::Krb5_interface::load_lib ( const char *  name,
void *&  handle 
)
private

Loads single library.

Parameters
name[in] path or name of the library
handle[out] handle to the library
Return values
truesuccess
falsefailure

Member Data Documentation

◆ krb5_lib_handle

void* auth_ldap_sasl_client::Krb5_interface::krb5_lib_handle
private

Handle to the library providing krb5_* functions.

◆ profile_lib_handle

void* auth_ldap_sasl_client::Krb5_interface::profile_lib_handle
private

Handle to the library providing profile_* functions.


The documentation for this class was generated from the following files: