Skip to content

File broker_acl.c

FileList > broker > broker_acl.c

Go to the source code of this file

  • #include <assert.h>
  • #include <errno.h>
  • #include "porting.h"
  • #include "broker_acl.h"
  • #include "cas_error.h"
  • #include "broker_util.h"
  • #include "broker_filename.h"

Public Types

Type Name
enum ACL_FMT

Public Attributes

Type Name
ACCESS_INFO access_info
int access_info_changed
int num_access_info

Public Functions

Type Name
int access_control_check_right (T_SHM_APPL_SERVER * shm_as_p, char * dbname, char * dbuser, unsigned char * address)
int access_control_read_config_file (T_SHM_APPL_SERVER * shm_appl, char * filename, char * admin_err_msg, T_SHM_BROKER * shm_br)
int access_control_set_shm (T_SHM_APPL_SERVER * shm_as_p, T_BROKER_INFO * br_info_p, T_SHM_BROKER * shm_br, char * admin_err_msg)

Public Static Functions

Type Name
int access_control_check_ip (T_SHM_APPL_SERVER * shm_as_p, IP_INFO * ip_info, unsigned char * address, int info_index)
int access_control_check_right_internal (T_SHM_APPL_SERVER * shm_as_p, char * dbname, char * dbuser, unsigned char * address)
ACCESS_INFO * access_control_find_access_info (ACCESS_INFO ai, int size, char * dbname, char * dbuser)
int access_control_read_ip_info (IP_INFO * ip_info, char * filename, char * admin_err_msg)
ACL_FMT is_invalid_acl_entry (const char * buf, T_SHM_BROKER * shm_br)
int record_ip_access_time (T_SHM_APPL_SERVER * shm_as_p, int info_index, int list_index)

Macros

Type Name
define ACCESS_FILE_DELIMITER ":"
define ADMIN_ERR_MSG_SIZE [**BROKER\_PATH\_MAX**](broker__config_8h.md#define-broker_path_max) \* 2
define IP_FILE_DELIMITER ","
define NUM_ACL_ELEM 3

Public Types Documentation

enum ACL_FMT

enum ACL_FMT {
    ACL_FMT_NO_ERROR = 0,
    ACL_FMT_UNKOWN_BROKER,
    ACL_FMT_INVALID,
    ACL_FMT_EMPTY_ELEM
};

Public Attributes Documentation

variable access_info

ACCESS_INFO access_info[50];

variable access_info_changed

int access_info_changed;

variable num_access_info

int num_access_info;

Public Functions Documentation

function access_control_check_right

int access_control_check_right (
    T_SHM_APPL_SERVER * shm_as_p,
    char * dbname,
    char * dbuser,
    unsigned  char * address
) 

function access_control_read_config_file

int access_control_read_config_file (
    T_SHM_APPL_SERVER * shm_appl,
    char * filename,
    char * admin_err_msg,
    T_SHM_BROKER * shm_br
) 

function access_control_set_shm

int access_control_set_shm (
    T_SHM_APPL_SERVER * shm_as_p,
    T_BROKER_INFO * br_info_p,
    T_SHM_BROKER * shm_br,
    char * admin_err_msg
) 

Public Static Functions Documentation

function access_control_check_ip

static int access_control_check_ip (
    T_SHM_APPL_SERVER * shm_as_p,
    IP_INFO * ip_info,
    unsigned  char * address,
    int info_index
) 

function access_control_check_right_internal

static int access_control_check_right_internal (
    T_SHM_APPL_SERVER * shm_as_p,
    char * dbname,
    char * dbuser,
    unsigned  char * address
) 

function access_control_find_access_info

static ACCESS_INFO * access_control_find_access_info (
    ACCESS_INFO ai,
    int size,
    char * dbname,
    char * dbuser
) 

function access_control_read_ip_info

static int access_control_read_ip_info (
    IP_INFO * ip_info,
    char * filename,
    char * admin_err_msg
) 

function is_invalid_acl_entry

static ACL_FMT is_invalid_acl_entry (
    const  char * buf,
    T_SHM_BROKER * shm_br
) 

function record_ip_access_time

static int record_ip_access_time (
    T_SHM_APPL_SERVER * shm_as_p,
    int info_index,
    int list_index
) 

Macro Definition Documentation

define ACCESS_FILE_DELIMITER

#define ACCESS_FILE_DELIMITER `":"`

define ADMIN_ERR_MSG_SIZE

#define ADMIN_ERR_MSG_SIZE `BROKER_PATH_MAX * 2`

define IP_FILE_DELIMITER

#define IP_FILE_DELIMITER `","`

define NUM_ACL_ELEM

#define NUM_ACL_ELEM `3`


The documentation for this class was generated from the following file cubrid/src/broker/broker_acl.c