CUBRID Engine
latest
|
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include <assert.h>
#include "porting.h"
#include "misc_string.h"
#include "memory_alloc.h"
#include "dbtype.h"
#include "error_manager.h"
#include "boot_cl.h"
#include "work_space.h"
#include "object_primitive.h"
#include "class_object.h"
#include "schema_manager.h"
#include "authenticate.h"
#include "set_object.h"
#include "object_accessor.h"
#include "encryption.h"
#include "crypt_opfunc.h"
#include "message_catalog.h"
#include "string_opfunc.h"
#include "locator_cl.h"
#include "virtual_object.h"
#include "db.h"
#include "trigger_manager.h"
#include "transform.h"
#include "environment_variable.h"
#include "execute_schema.h"
#include "jsp_cl.h"
#include "object_print.h"
#include "execute_statement.h"
#include "optimizer.h"
#include "network_interface_cl.h"
#include "printer.hpp"
Go to the source code of this file.
Classes | |
struct | au_grant |
struct | au_class_cache |
struct | au_user_cache |
struct | class_grant |
struct | class_user |
struct | class_auth |
Typedefs | |
typedef enum fetch_by | FETCH_BY |
typedef struct au_grant | AU_GRANT |
typedef struct au_class_cache | AU_CLASS_CACHE |
typedef struct au_user_cache | AU_USER_CACHE |
typedef struct class_grant | CLASS_GRANT |
typedef struct class_user | CLASS_USER |
typedef struct class_auth | CLASS_AUTH |
Enumerations | |
enum | fetch_by { DONT_KNOW, BY_INSTANCE_MOP, BY_CLASS_MOP } |
Functions | |
void | get_attribute_number (DB_OBJECT *target, DB_VALUE *result, DB_VALUE *attr_name) |
static int | au_get_set (MOP obj, const char *attname, DB_SET **set) |
static int | au_get_object (MOP obj, const char *attname, MOP *mop_ptr) |
static int | au_set_get_obj (DB_SET *set, int index, MOP *obj) |
static AU_CLASS_CACHE * | au_make_class_cache (int depth) |
static void | au_free_class_cache (AU_CLASS_CACHE *cache) |
static AU_CLASS_CACHE * | au_install_class_cache (SM_CLASS *sm_class) |
static int | au_extend_class_caches (int *index) |
static int | au_find_user_cache_index (DB_OBJECT *user, int *index, int check_it) |
static void | free_user_cache (AU_USER_CACHE *u) |
static void | reset_cache_for_user_and_class (SM_CLASS *sm_class) |
static void | remove_user_cache_references (MOP user) |
static void | init_caches (void) |
static void | flush_caches (void) |
static MOP | au_make_user (const char *name) |
static int | au_set_new_auth (MOP au_obj, MOP grantor, MOP user, MOP class_mop, DB_AUTH auth_type, bool grant_option) |
static MOP | au_get_new_auth (MOP grantor, MOP user, MOP class_mop, DB_AUTH auth_type) |
static int | au_insert_new_auth (MOP grantor, MOP user, MOP class_mop, DB_AUTH auth_type, int grant_option) |
static int | au_update_new_auth (MOP grantor, MOP user, MOP class_mop, DB_AUTH auth_type, int grant_option) |
static int | au_delete_new_auth (MOP grantor, MOP user, MOP class_mop, DB_AUTH auth_type) |
static int | au_propagate_del_new_auth (AU_GRANT *glist, DB_AUTH mask) |
static int | check_user_name (const char *name) |
static void | encrypt_password (const char *pass, int add_prefix, char *dest) |
static void | encrypt_password_sha1 (const char *pass, int add_prefix, char *dest) |
static void | encrypt_password_sha2_512 (const char *pass, char *dest) |
static bool | match_password (const char *user, const char *database) |
static int | au_set_password_internal (MOP user, const char *password, int encode, char encrypt_prefix) |
static int | au_add_direct_groups (DB_SET *new_groups, DB_VALUE *value) |
static int | au_compute_groups (MOP member, const char *name) |
static int | au_add_member_internal (MOP group, MOP member, int new_user) |
static int | find_grant_entry (DB_SET *grants, MOP class_mop, MOP grantor) |
static int | add_grant_entry (DB_SET *grants, MOP class_mop, MOP grantor) |
static void | drop_grant_entry (DB_SET *grants, int index) |
static int | get_grants (MOP auth, DB_SET **grant_ptr, int filter) |
static int | apply_grants (MOP auth, MOP class_mop, unsigned int *bits) |
static int | update_cache (MOP classop, SM_CLASS *sm_class, AU_CLASS_CACHE *cache) |
static int | appropriate_error (unsigned int bits, unsigned int requested) |
static int | check_grant_option (MOP classop, SM_CLASS *sm_class, DB_AUTH type) |
static void | free_grant_list (AU_GRANT *grants) |
static int | collect_class_grants (MOP class_mop, DB_AUTH type, MOP revoked_auth, int revoked_grant_index, AU_GRANT **return_grants) |
static void | map_grant_list (AU_GRANT *grants, MOP grantor) |
static int | propagate_revoke (AU_GRANT *grant_list, MOP owner, DB_AUTH mask) |
static int | is_protected_class (MOP classmop, SM_CLASS *sm_class, DB_AUTH auth) |
static int | check_authorization (MOP classobj, SM_CLASS *sm_class, DB_AUTH type) |
static int | fetch_class (MOP op, MOP *return_mop, SM_CLASS **return_class, AU_FETCHMODE fetchmode, FETCH_BY fetch_by) |
static int | au_fetch_class_internal (MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type, FETCH_BY fetch_by) |
static int | fetch_instance (MOP op, MOBJ *obj_ptr, AU_FETCHMODE fetchmode, LC_FETCH_VERSION_TYPE read_fetch_version_type) |
static int | au_perform_login (const char *name, const char *password, bool ignore_dba_privilege) |
static CLASS_GRANT * | make_class_grant (CLASS_USER *user, int cache) |
static CLASS_USER * | make_class_user (MOP user_obj) |
static void | free_class_grants (CLASS_GRANT *grants) |
static void | free_class_users (CLASS_USER *users) |
static CLASS_USER * | find_or_add_user (CLASS_AUTH *auth, MOP user_obj) |
static int | add_class_grant (CLASS_AUTH *auth, MOP source, MOP user, int cache) |
static int | build_class_grant_list (CLASS_AUTH *cl_auth, MOP class_mop) |
static void | issue_grant_statement (print_output &output_ctx, CLASS_AUTH *auth, CLASS_GRANT *grant, int authbits) |
static int | class_grant_loop (print_output &output_ctx, CLASS_AUTH *auth) |
static void | au_print_cache (int cache, FILE *fp) |
static void | au_print_grant_entry (DB_SET *grants, int grant_index, FILE *fp) |
static void | au_print_auth (MOP auth, FILE *fp) |
static int | au_change_serial_owner (MOP *object, MOP new_owner) |
void | au_free_authorization_cache (void *cache) |
void | au_reset_authorization_caches (void) |
MOP | au_find_user (const char *user_name) |
int | au_find_user_to_drop (const char *user_name, MOP *user) |
void | au_find_user_method (MOP class_mop, DB_VALUE *returnval, DB_VALUE *name) |
int | au_force_write_new_auth (void) |
int | au_delete_auth_of_dropping_table (const char *class_name) |
bool | au_is_dba_group_member (MOP user) |
MOP | au_add_user (const char *name, int *exists) |
void | au_add_user_method (MOP class_mop, DB_VALUE *returnval, DB_VALUE *name, DB_VALUE *password) |
char * | au_user_name_dup (void) |
int | au_set_password (MOP user, const char *password) |
void | au_set_password_method (MOP user, DB_VALUE *returnval, DB_VALUE *password) |
void | au_set_password_encoded_method (MOP user, DB_VALUE *returnval, DB_VALUE *password) |
void | au_set_password_encoded_sha1_method (MOP user, DB_VALUE *returnval, DB_VALUE *password) |
int | au_set_user_comment (MOP user, const char *comment) |
int | au_add_member (MOP group, MOP member) |
void | au_add_member_method (MOP user, DB_VALUE *returnval, DB_VALUE *memval) |
int | au_drop_member (MOP group, MOP member) |
void | au_drop_member_method (MOP user, DB_VALUE *returnval, DB_VALUE *memval) |
int | au_drop_user (MOP user) |
void | au_drop_user_method (MOP root, DB_VALUE *returnval, DB_VALUE *name) |
int | au_grant (MOP user, MOP class_mop, DB_AUTH type, bool grant_option) |
int | au_revoke (MOP user, MOP class_mop, DB_AUTH type) |
int | au_change_owner (MOP classmop, MOP owner) |
void | au_change_owner_method (MOP obj, DB_VALUE *returnval, DB_VALUE *class_, DB_VALUE *owner) |
void | au_change_serial_owner_method (MOP obj, DB_VALUE *returnval, DB_VALUE *serial, DB_VALUE *owner) |
int | au_change_trigger_owner (MOP trigger, MOP owner) |
void | au_change_trigger_owner_method (MOP obj, DB_VALUE *returnval, DB_VALUE *trigger, DB_VALUE *owner) |
MOP | au_get_class_owner (MOP classmop) |
void | au_get_owner_method (MOP obj, DB_VALUE *returnval, DB_VALUE *class_) |
void | au_check_authorization_method (MOP obj, DB_VALUE *returnval, DB_VALUE *class_, DB_VALUE *auth) |
int | au_add_method_check_authorization (void) |
int | au_change_sp_owner (MOP sp, MOP owner) |
void | au_change_sp_owner_method (MOP obj, DB_VALUE *returnval, DB_VALUE *sp, DB_VALUE *owner) |
int | au_check_user (void) |
const char * | au_user_name (void) |
bool | au_has_user_name (void) |
int | au_fetch_class (MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type) |
int | au_fetch_class_by_instancemop (MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type) |
int | au_fetch_class_by_classmop (MOP op, SM_CLASS **class_ptr, AU_FETCHMODE fetchmode, DB_AUTH type) |
int | au_fetch_class_force (MOP op, SM_CLASS **class_, AU_FETCHMODE fetchmode) |
int | au_check_authorization (MOP op, DB_AUTH auth) |
int | au_fetch_instance (MOP op, MOBJ *obj_ptr, AU_FETCHMODE mode, LC_FETCH_VERSION_TYPE fetch_version_type, DB_AUTH type) |
int | au_fetch_instance_force (MOP op, MOBJ *obj_ptr, AU_FETCHMODE fetchmode, LC_FETCH_VERSION_TYPE fetch_version_type) |
void | au_disable_passwords (void) |
int | au_set_user (MOP newuser) |
int | au_login (const char *name, const char *password, bool ignore_dba_privilege) |
void | au_login_method (MOP class_mop, DB_VALUE *returnval, DB_VALUE *user, DB_VALUE *password) |
int | au_start (void) |
char * | au_get_user_name (MOP obj) |
int | au_export_users (print_output &output_ctx) |
int | au_export_grants (print_output &output_ctx, MOP class_mop) |
void | au_dump_auth (FILE *fp) |
void | au_dump_user (MOP user, FILE *fp) |
void | au_dump_to_file (FILE *fp) |
void | au_dump (void) |
void | au_describe_user_method (MOP user, DB_VALUE *returnval) |
void | au_info_method (MOP class_mop, DB_VALUE *returnval, DB_VALUE *info) |
void | au_describe_root_method (MOP class_mop, DB_VALUE *returnval, DB_VALUE *info) |
void | au_link_static_methods (void) |
int | au_install (void) |
void | au_init (void) |
void | au_final (void) |
int | au_get_class_privilege (DB_OBJECT *mop, unsigned int *auth) |
int | au_disable (void) |
void | au_enable (int save) |
MOP | au_get_public_user (void) |
MOP | au_get_dba_user (void) |
int | au_check_serial_authorization (MOP serial_object) |
const char * | au_get_public_user_name (void) |
const char * | au_get_user_class_name (void) |
#define AU_MAX_BIT 0x40 /* AU_EXECUTE */ |
Referenced by class_grant_loop().
#define AU_MIN_BIT 1 /* AU_SELECT */ |
Referenced by class_grant_loop().
#define ENCODE_PREFIX_DEFAULT (char)0 |
Definition at line 136 of file authenticate.c.
#define ENCODE_PREFIX_DES (char)1 |
Definition at line 137 of file authenticate.c.
Referenced by au_export_users(), au_set_password_encoded_method(), and encrypt_password().
#define ENCODE_PREFIX_SHA1 (char)2 |
Definition at line 138 of file authenticate.c.
Referenced by au_export_users(), au_set_password_encoded_sha1_method(), and encrypt_password_sha1().
#define ENCODE_PREFIX_SHA2_512 (char)3 |
Definition at line 139 of file authenticate.c.
Referenced by au_export_users(), au_set_password(), au_set_password_encoded_sha1_method(), and encrypt_password_sha2_512().
#define GRANT_ENTRY_CACHE | ( | index | ) | ((index) + 2) |
Definition at line 133 of file authenticate.c.
Referenced by add_grant_entry(), apply_grants(), au_force_write_new_auth(), au_grant(), au_print_grant_entry(), au_propagate_del_new_auth(), build_class_grant_list(), collect_class_grants(), get_grants(), and propagate_revoke().
#define GRANT_ENTRY_CLASS | ( | index | ) | (index ) |
Definition at line 131 of file authenticate.c.
Referenced by add_grant_entry(), apply_grants(), au_dump_user(), au_force_write_new_auth(), au_print_grant_entry(), au_propagate_del_new_auth(), build_class_grant_list(), collect_class_grants(), find_grant_entry(), and get_grants().
#define GRANT_ENTRY_LENGTH 3 |
Definition at line 130 of file authenticate.c.
Referenced by apply_grants(), au_dump_user(), au_force_write_new_auth(), au_print_auth(), build_class_grant_list(), collect_class_grants(), drop_grant_entry(), find_grant_entry(), get_grants(), and propagate_revoke().
#define GRANT_ENTRY_SOURCE | ( | index | ) | ((index) + 1) |
Definition at line 132 of file authenticate.c.
Referenced by add_grant_entry(), au_force_write_new_auth(), au_print_grant_entry(), build_class_grant_list(), collect_class_grants(), find_grant_entry(), and get_grants().
#define IS_CATALOG_CLASS | ( | name | ) |
Definition at line 150 of file authenticate.c.
Referenced by is_protected_class().
#define IS_ENCODED_ANY | ( | string | ) | (IS_ENCODED_SHA2_512 (string) || IS_ENCODED_SHA1 (string) || IS_ENCODED_DES (string)) |
Definition at line 143 of file authenticate.c.
Referenced by match_password().
#define IS_ENCODED_DES | ( | string | ) | (string[0] == ENCODE_PREFIX_DES) |
Definition at line 140 of file authenticate.c.
Referenced by au_export_users(), and match_password().
#define IS_ENCODED_SHA1 | ( | string | ) | (string[0] == ENCODE_PREFIX_SHA1) |
Definition at line 141 of file authenticate.c.
Referenced by au_export_users(), and match_password().
#define IS_ENCODED_SHA2_512 | ( | string | ) | (string[0] == ENCODE_PREFIX_SHA2_512) |
Definition at line 142 of file authenticate.c.
Referenced by au_export_users(), au_set_password_encoded_sha1_method(), and match_password().
#define IS_STRING | ( | n | ) | DB_IS_STRING (n) |
Definition at line 147 of file authenticate.c.
Referenced by au_add_member_method(), au_add_user_method(), au_change_owner_method(), au_change_serial_owner_method(), au_change_sp_owner_method(), au_change_trigger_owner_method(), au_check_authorization_method(), au_drop_member_method(), au_drop_user_method(), au_find_user_method(), au_get_new_auth(), au_get_owner_method(), au_get_user_name(), au_info_method(), au_login_method(), au_perform_login(), au_set_password_encoded_method(), au_set_password_encoded_sha1_method(), au_set_password_method(), and au_user_name().
#define MSGCAT_AUTH_AUTH_TITLE 15 |
Definition at line 98 of file authenticate.c.
Referenced by au_dump_to_file().
#define MSGCAT_AUTH_CLASS_NAME 2 |
Definition at line 85 of file authenticate.c.
Referenced by au_print_grant_entry().
#define MSGCAT_AUTH_CURRENT_USER 11 |
Definition at line 94 of file authenticate.c.
Referenced by au_dump_to_file().
#define MSGCAT_AUTH_FROM_USER 3 |
Definition at line 86 of file authenticate.c.
Referenced by au_print_grant_entry().
#define MSGCAT_AUTH_GRANT_DUMP_ERROR 14 |
Definition at line 97 of file authenticate.c.
Referenced by au_export_grants().
#define MSGCAT_AUTH_INVALID_CACHE 1 |
Definition at line 84 of file authenticate.c.
Referenced by au_print_cache().
#define MSGCAT_AUTH_ROOT_TITLE 12 |
Definition at line 95 of file authenticate.c.
#define MSGCAT_AUTH_ROOT_USERS 13 |
Definition at line 96 of file authenticate.c.
Referenced by au_dump_to_file().
#define MSGCAT_AUTH_UNDEFINED_USER 5 |
Definition at line 88 of file authenticate.c.
Referenced by au_print_auth().
#define MSGCAT_AUTH_USER_DIRECT_GROUPS 16 |
Definition at line 99 of file authenticate.c.
Referenced by au_dump_user().
#define MSGCAT_AUTH_USER_GROUPS 9 |
Definition at line 92 of file authenticate.c.
Referenced by au_dump_user().
#define MSGCAT_AUTH_USER_ID 7 |
Definition at line 90 of file authenticate.c.
#define MSGCAT_AUTH_USER_MEMBERS 8 |
Definition at line 91 of file authenticate.c.
#define MSGCAT_AUTH_USER_NAME 6 |
Definition at line 89 of file authenticate.c.
Referenced by au_dump_user().
#define MSGCAT_AUTH_USER_NAME2 10 |
Definition at line 93 of file authenticate.c.
Referenced by au_dump_user().
#define MSGCAT_AUTH_USER_TITLE 4 |
Definition at line 87 of file authenticate.c.
Referenced by au_print_auth().
#define PASSWORD_ENCRYPTION_SEED "U9a$y1@zw~a0%" |
Definition at line 135 of file authenticate.c.
Referenced by encrypt_password().
typedef struct au_class_cache AU_CLASS_CACHE |
Definition at line 223 of file authenticate.c.
Definition at line 193 of file authenticate.c.
typedef struct au_user_cache AU_USER_CACHE |
Definition at line 240 of file authenticate.c.
typedef struct class_auth CLASS_AUTH |
Definition at line 284 of file authenticate.c.
typedef struct class_grant CLASS_GRANT |
Definition at line 254 of file authenticate.c.
typedef struct class_user CLASS_USER |
Definition at line 268 of file authenticate.c.
Definition at line 185 of file authenticate.c.
enum fetch_by |
Enumerator | |
---|---|
DONT_KNOW | |
BY_INSTANCE_MOP | |
BY_CLASS_MOP |
Definition at line 179 of file authenticate.c.
|
static |
Definition at line 7337 of file authenticate.c.
References assert, class_grant::cache, er_errid(), find_or_add_user(), class_user::grants, make_class_grant(), class_grant::next, NO_ERROR, NULL, class_user::obj, class_grant::user, and ws_is_same_object().
Referenced by build_class_grant_list().
Definition at line 3744 of file authenticate.c.
References db_make_int(), db_make_object(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_SOURCE, set_put_element(), and set_size().
Referenced by au_grant().
Definition at line 3986 of file authenticate.c.
References db_get_int(), db_get_object(), error(), get_grants(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, au_grant::grants, i, NO_ERROR, set_free(), set_get_element(), and set_size().
Referenced by update_cache().
|
static |
Definition at line 4194 of file authenticate.c.
References AU_ALTER, AU_DELETE, AU_EXECUTE, AU_GRANT_SHIFT, AU_INDEX, AU_INSERT, AU_SELECT, AU_UPDATE, ER_AU_ALTER_FAILURE, ER_AU_AUTHORIZATION_FAILURE, ER_AU_DELETE_FAILURE, ER_AU_EXECUTE_FAILURE, ER_AU_INDEX_FAILURE, ER_AU_INSERT_FAILURE, ER_AU_NO_GRANT_OPTION, ER_AU_SELECT_FAILURE, ER_AU_UPDATE_FAILURE, error(), i, and NO_ERROR.
Referenced by check_authorization(), and check_grant_option().
Definition at line 2861 of file authenticate.c.
References au_get_set(), db_get_object(), DB_IS_NULL, db_set_add(), error(), NO_ERROR, NULL, set_cardinality(), set_free(), and set_get_element().
Referenced by au_compute_groups(), and au_drop_user().
Definition at line 3134 of file authenticate.c.
References au_add_member_internal().
Referenced by au_add_member_method(), db_add_member(), and parse_user_define_line().
Definition at line 3033 of file authenticate.c.
References ARG_FILE_LINE, au_compute_groups(), AU_DISABLE, AU_ENABLE, au_get_set(), db_get(), db_get_string(), DB_IS_NULL, db_make_object(), db_set_add(), db_value_clear(), ER_AU_MEMBER_CAUSES_CYCLES, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, NULL, obj_inst_lock(), set_free(), and set_ismember().
Referenced by au_add_member(), and au_add_user().
Definition at line 3147 of file authenticate.c.
References ARG_FILE_LINE, assert, au_add_member(), au_find_user(), au_is_dba_group_member(), db_get_object(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_AU_INVALID_USER, ER_AU_NOT_OWNER, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, and ws_is_same_object().
int au_add_method_check_authorization | ( | void | ) |
Definition at line 5595 of file authenticate.c.
References AU_ALTER, AU_AUTH_CLASS_NAME, AU_DISABLE, AU_ENABLE, AU_EXECUTE, au_grant(), db_find_class(), ER_FAILED, NO_ERROR, NULL, sm_update_class(), smt_add_class_method(), smt_assign_argument_domain(), and smt_edit_class_mop().
Referenced by au_install(), and catcls_vclass_install().
Definition at line 2153 of file authenticate.c.
References ARG_FILE_LINE, au_add_member_internal(), AU_DISABLE, AU_ENABLE, au_find_user(), au_get_set(), au_is_dba_group_member(), au_make_user(), check_user_name(), db_make_object(), db_set_add(), ER_AU_CANT_ADD_MEMBER, ER_AU_DBA_ONLY, ER_AU_INVALID_USER, ER_AU_INVALID_USER_NAME, er_clear(), er_errid(), ER_ERROR_SEVERITY, er_set(), ER_WARNING_SEVERITY, NO_ERROR, NULL, set_free(), set_ismember(), and au_grant::user.
Referenced by au_add_user_method(), au_install(), db_add_user(), and parse_user_define_line().
void au_add_user_method | ( | MOP | class_mop, |
DB_VALUE * | returnval, | ||
DB_VALUE * | name, | ||
DB_VALUE * | password | ||
) |
Definition at line 2250 of file authenticate.c.
References ARG_FILE_LINE, au_add_user(), AU_MAX_PASSWORD_CHARS, au_set_password(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_object(), DB_MAX_USER_LENGTH, ER_AU_INVALID_USER, ER_AU_PASSWORD_OVERFLOW, ER_AU_USER_EXISTS, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_USER_NAME_TOO_LONG, ER_WARNING_SEVERITY, error(), intl_identifier_upper_string_size(), IS_STRING, NO_ERROR, NULL, strlen, and au_grant::user.
Definition at line 5114 of file authenticate.c.
References ARG_FILE_LINE, sm_class::attributes, au_change_serial_owner(), AU_DISABLE, AU_ENABLE, au_fetch_class_force(), AU_FETCH_UPDATE, au_is_dba_group_member(), sm_attribute::auto_increment, ER_AU_DBA_ONLY, er_set(), ER_WARNING_SEVERITY, error(), sm_attribute::header, locator_flush_class(), sm_component::next, NO_ERROR, NULL, and sm_class::owner.
Referenced by au_change_owner_method(), au_install(), boot_define_attribute(), boot_define_charsets(), boot_define_class(), boot_define_class_authorization(), boot_define_collations(), boot_define_data_type(), boot_define_domain(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_index(), boot_define_index_key(), boot_define_meth_argument(), boot_define_meth_file(), boot_define_meth_sig(), boot_define_method(), boot_define_partition(), boot_define_query_spec(), boot_define_serial(), boot_define_stored_procedure(), boot_define_stored_procedure_arguments(), boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), and boot_define_view_vclass().
Definition at line 5167 of file authenticate.c.
References ARG_FILE_LINE, au_change_owner(), au_fetch_class_force(), AU_FETCH_UPDATE, au_find_user(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), DB_NOT_PARTITIONED_CLASS, DB_PARTITION_CLASS, ER_AU_CANT_ALTER_OWNER_OF_SYSTEM_CLASS, ER_AU_INVALID_CLASS, ER_AU_INVALID_USER, er_errid(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, ER_NOT_ALLOWED_ACCESS_TO_PARTITION, er_set(), ER_WARNING_SEVERITY, error(), free_and_init, i, IS_STRING, NO_ERROR, NULL, sm_find_class(), sm_issystem(), sm_partitioned_class_type(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_PARTITION_SAVEPOINT_OWNER, and au_grant::user.
Referenced by do_alter_change_owner().
Definition at line 5280 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), db_make_object(), dbt_abort_object(), dbt_edit_object(), dbt_finish_object(), dbt_put_internal(), ER_AU_DBA_ONLY, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, NULL, and pr_clear_value().
Referenced by au_change_owner(), and au_change_serial_owner_method().
void au_change_serial_owner_method | ( | MOP | obj, |
DB_VALUE * | returnval, | ||
DB_VALUE * | serial, | ||
DB_VALUE * | owner | ||
) |
Definition at line 5340 of file authenticate.c.
References ARG_FILE_LINE, au_change_serial_owner(), au_find_user(), CT_SERIAL_NAME, db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), do_get_serial_obj_id(), ER_AU_INVALID_USER, er_errid(), ER_OBJ_INVALID_ARGUMENT, ER_QPROC_SERIAL_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, and sm_find_class().
Definition at line 5638 of file authenticate.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), db_make_object(), ER_AU_DBA_ONLY, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, obj_set(), and SP_ATTR_OWNER.
Referenced by au_change_sp_owner_method().
Definition at line 5674 of file authenticate.c.
References ARG_FILE_LINE, au_change_sp_owner(), au_find_user(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), ER_AU_INVALID_USER, er_errid(), er_set(), ER_SP_NOT_EXIST, ER_WARNING_SEVERITY, error(), IS_STRING, jsp_find_stored_procedure(), NO_ERROR, NULL, and au_grant::user.
Definition at line 5396 of file authenticate.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), db_make_object(), ER_AU_DBA_ONLY, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, obj_set(), and TR_ATT_OWNER.
Referenced by au_change_trigger_owner_method().
void au_change_trigger_owner_method | ( | MOP | obj, |
DB_VALUE * | returnval, | ||
DB_VALUE * | trigger, | ||
DB_VALUE * | owner | ||
) |
Definition at line 5431 of file authenticate.c.
References ARG_FILE_LINE, au_change_trigger_owner(), au_find_user(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), ER_AU_INVALID_USER, er_errid(), er_set(), ER_TR_TRIGGER_NOT_FOUND, ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, tr_find_trigger(), and au_grant::user.
Referenced by do_alter_trigger().
Definition at line 6246 of file authenticate.c.
References Au_disable, au_fetch_class(), AU_FETCH_READ, error(), and NO_ERROR.
Referenced by au_check_authorization_method(), check_authorization(), check_target(), do_update_stats(), and load_has_authorization().
void au_check_authorization_method | ( | MOP | obj, |
DB_VALUE * | returnval, | ||
DB_VALUE * | class_, | ||
DB_VALUE * | auth | ||
) |
Definition at line 5562 of file authenticate.c.
References ARG_FILE_LINE, au_check_authorization(), db_get_int(), db_get_string(), DB_IS_NULL, db_make_int(), db_make_null(), ER_AU_INVALID_CLASS, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, and sm_find_class().
int au_check_serial_authorization | ( | MOP | serial_object | ) |
Definition at line 8664 of file authenticate.c.
References ARG_FILE_LINE, au_get_set(), au_is_dba_group_member(), db_get(), db_get_object(), DB_IS_NULL, ER_QPROC_CANNOT_UPDATE_SERIAL, er_set(), ER_WARNING_SEVERITY, NO_ERROR, pr_clear_value(), set_free(), set_ismember(), and ws_is_same_object().
Referenced by dbt_drop_attribute(), do_alter_serial(), do_change_att_schema_only(), and do_drop_serial().
int au_check_user | ( | void | ) |
Definition at line 5722 of file authenticate.c.
References ARG_FILE_LINE, ER_AU_INVALID_USER, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, and NULL.
Referenced by db_get_all_chosen_classes(), sm_fetch_all_base_classes(), sm_fetch_all_classes(), and sm_mark_system_classes().
Definition at line 2905 of file authenticate.c.
References assert, au_add_direct_groups(), au_get_set(), db_close_session(), db_compile_statement(), DB_CURSOR_SUCCESS, db_execute_statement_local(), db_get_object(), DB_IS_NULL, db_make_object(), db_make_set(), db_make_string(), db_open_buffer(), db_push_values(), db_query_end(), db_query_get_tuple_value(), db_query_next_tuple(), er_errid(), error(), NO_ERROR, NULL, obj_set(), set_cardinality(), set_create_basic(), set_free(), set_get_element(), and au_grant::user.
Referenced by au_add_member_internal(), and au_drop_member().
int au_delete_auth_of_dropping_table | ( | const char * | class_name | ) |
Definition at line 2012 of file authenticate.c.
References assert, ASSERT_ERROR_AND_SET, AU_DISABLE, AU_ENABLE, CT_CLASS_NAME, CT_CLASSAUTH_NAME, db_close_session(), db_compile_statement_local(), db_execute_statement_local(), db_make_null(), db_make_string(), db_open_buffer_local(), db_push_values(), db_query_end(), db_set_system_generated_statement(), error(), NO_ERROR, NULL, and pr_clear_value().
Referenced by sm_delete_class_mop().
Definition at line 1824 of file authenticate.c.
References assert, au_get_new_auth(), DB_AUTH_EXECUTE, er_errid(), error(), NO_ERROR, NULL, obj_delete(), and obj_inst_lock().
Referenced by au_propagate_del_new_auth(), and au_revoke().
Definition at line 8168 of file authenticate.c.
References au_dump(), au_info_method(), db_make_null(), and NULL.
Definition at line 8114 of file authenticate.c.
References au_dump_user(), db_make_null(), and NULL.
int au_disable | ( | void | ) |
Definition at line 8619 of file authenticate.c.
References Au_disable.
Referenced by csql(), csql_do_session_cmd(), and main().
void au_disable_passwords | ( | void | ) |
Definition at line 6472 of file authenticate.c.
References Au_ignore_passwords.
Definition at line 3228 of file authenticate.c.
References ARG_FILE_LINE, au_compute_groups(), AU_DISABLE, AU_ENABLE, au_get_set(), db_get(), db_get_string(), DB_IS_NULL, db_make_object(), db_set_drop(), db_value_clear(), ER_AU_MEMBER_NOT_FOUND, er_set(), ER_WARNING_SEVERITY, error(), NO_ERROR, NULL, obj_inst_lock(), set_free(), and set_ismember().
Referenced by au_drop_member_method(), and db_drop_member().
Definition at line 3298 of file authenticate.c.
References ARG_FILE_LINE, assert, au_drop_member(), au_find_user(), au_is_dba_group_member(), db_get_object(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_AU_INVALID_USER, ER_AU_NOT_OWNER, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, and ws_is_same_object().
int au_drop_user | ( | MOP | user | ) |
Definition at line 3378 of file authenticate.c.
References ARG_FILE_LINE, assert, au_add_direct_groups(), AU_DISABLE, AU_ENABLE, au_get_set(), au_is_dba_group_member(), db_close_session(), db_compile_statement(), DB_CURSOR_SUCCESS, db_execute_statement_local(), db_get_int(), db_get_object(), db_get_string(), DB_IS_NULL, db_make_int(), db_make_null(), db_make_object(), db_make_set(), db_open_buffer(), db_push_values(), db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), db_query_next_tuple(), db_set_add(), ER_AU_CANT_DROP_USER, ER_AU_DBA_ONLY, ER_AU_USER_HAS_DATABASE_OBJECTS, er_errid(), ER_ERROR_SEVERITY, er_set(), ER_WARNING_SEVERITY, error(), i, NO_ERROR, NULL, obj_delete(), obj_get(), obj_set(), pr_clear_value(), remove_user_cache_references(), set_cardinality(), set_create_basic(), set_free(), set_get_element(), and ws_is_same_object().
Referenced by au_drop_user_method(), au_install(), and db_drop_user().
Definition at line 3655 of file authenticate.c.
References ARG_FILE_LINE, assert, au_drop_user(), au_find_user_to_drop(), au_is_dba_group_member(), db_get_string(), db_make_error(), db_make_null(), ER_AU_DBA_ONLY, ER_AU_INVALID_USER, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, and NULL.
void au_dump | ( | void | ) |
Definition at line 8100 of file authenticate.c.
References au_dump_to_file().
Referenced by au_describe_root_method().
void au_dump_auth | ( | FILE * | fp | ) |
Definition at line 7821 of file authenticate.c.
References au_get_object(), au_print_auth(), AU_USER_CLASS_NAME, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_object(), db_query_end(), db_query_get_tuple_value(), db_query_next_tuple(), error(), free_and_init, NO_ERROR, strlen, and au_grant::user.
Referenced by au_dump_to_file().
void au_dump_to_file | ( | FILE * | fp | ) |
Definition at line 8026 of file authenticate.c.
References au_dump_auth(), au_dump_user(), AU_USER_CLASS_NAME, Au_user_name, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_object(), db_get_string(), db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), db_query_next_tuple(), error(), free_and_init, MSGCAT_AUTH_AUTH_TITLE, MSGCAT_AUTH_CURRENT_USER, MSGCAT_AUTH_ROOT_USERS, MSGCAT_CATALOG_CUBRID, msgcat_message(), MSGCAT_SET_AUTHORIZATION, NO_ERROR, NULL, obj_get(), pr_clear_value(), strlen, and au_grant::user.
Referenced by au_dump(), and createdb().
void au_dump_user | ( | MOP | user, |
FILE * | fp | ||
) |
Definition at line 7869 of file authenticate.c.
References au_get_object(), au_get_set(), au_print_auth(), au_print_grant_entry(), AU_USER_CLASS_NAME, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_object(), db_get_string(), db_query_end(), db_query_get_tuple_value(), db_query_next_tuple(), error(), free_and_init, get_grants(), GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, au_grant::grants, i, MSGCAT_AUTH_USER_DIRECT_GROUPS, MSGCAT_AUTH_USER_GROUPS, MSGCAT_AUTH_USER_NAME, MSGCAT_AUTH_USER_NAME2, MSGCAT_CATALOG_CUBRID, msgcat_message(), MSGCAT_SET_AUTHORIZATION, NO_ERROR, NULL, obj_get(), pr_clear_value(), set_cardinality(), set_free(), set_get_element(), set_size(), strlen, and au_grant::user.
Referenced by au_describe_user_method(), and au_dump_to_file().
void au_enable | ( | int | save | ) |
Definition at line 8632 of file authenticate.c.
References Au_disable.
int au_export_grants | ( | print_output & | output_ctx, |
MOP | class_mop | ||
) |
Definition at line 7645 of file authenticate.c.
References ARG_FILE_LINE, AU_FULL_AUTHORIZATION, au_get_class_owner(), au_get_user_name(), class_user::available_auth, build_class_grant_list(), class_grant_loop(), class_auth::class_mop, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), error(), find_or_add_user(), free_class_users(), class_user::grants, MSGCAT_AUTH_GRANT_DUMP_ERROR, MSGCAT_CATALOG_CUBRID, msgcat_message(), MSGCAT_SET_AUTHORIZATION, class_user::next, NO_ERROR, NULL, class_user::obj, class_auth::owner, class_auth::users, and ws_free_string().
Referenced by emit_schema().
int au_export_users | ( | print_output & | output_ctx | ) |
Definition at line 6934 of file authenticate.c.
References ARG_FILE_LINE, au_get_set(), au_get_user_name(), AU_MAX_PASSWORD_BUF, AU_USER_CLASS_NAME, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_object(), db_get_string(), DB_IS_NULL, DB_IS_STRING, db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), db_query_next_tuple(), ENCODE_PREFIX_DES, ENCODE_PREFIX_SHA1, ENCODE_PREFIX_SHA2_512, encrypt_password_sha2_512(), ER_ERROR_SEVERITY, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, help_print_describe_comment(), IS_ENCODED_DES, IS_ENCODED_SHA1, IS_ENCODED_SHA2_512, NO_ERROR, NULL, obj_get(), set_cardinality(), set_free(), set_get_element(), strlen, ws_free_string(), and ws_is_same_object().
Referenced by extract_classes().
|
static |
Definition at line 820 of file authenticate.c.
References assert, Au_cache_depth, Au_cache_increment, Au_cache_max, au_free_class_cache(), au_make_class_cache(), sm_class::auth_cache, au_class_cache::class_, au_class_cache::data, er_errid(), error(), i, au_grant::next, au_class_cache::next, NO_ERROR, and NULL.
Referenced by au_find_user_cache_index().
int au_fetch_class | ( | MOP | op, |
SM_CLASS ** | class_ptr, | ||
AU_FETCHMODE | fetchmode, | ||
DB_AUTH | type | ||
) |
Definition at line 6174 of file authenticate.c.
References au_fetch_class_internal(), and DONT_KNOW.
Referenced by adjust_partition_range(), adjust_partition_size(), api_rmeta_get_info(), au_check_authorization(), check_resolution_name(), db_check_authorization(), db_check_authorization_and_grant_option(), db_find_class_of_index(), db_get_attribute(), db_get_attribute_domain(), db_get_attribute_names(), db_get_attributes(), db_get_class_attribute(), db_get_class_attribute_names(), db_get_class_attributes(), db_get_class_method(), db_get_class_method_names(), db_get_class_methods(), db_get_class_resolutions(), db_get_constraints(), db_get_loader_commands(), db_get_method(), db_get_method_file_names(), db_get_method_files(), db_get_method_function(), db_get_method_names(), db_get_methods(), db_get_ordered_attribute_names(), db_get_ordered_attributes(), db_get_query_specs(), db_get_resolutions(), db_get_shared_attribute(), db_get_shared_attribute_names(), db_get_subclass_names(), db_get_subclasses(), db_get_superclass_names(), db_get_superclasses(), db_is_updatable_attribute(), db_is_updatable_object(), db_seq_create(), db_set_create(), db_set_create_basic(), db_set_create_multi(), do_alter_index_rebuild(), do_alter_partitioning_pre(), do_coalesce_partition_post(), do_coalesce_partition_pre(), do_create_partition(), do_create_partition_constraint(), do_create_trigger(), do_drop_partition_list(), do_drop_partitioned_class(), do_get_partition_keycol(), do_get_partition_parent(), do_get_partition_size(), do_is_partitioned_subclass(), do_promote_partition_by_name(), do_promote_partition_list(), do_recreate_renamed_class_indexes(), do_remove_partition_pre(), do_rename_partition(), do_reorganize_partition_post(), do_save_all_indexes(), emit_index_def(), emit_partition_info(), extract_objects(), fetch_descriptor_class(), find_attribute(), find_attribute_op(), find_shared_attribute(), help_describe_mop(), object_description::init(), class_description::init(), is_replace_or_odku_allowed(), la_repl_add_object(), ldr_act_add_class_all_attrs(), ldr_act_check_missing_non_null_attrs(), locator_mflush_force(), lock_supers(), lock_supers_drop(), make_template(), obj_class_lock(), obj_copy(), obj_delete(), obj_find_multi_attr(), obj_find_multi_desc(), obj_find_object_by_pkey(), obj_find_unique(), obj_inst_lock(), obj_locate_attribute(), obj_send_array(), obj_send_list(), obj_send_va(), obt_find_attribute(), pt_check_alter_partition(), pt_check_filter_index_expr(), pt_check_partitions(), pt_make_flat_name_list(), pt_resolve_using_index(), pt_spec_to_xasl_class_oid_list(), pt_to_insert_xasl(), pt_to_merge_insert_xasl(), pt_to_pred_expr(), sm_add_trigger(), sm_att_info(), sm_check_index_exist(), sm_class_check_uniques(), sm_class_constraints(), sm_class_has_triggers(), sm_delete_class_mop(), sm_drop_constraint(), sm_drop_index(), sm_drop_trigger(), sm_exist_index(), sm_fetch_all_objects_internal(), sm_find_index(), sm_force_method_link(), sm_get_att_name(), sm_get_attribute_descriptor(), sm_get_ch_heap(), sm_get_ch_name(), sm_get_class(), sm_get_class_repid(), sm_get_class_with_statistics(), sm_get_index(), sm_get_method_descriptor(), sm_get_method_source_file(), sm_get_statistics_force(), sm_get_trigger_cache(), sm_invalidate_trigger_cache(), sm_is_partition(), sm_is_subclass(), sm_load_online_index(), sm_object_size_quick(), sm_partitioned_class_type(), sm_prelink_methods(), sm_rename_class(), sm_truncate_class(), sm_truncate_using_delete(), smt_check_foreign_key(), smt_check_index_exist(), smt_copy_class_mop(), smt_delete_super_connect(), smt_edit_class_mop(), smt_find_constraint(), truncate_need_repl_log(), unloaddb(), update_class(), and update_object_tuple().
int au_fetch_class_by_classmop | ( | MOP | op, |
SM_CLASS ** | class_ptr, | ||
AU_FETCHMODE | fetchmode, | ||
DB_AUTH | type | ||
) |
Definition at line 6206 of file authenticate.c.
References au_fetch_class_internal(), and BY_CLASS_MOP.
Referenced by sm_class_has_unique_constraint(), sm_exist_index(), and sm_find_subclass_in_hierarchy().
int au_fetch_class_by_instancemop | ( | MOP | op, |
SM_CLASS ** | class_ptr, | ||
AU_FETCHMODE | fetchmode, | ||
DB_AUTH | type | ||
) |
Definition at line 6190 of file authenticate.c.
References au_fetch_class_internal(), and BY_INSTANCE_MOP.
int au_fetch_class_force | ( | MOP | op, |
SM_CLASS ** | class_, | ||
AU_FETCHMODE | fetchmode | ||
) |
Definition at line 6223 of file authenticate.c.
References DONT_KNOW, and fetch_class().
Referenced by abort_subclasses(), allocate_unique_constraint(), alter_trigger_hierarchy(), annotate_method_files(), au_change_owner(), au_change_owner_method(), au_get_class_owner(), au_grant(), au_revoke(), check_domain_class_type(), check_for_cons(), check_resolution_target(), classobj_copy_constraint_like(), classobj_copy_props(), classobj_is_exist_foreign_key_ref(), collect_hier_class_info(), db_get_attribute_force(), db_get_attributes_force(), db_is_any_class(), db_is_class(), db_is_vclass(), object_printer::describe_constraint(), do_evaluate_default_expr(), domain_search(), drop_foreign_key_ref_internal(), emit_schema(), fill_in_insert_default_function_arguments(), find_superclass(), flatten_method_files(), flatten_properties(), flatten_subclasses(), flatten_trigger_cache(), get_candidates(), inherit_constraint(), lock_subclasses_internal(), obj_get_att(), object_to_trigger(), pt_append_omitted_on_update_expr_assignments(), pt_bind_names_post(), pt_check_show_index(), pt_check_table_in_show_heap(), pt_find_omitted_default_expr(), pt_flush_classes(), pt_has_modified_class_helper(), pt_make_subclass_list(), pt_resolve_partition_spec(), retain_former_ids(), sm_check_class_domain(), sm_check_reuse_oid_class(), sm_coerce_object_domain(), sm_destroy_representations(), sm_fetch_all_base_classes(), sm_get_ch_name(), sm_get_class_collation(), sm_get_class_flag(), sm_get_class_tde_algorithm(), sm_is_nested_view_recached(), sm_is_partitioned_class(), sm_is_reuse_oid_class(), sm_mark_system_class(), sm_mark_system_classes(), sm_save_constraint_info(), sm_set_class_collation(), sm_set_class_comment(), sm_set_class_flag(), sm_set_class_tde_algorithm(), sm_update_statistics(), sm_virtual_queries(), smt_find_owner_of_constraint(), update_foreign_key_ref(), update_subclasses(), update_supers(), update_supers_drop(), vid_build_non_upd_object(), vid_compare_non_updatable_objects(), and ws_update_oid_and_class().
|
static |
Definition at line 6089 of file authenticate.c.
References ARG_FILE_LINE, assert, Au_disable, AU_FETCH_READ, check_authorization(), db_object::class_mop, ER_AU_INVALID_USER, ER_ERROR_SEVERITY, ER_OBJ_INVALID_ARGUMENTS, er_set(), ER_WARNING_SEVERITY, error(), fetch_class(), locator_is_root(), db_object::lock, NO_ERROR, NULL, db_object::object, OID_ISNULL, OID_ISTEMP, SCH_S_LOCK, sm_ch_rep_dir(), sm_check_catalog_rep_dir(), sm_Root_class_mop, WS_IS_DELETED, and WS_OID.
Referenced by au_fetch_class(), au_fetch_class_by_classmop(), and au_fetch_class_by_instancemop().
int au_fetch_instance | ( | MOP | op, |
MOBJ * | obj_ptr, | ||
AU_FETCHMODE | mode, | ||
LC_FETCH_VERSION_TYPE | fetch_version_type, | ||
DB_AUTH | type | ||
) |
Definition at line 6410 of file authenticate.c.
References ARG_FILE_LINE, Au_disable, AU_FETCH_READ, BY_INSTANCE_MOP, check_authorization(), ER_AU_INVALID_USER, ER_HEAP_UNKNOWN_OBJECT, er_set(), ER_WARNING_SEVERITY, error(), fetch_class(), fetch_instance(), NO_ERROR, NULL, and WS_SET_DELETED.
Referenced by au_grant(), au_revoke(), check_set_object(), construct_instance(), get_object_value(), object_description::init(), ldr_reset_context(), make_template(), obj_copy(), obj_delete(), obj_inst_lock(), obj_is_instance_of(), obj_isinstance(), obj_locate_attribute(), obj_set_att(), propagate_revoke(), sm_check_object_domain(), sm_coerce_object_domain(), sm_flush_and_decache_objects(), and sm_object_size_quick().
int au_fetch_instance_force | ( | MOP | op, |
MOBJ * | obj_ptr, | ||
AU_FETCHMODE | fetchmode, | ||
LC_FETCH_VERSION_TYPE | fetch_version_type | ||
) |
Definition at line 6457 of file authenticate.c.
References fetch_instance().
Referenced by access_object(), do_alter_serial(), do_update_auto_increment_serial_on_rename(), do_update_maxvalue_of_auto_increment_serial(), find_unique(), its_deleted(), obj_find_object_by_cons_and_key(), obj_find_object_by_pkey(), obj_get_att(), obj_set_att(), object_to_trigger(), obt_apply_assignments(), trigger_to_object(), validate_trigger(), vid_fetch_instance(), and vid_vobj_to_object().
void au_final | ( | void | ) |
Definition at line 8518 of file authenticate.c.
References Au_disable, flush_caches(), and NULL.
Referenced by boot_client_all_finalize(), boot_initialize_client(), and boot_restart_client().
Definition at line 1159 of file authenticate.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, AU_FETCH_READ, AU_USER_CLASS_NAME, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_find_class(), db_get_object(), DB_IS_NULL, db_make_string(), db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), ER_AU_INVALID_USER, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_OBJECT_NOT_FOUND, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), ER_WARNING_SEVERITY, error(), free_and_init, intl_identifier_upper(), intl_identifier_upper_string_size(), lang_set_parser_use_client_charset(), NO_ERROR, NULL, obj_find_unique(), and strlen.
Referenced by au_add_member_method(), au_add_user(), au_change_owner_method(), au_change_serial_owner_method(), au_change_sp_owner_method(), au_change_trigger_owner_method(), au_drop_member_method(), au_find_user_method(), au_perform_login(), au_start(), db_find_user(), la_apply_statement_log(), and parse_user_define_line().
|
static |
Definition at line 894 of file authenticate.c.
References ARG_FILE_LINE, assert, au_extend_class_caches(), Au_user_cache, ER_AU_CORRUPTED, er_errid(), ER_ERROR_SEVERITY, er_set(), error(), free_and_init, au_user_cache::index, au_user_cache::next, NO_ERROR, NULL, sm_get_class(), au_grant::user, au_user_cache::user, and ws_is_same_object().
Referenced by au_install(), and au_set_user().
Definition at line 1361 of file authenticate.c.
References ARG_FILE_LINE, au_find_user(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), db_make_object(), ER_AU_INVALID_USER, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, and au_grant::user.
Definition at line 1278 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_FETCH_WRITE, au_is_dba_group_member(), AU_USER_CLASS_NAME, db_find_class(), db_make_string(), ER_AU_DBA_ONLY, ER_AU_INVALID_USER, ER_AU_NOT_ALLOW_TO_DROP_ACTIVE_USER, er_errid(), ER_ERROR_SEVERITY, ER_OBJ_OBJECT_NOT_FOUND, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, intl_identifier_upper(), intl_identifier_upper_string_size(), log_does_active_user_exist(), NO_ERROR, NULL, and obj_find_unique().
Referenced by au_drop_user_method(), and db_find_user_to_drop().
int au_force_write_new_auth | ( | void | ) |
Definition at line 1911 of file authenticate.c.
References ARG_FILE_LINE, AU_AUTH_CLASS_NAME, AU_DISABLE, AU_ENABLE, AU_GRANT_MASK, au_insert_new_auth(), AU_TYPE_MASK, DB_FETCH_CLREAD_INSTREAD, db_get_int(), db_get_object(), db_get_set(), ER_AU_NO_AUTHORIZATION, ER_ERROR_SEVERITY, er_set(), error(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, GRANT_ENTRY_SOURCE, au_grant::grantor, au_grant::grants, ml_ext_free(), db_objlist::next, NO_ERROR, NULL, obj_get(), db_objlist::op, set_get_element(), set_size(), sm_fetch_all_objects(), and sm_find_class().
Referenced by catcls_vclass_install(), and createdb().
void au_free_authorization_cache | ( | void * | cache | ) |
Definition at line 784 of file authenticate.c.
References au_free_class_cache(), au_class_cache::next, and NULL.
|
static |
Definition at line 742 of file authenticate.c.
References free_and_init, and NULL.
Referenced by au_extend_class_caches(), au_free_authorization_cache(), and flush_caches().
Definition at line 5480 of file authenticate.c.
References Au_dba_user, au_fetch_class_force(), AU_FETCH_READ, NO_ERROR, NULL, and sm_class::owner.
Referenced by au_export_grants(), au_get_owner_method(), db_get_owner(), emit_class_owner(), and get_grants().
int au_get_class_privilege | ( | DB_OBJECT * | mop, |
unsigned int * | auth | ||
) |
Definition at line 8546 of file authenticate.c.
References assert, Au_cache_index, AU_CACHE_INVALID, Au_disable, au_install_class_cache(), sm_class::auth_cache, au_class_cache::data, er_errid(), ER_FAILED, error(), NO_ERROR, NULL, db_object::object, and update_cache().
Referenced by db_get_class_privilege().
MOP au_get_dba_user | ( | void | ) |
Definition at line 8652 of file authenticate.c.
References Au_dba_user.
Definition at line 1582 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, CT_CLASSAUTH_NAME, DB_AUTH_SELECT, db_close_session(), db_compile_statement(), DB_CURSOR_END, DB_CURSOR_SUCCESS, db_execute_statement_local(), db_get_class_name(), db_get_object(), db_get_string(), DB_IS_NULL, db_make_null(), db_make_string(), db_open_buffer(), db_push_values(), db_query_end(), db_query_first_tuple(), db_query_get_tuple_value(), db_query_next_tuple(), db_value_clear(), ER_AU_MISSING_OR_INVALID_USER, er_errid(), ER_ERROR_SEVERITY, ER_GENERIC_ERROR, er_set(), ER_SM_INVALID_CLASS, error(), i, IS_STRING, NO_ERROR, NULL, and obj_get().
Referenced by au_delete_new_auth(), and au_update_new_auth().
Definition at line 628 of file authenticate.c.
References db_get_object(), DB_IS_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_OBJ_DOMAIN_CONFLICT, error(), NO_ERROR, NULL, and obj_get().
Referenced by au_dump_auth(), au_dump_user(), au_grant(), au_revoke(), build_class_grant_list(), collect_class_grants(), and update_cache().
Definition at line 5512 of file authenticate.c.
References ARG_FILE_LINE, assert, au_get_class_owner(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), db_make_object(), ER_AU_INVALID_CLASS, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, NULL, sm_find_class(), and au_grant::user.
MOP au_get_public_user | ( | void | ) |
Definition at line 8642 of file authenticate.c.
References Au_public_user.
const char* au_get_public_user_name | ( | void | ) |
Definition at line 8706 of file authenticate.c.
References AU_PUBLIC_USER_NAME.
Referenced by uci_connect().
Definition at line 573 of file authenticate.c.
References DB_FETCH_READ, db_fetch_set(), db_get_set(), DB_IS_NULL, DB_VALUE_TYPE, ER_OBJ_DOMAIN_CONFLICT, error(), NO_ERROR, NULL, obj_get(), set_filter(), and TP_IS_SET_TYPE.
Referenced by au_add_direct_groups(), au_add_member_internal(), au_add_user(), au_check_serial_authorization(), au_compute_groups(), au_drop_member(), au_drop_user(), au_dump_user(), au_export_users(), au_is_dba_group_member(), and update_cache().
const char* au_get_user_class_name | ( | void | ) |
Definition at line 8712 of file authenticate.c.
References AU_USER_CLASS_NAME.
char* au_get_user_name | ( | MOP | obj | ) |
Definition at line 6905 of file authenticate.c.
References db_get_string(), DB_IS_NULL, db_make_null(), db_value_clear(), error(), IS_STRING, NO_ERROR, NULL, obj_get(), and ws_copy_string().
Referenced by au_export_grants(), au_export_users(), issue_grant_statement(), pt_check_union_type_compatibility_of_values_query(), and sc_set_current_schema().
Definition at line 4383 of file authenticate.c.
References add_grant_entry(), ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, au_fetch_class_force(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, au_get_object(), au_grant(), AU_GRANT_SHIFT, au_insert_new_auth(), AU_NO_AUTHORIZATION, AU_TYPE_MASK, AU_UPDATE, au_update_new_auth(), AU_USER_CLASS_NAME, catcls_Enable, check_grant_option(), DB_AUTH_NONE, db_get_int(), db_make_int(), DB_NOT_PARTITIONED_CLASS, DB_PARTITIONED_CLASS, ER_AU_ACCESS_ERROR, ER_AU_CANT_GRANT_OWNER, ER_AU_CANT_UPDATE, ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_WARNING_SEVERITY, error(), find_grant_entry(), free_and_init, get_grants(), GRANT_ENTRY_CACHE, au_grant::grants, i, LC_FETCH_MVCC_VERSION, NO_ERROR, NULL, obj_inst_lock(), sm_class::owner, reset_cache_for_user_and_class(), set_free(), set_get_element(), set_put_element(), sm_bump_local_schema_version(), sm_partitioned_class_type(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_PARTITION_SAVEPOINT_GRANT, and ws_is_same_object().
Referenced by au_add_method_check_authorization(), au_grant(), au_install(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_serial(), boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), boot_define_view_vclass(), and db_grant().
bool au_has_user_name | ( | void | ) |
Definition at line 5804 of file authenticate.c.
References Au_user_name, NULL, and strlen.
Referenced by boot_restart_client().
Definition at line 8140 of file authenticate.c.
References db_get_string(), DB_IS_NULL, db_make_null(), help_print_info(), IS_STRING, and NULL.
Referenced by au_describe_root_method().
void au_init | ( | void | ) |
Definition at line 8497 of file authenticate.c.
References Au_disable, init_caches(), and NULL.
Referenced by boot_initialize_client(), and boot_restart_client().
|
static |
Definition at line 1748 of file authenticate.c.
References au_set_new_auth(), DB_AUTH_EXECUTE, error(), NO_ERROR, and NULL.
Referenced by au_force_write_new_auth(), and au_grant().
int au_install | ( | void | ) |
Definition at line 8209 of file authenticate.c.
References au_add_method_check_authorization(), au_add_user(), AU_ALTER, AU_AUTH_CLASS_NAME, Au_cache_index, au_change_owner(), Au_dba_user, AU_DISABLE, au_drop_user(), AU_ENABLE, AU_EXECUTE, au_find_user_cache_index(), au_grant(), AU_OLD_ROOT_CLASS_NAME, AU_PASSWORD_CLASS_NAME, AU_ROOT_CLASS_NAME, AU_SELECT, AU_SET_USER, AU_USER_CLASS_NAME, db_add_constraint(), DB_CONSTRAINT_UNIQUE, db_create_class(), db_drop_class(), er_errid(), ER_FAILED, locator_create_heap_if_needed(), NO_ERROR, NULL, obj_create(), obj_delete(), sm_mark_system_class(), sm_update_class(), smt_add_attribute(), smt_add_class_method(), smt_add_method(), smt_assign_argument_domain(), and smt_edit_class_mop().
Referenced by boot_initialize_client().
|
static |
Definition at line 760 of file authenticate.c.
References Au_cache_max, Au_class_caches, au_make_class_cache(), sm_class::auth_cache, au_class_cache::class_, au_class_cache::next, and NULL.
Referenced by au_get_class_privilege(), check_authorization(), and check_grant_option().
Definition at line 2106 of file authenticate.c.
References au_get_set(), db_make_object(), db_set_read_fetch_instance_version(), LC_FETCH_DIRTY_VERSION, NO_ERROR, set_free(), set_ismember(), TM_TRAN_READ_FETCH_VERSION, and ws_is_same_object().
Referenced by au_add_member_method(), au_add_user(), au_change_owner(), au_change_serial_owner(), au_change_sp_owner(), au_change_trigger_owner(), au_check_serial_authorization(), au_drop_member_method(), au_drop_user(), au_drop_user_method(), au_find_user_to_drop(), au_perform_login(), au_set_password_internal(), au_set_user_comment(), check_authorization(), csql(), csql_do_session_cmd(), db_add_volume_ex(), db_set_system_parameters(), do_kill(), do_update_stats(), drop_stored_procedure(), jsp_alter_stored_procedure(), load_has_authorization(), loaddb_internal(), pt_check_access_status(), pt_make_query_showstmt(), tranlist(), and update_cache().
void au_link_static_methods | ( | void | ) |
Definition at line 8197 of file authenticate.c.
References db_link_static_methods().
Referenced by conn_restart_client(), and install_static_methods().
Definition at line 6662 of file authenticate.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, au_perform_login(), Au_user_name, Au_user_password_des_oldstyle, Au_user_password_sha1, Au_user_password_sha2_512, BOOT_IS_CLIENT_RESTARTED, DB_MAX_USER_LENGTH, encrypt_password(), encrypt_password_sha1(), encrypt_password_sha2_512(), ER_ERROR_SEVERITY, er_set(), ER_USER_NAME_TOO_LONG, error(), NO_ERROR, NULL, and strlen.
Referenced by au_login_method(), ci_conn_connect_impl(), db_login(), db_restart_ex(), and ux_database_connect().
Definition at line 6725 of file authenticate.c.
References ARG_FILE_LINE, au_login(), clogin_user(), db_get_string(), db_get_user_name(), DB_IS_NULL, db_make_error(), db_make_null(), db_string_free(), ER_AU_INVALID_USER, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, and NULL.
|
static |
Definition at line 705 of file authenticate.c.
References ARG_FILE_LINE, AU_CACHE_INVALID, au_class_cache::class_, au_class_cache::data, ER_ERROR_SEVERITY, ER_GENERIC_ERROR, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), i, au_class_cache::next, and NULL.
Referenced by au_extend_class_caches(), and au_install_class_cache().
Definition at line 1390 of file authenticate.c.
References ARG_FILE_LINE, AU_AUTH_CLASS_NAME, AU_USER_CLASS_NAME, db_make_null(), db_make_object(), db_make_sequence(), db_make_set(), db_make_string(), ER_AU_ACCESS_ERROR, ER_AU_MISSING_CLASS, ER_ERROR_SEVERITY, ER_IS_ABORTED_DUE_TO_DEADLOCK, er_set(), error(), free_and_init, intl_identifier_upper(), intl_identifier_upper_string_size(), NO_ERROR, NULL, obj_create(), obj_delete(), obj_set(), set_create_basic(), set_create_sequence(), set_free(), sm_find_class(), and au_grant::user.
Referenced by au_add_user().
|
static |
Definition at line 6525 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_DBA_USER_NAME, au_find_user(), Au_ignore_passwords, au_is_dba_group_member(), AU_PUBLIC_USER_NAME, AU_SET_USER, db_get_object(), db_get_string(), DB_IS_NULL, dbuser, ER_AU_CORRUPTED, ER_AU_INCOMPLETE_AUTH, ER_AU_INVALID_PASSWORD, ER_AU_INVALID_USER, ER_AU_NO_USER_LOGGED_IN, er_errid(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, match_password(), NO_ERROR, NULL, obj_get(), sm_bump_local_schema_version(), strlen, au_grant::user, and ws_free_string().
Referenced by au_login(), and au_start().
|
static |
Definition at line 7770 of file authenticate.c.
References au_print_grant_entry(), db_get_object(), db_get_string(), error(), get_grants(), GRANT_ENTRY_LENGTH, au_grant::grants, i, MSGCAT_AUTH_UNDEFINED_USER, MSGCAT_AUTH_USER_TITLE, MSGCAT_CATALOG_CUBRID, msgcat_message(), MSGCAT_SET_AUTHORIZATION, NO_ERROR, NULL, obj_get(), pr_clear_value(), set_free(), and set_size().
Referenced by au_dump_auth(), and au_dump_user().
|
static |
Definition at line 7710 of file authenticate.c.
References AU_GRANT_SHIFT, auth_type_name, i, MSGCAT_AUTH_INVALID_CACHE, MSGCAT_CATALOG_CUBRID, msgcat_message(), and MSGCAT_SET_AUTHORIZATION.
Referenced by au_print_grant_entry().
|
static |
Definition at line 7742 of file authenticate.c.
References au_print_cache(), db_get_int(), db_get_object(), db_get_string(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_SOURCE, MSGCAT_AUTH_CLASS_NAME, MSGCAT_AUTH_FROM_USER, MSGCAT_CATALOG_CUBRID, msgcat_message(), MSGCAT_SET_AUTHORIZATION, obj_get(), pr_clear_value(), set_get_element(), and sm_get_ch_name().
Referenced by au_dump_user(), and au_print_auth().
Definition at line 1865 of file authenticate.c.
References au_delete_new_auth(), au_grant::auth_object, db_get_int(), db_get_object(), error(), get_grants(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, au_grant::grant_index, au_grant::grantor, au_grant::grants, au_grant::legal, au_grant::next, NO_ERROR, NULL, set_get_element(), and au_grant::user.
Referenced by propagate_revoke().
void au_reset_authorization_caches | ( | void | ) |
Definition at line 1019 of file authenticate.c.
References Au_cache_depth, AU_CACHE_INVALID, au_class_cache::data, i, au_class_cache::next, and NULL.
Referenced by ws_abort_mops(), and ws_clear_all_hints().
Definition at line 4907 of file authenticate.c.
References ARG_FILE_LINE, au_delete_new_auth(), AU_DISABLE, AU_ENABLE, au_fetch_class_force(), au_fetch_instance(), AU_FETCH_READ, AU_FETCH_UPDATE, au_get_object(), AU_GRANT_SHIFT, au_revoke(), AU_TYPE_MASK, AU_UPDATE, AU_USER_CLASS_NAME, catcls_Enable, check_grant_option(), collect_class_grants(), DB_AUTH_ALL, db_get_int(), db_make_int(), DB_NOT_PARTITIONED_CLASS, DB_PARTITIONED_CLASS, drop_grant_entry(), ER_AU_ACCESS_ERROR, ER_AU_CANT_REVOKE_OWNER, ER_AU_CANT_REVOKE_SELF, ER_AU_CANT_UPDATE, ER_AU_GRANT_NOT_FOUND, ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), ER_WARNING_SEVERITY, error(), find_grant_entry(), free_and_init, free_grant_list(), get_grants(), i, LC_FETCH_MVCC_VERSION, NO_ERROR, NULL, obj_inst_lock(), sm_class::owner, propagate_revoke(), reset_cache_for_user_and_class(), set_free(), set_get_element(), set_put_element(), sm_bump_local_schema_version(), sm_partitioned_class_type(), tran_abort_upto_system_savepoint(), tran_system_savepoint(), UNIQUE_PARTITION_SAVEPOINT_REVOKE, and ws_is_same_object().
Referenced by au_revoke(), and db_revoke().
Definition at line 664 of file authenticate.c.
References db_get_object(), DB_IS_NULL, DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_OBJ_DOMAIN_CONFLICT, error(), NO_ERROR, NULL, and set_get_element().
Referenced by update_cache().
|
static |
Definition at line 1507 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_FETCH_READ, CT_CLASS_NAME, CT_CLASSAUTH_NAME, DB_AUTH_SELECT, db_create_internal(), db_make_int(), db_make_object(), db_make_string(), db_make_varchar(), ER_AU_MISSING_CLASS, er_errid(), ER_ERROR_SEVERITY, er_set(), error(), i, LANG_SYS_CODESET, LANG_SYS_COLLATION, NO_ERROR, NULL, obj_find_unique(), obj_set(), pr_clear_value(), sm_find_class(), sm_get_ch_name(), and strlen.
Referenced by au_insert_new_auth(), and au_update_new_auth().
Definition at line 2657 of file authenticate.c.
References au_set_password_internal(), and ENCODE_PREFIX_SHA2_512.
Referenced by au_add_user_method(), au_set_password_method(), db_set_password(), do_alter_user(), and do_create_user().
Definition at line 2711 of file authenticate.c.
References ARG_FILE_LINE, au_set_password_internal(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), ENCODE_PREFIX_DES, ER_AU_INVALID_PASSWORD, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, and NULL.
Definition at line 2758 of file authenticate.c.
References ARG_FILE_LINE, au_set_password_internal(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), ENCODE_PREFIX_SHA1, ENCODE_PREFIX_SHA2_512, ER_AU_INVALID_PASSWORD, er_set(), ER_WARNING_SEVERITY, error(), IS_ENCODED_SHA2_512, IS_STRING, NO_ERROR, and NULL.
|
static |
Definition at line 2547 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, au_is_dba_group_member(), AU_MAX_PASSWORD_BUF, AU_MAX_PASSWORD_CHARS, AU_PASSWORD_CLASS_NAME, db_get_object(), DB_IS_NULL, db_make_null(), db_make_object(), db_make_string(), encrypt_password_sha2_512(), ER_AU_PASSWORD_OVERFLOW, ER_AU_UPDATE_FAILURE, er_errid(), ER_ERROR_SEVERITY, er_set(), error(), NO_ERROR, NULL, obj_create(), obj_get(), obj_set(), sm_find_class(), strlen, and ws_is_same_object().
Referenced by au_set_password(), au_set_password_encoded_method(), and au_set_password_encoded_sha1_method().
Definition at line 2670 of file authenticate.c.
References ARG_FILE_LINE, au_set_password(), db_get_string(), DB_IS_NULL, db_make_error(), db_make_null(), ER_AU_INVALID_PASSWORD, er_set(), ER_WARNING_SEVERITY, error(), IS_STRING, NO_ERROR, and NULL.
int au_set_user | ( | MOP | newuser | ) |
Definition at line 6483 of file authenticate.c.
References Au_cache_index, au_find_user_cache_index(), error(), NO_ERROR, NULL, sc_set_current_schema(), and ws_is_same_object().
Definition at line 2808 of file authenticate.c.
References ARG_FILE_LINE, au_is_dba_group_member(), AU_MAX_COMMENT_CHARS, AU_RESTORE, AU_SAVE_AND_DISABLE, db_make_string(), ER_AU_COMMENT_OVERFLOW, ER_AU_UPDATE_FAILURE, ER_ERROR_SEVERITY, er_set(), error(), NO_ERROR, NULL, obj_set(), pr_clear_value(), strlen, and ws_is_same_object().
Referenced by db_set_user_comment(), do_alter_user(), and do_create_user().
int au_start | ( | void | ) |
Definition at line 6781 of file authenticate.c.
References ARG_FILE_LINE, AU_AUTH_CLASS_NAME, AU_DBA_USER_NAME, Au_disable, au_find_user(), AU_PASSWORD_CLASS_NAME, au_perform_login(), AU_PUBLIC_USER_NAME, AU_ROOT_CLASS_NAME, AU_USER_CLASS_NAME, Au_user_name, Au_user_password_sha2_512, db_Connect_status, DB_CONNECTION_STATUS_CONNECTED, db_get_all_objects(), db_objlist_free(), ER_AU_INCOMPLETE_AUTH, ER_AU_MULTIPLE_ROOTS, ER_AU_NO_AUTHORIZATION, er_errid(), ER_ERROR_SEVERITY, ER_LK_UNILATERALLY_ABORTED, er_set(), error(), db_objlist::next, NO_ERROR, NULL, db_objlist::op, sm_find_class(), and strlen.
Referenced by boot_initialize_client(), and boot_restart_client().
|
static |
Definition at line 1779 of file authenticate.c.
References assert, au_get_new_auth(), au_set_new_auth(), DB_AUTH_EXECUTE, er_errid(), error(), NO_ERROR, NULL, and obj_inst_lock().
Referenced by au_grant().
const char* au_user_name | ( | void | ) |
Definition at line 5746 of file authenticate.c.
References ARG_FILE_LINE, AU_DISABLE, AU_ENABLE, Au_user_name, db_get_string(), DB_IS_NULL, ER_AU_CORRUPTED, ER_AU_NO_USER_LOGGED_IN, ER_ERROR_SEVERITY, er_set(), ER_WARNING_SEVERITY, IS_STRING, NO_ERROR, NULL, obj_get(), pr_clear_value(), strlen, and ws_copy_string().
Referenced by boot_restart_client(), db_get_user_name(), pt_evaluate_db_value_expr(), pt_make_query_show_grants_curr_usr(), and pt_to_regu_variable().
char* au_user_name_dup | ( | void | ) |
Definition at line 2441 of file authenticate.c.
References Au_user_name, and strdup().
Referenced by boot_initialize_client().
|
static |
Definition at line 7387 of file authenticate.c.
References add_class_grant(), ARG_FILE_LINE, au_get_object(), AU_USER_CLASS_NAME, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_int(), db_get_object(), DB_IS_NULL, db_query_end(), db_query_get_tuple_value(), db_query_next_tuple(), DB_TYPE_OBJECT, DB_VALUE_TYPE, ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, get_grants(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, GRANT_ENTRY_SOURCE, au_grant::grants, NO_ERROR, NULL, set_free(), set_get_element(), set_size(), strlen, and au_grant::user.
Referenced by au_export_grants().
Definition at line 5853 of file authenticate.c.
References appropriate_error(), ARG_FILE_LINE, assert, Au_cache_index, AU_CACHE_INVALID, Au_disable, au_install_class_cache(), sm_class::auth_cache, au_class_cache::data, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), sm_class::flags, if(), is_protected_class(), NO_ERROR, NULL, SM_CLASSFLAG_SYSTEM, and update_cache().
Referenced by au_fetch_class_internal(), and au_fetch_instance().
Definition at line 4318 of file authenticate.c.
References appropriate_error(), ARG_FILE_LINE, assert, Au_cache_index, AU_CACHE_INVALID, AU_GRANT_SHIFT, au_install_class_cache(), sm_class::auth_cache, au_class_cache::data, er_errid(), er_set(), ER_WARNING_SEVERITY, error(), if(), NO_ERROR, NULL, and update_cache().
Referenced by au_grant(), and au_revoke().
|
static |
Definition at line 2094 of file authenticate.c.
References NO_ERROR.
Referenced by au_add_user().
|
static |
Definition at line 7571 of file authenticate.c.
References AU_GRANT_SHIFT, AU_MAX_BIT, AU_MIN_BIT, AU_SELECT, class_user::available_auth, class_grant::cache, free_class_grants(), class_user::grants, issue_grant_statement(), class_grant::next, class_user::next, NULL, au_grant::user, class_grant::user, and class_auth::users.
Referenced by au_export_grants().
|
static |
Definition at line 4604 of file authenticate.c.
References ARG_FILE_LINE, assert, au_get_object(), AU_GRANT_SHIFT, AU_NO_AUTHORIZATION, AU_USER_CLASS_NAME, au_grant::auth_object, db_compile_and_execute_local(), DB_CURSOR_SUCCESS, db_get_int(), db_get_object(), DB_IS_NULL, db_query_end(), db_query_get_tuple_value(), db_query_next_tuple(), db_ws_alloc(), ER_AU_ACCESS_ERROR, er_errid(), ER_ERROR_SEVERITY, ER_HEAP_UNKNOWN_OBJECT, ER_OUT_OF_VIRTUAL_MEMORY, er_set(), error(), free_and_init, free_grant_list(), get_grants(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, GRANT_ENTRY_SOURCE, au_grant::grant_index, au_grant::grant_option, au_grant::grantor, au_grant::grants, au_grant::legal, au_grant::next, NO_ERROR, NULL, set_free(), set_get_element(), set_size(), strlen, and au_grant::user.
Referenced by au_revoke().
|
static |
Definition at line 3772 of file authenticate.c.
References GRANT_ENTRY_LENGTH, i, set_drop_seq_element(), and set_size().
Referenced by au_revoke(), get_grants(), and propagate_revoke().
|
static |
Definition at line 2349 of file authenticate.c.
References AU_MAX_PASSWORD_BUF, crypt_encrypt_printable(), crypt_seed(), ENCODE_PREFIX_DES, NULL, and PASSWORD_ENCRYPTION_SEED.
Referenced by au_login(), and match_password().
|
static |
Definition at line 2378 of file authenticate.c.
References AU_MAX_PASSWORD_BUF, crypt_encrypt_sha1_printable(), ENCODE_PREFIX_SHA1, and NULL.
Referenced by au_login(), and match_password().
|
static |
Definition at line 2405 of file authenticate.c.
References assert, crypt_sha_two(), db_private_free_and_init, ENCODE_PREFIX_SHA2_512, NO_ERROR, NULL, and strlen.
Referenced by au_export_users(), au_login(), au_set_password_internal(), and match_password().
|
static |
Definition at line 5924 of file authenticate.c.
References assert, AU_FETCH_EXCLUSIVE_SCAN, AU_FETCH_READ, AU_FETCH_SCAN, AU_FETCH_UPDATE, AU_FETCH_WRITE, BY_CLASS_MOP, DB_FETCH_EXCLUSIVE_SCAN, DB_FETCH_READ, DB_FETCH_SCAN, DB_FETCH_WRITE, er_errid(), ER_FAILED, ER_HEAP_UNKNOWN_OBJECT, error(), is_class(), locator_fetch_class(), locator_fetch_class_of_instance(), locator_is_class(), locator_update_class(), NO_ERROR, NULL, ws_class_mop(), and WS_SET_DELETED.
Referenced by au_fetch_class_force(), au_fetch_class_internal(), and au_fetch_instance().
|
static |
Definition at line 6282 of file authenticate.c.
References ARG_FILE_LINE, assert, AU_DISABLE, AU_ENABLE, AU_FETCH_EXCLUSIVE_SCAN, AU_FETCH_READ, AU_FETCH_SCAN, AU_FETCH_UPDATE, AU_FETCH_WRITE, DB_FETCH_READ, DB_FETCH_WRITE, er_errid(), ER_ERROR_SEVERITY, ER_FAILED, ER_HEAP_UNKNOWN_OBJECT, ER_OBJ_INVALID_ARGUMENTS, ER_OBJ_INVALID_TEMP_OBJECT, er_set(), error(), db_object::is_temp, db_object::is_vid, locator_fetch_instance(), locator_update_instance(), NO_ERROR, NULL, vid_fetch_instance(), vid_upd_instance(), ws_pin(), and WS_SET_DELETED.
Referenced by au_fetch_instance(), and au_fetch_instance_force().
Definition at line 3711 of file authenticate.c.
References db_get_object(), GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, GRANT_ENTRY_SOURCE, i, set_get_element(), set_size(), and ws_is_same_object().
Referenced by au_grant(), and au_revoke().
|
static |
Definition at line 7303 of file authenticate.c.
References make_class_user(), class_user::next, NULL, class_user::obj, class_auth::users, and ws_is_same_object().
Referenced by add_class_grant(), and au_export_grants().
|
static |
Definition at line 1081 of file authenticate.c.
References au_free_class_cache(), sm_class::auth_cache, au_class_cache::class_, free_user_cache(), init_caches(), au_class_cache::next, au_user_cache::next, NULL, and strlen.
Referenced by au_final().
|
static |
Definition at line 7264 of file authenticate.c.
References free_and_init, au_grant::next, class_grant::next, and NULL.
Referenced by class_grant_loop(), and free_class_users().
|
static |
Definition at line 7281 of file authenticate.c.
References free_and_init, free_class_grants(), class_user::grants, au_grant::next, class_user::next, and NULL.
Referenced by au_export_grants().
|
static |
Definition at line 4562 of file authenticate.c.
References au_grant::auth_object, db_ws_free(), au_grant::grantor, au_grant::next, NULL, and au_grant::user.
Referenced by au_revoke(), and collect_class_grants().
|
static |
Definition at line 956 of file authenticate.c.
References free_and_init, NULL, and au_user_cache::user.
Referenced by flush_caches().
Definition at line 8595 of file authenticate.c.
References db_get_string(), db_make_int(), db_make_null(), DB_TYPE_STRING, DB_VALUE_TYPE, and sm_att_info().
Definition at line 3796 of file authenticate.c.
References ARG_FILE_LINE, assert, au_get_class_owner(), db_get_int(), db_get_object(), db_get_set(), DB_IS_NULL, db_make_int(), db_make_object(), DB_TYPE_OBJECT, DB_TYPE_SEQUENCE, DB_VALUE_TYPE, drop_grant_entry(), ER_AU_CORRUPTED, er_errid(), ER_ERROR_SEVERITY, er_set(), er_stack_pop(), er_stack_pop_and_keep_error(), er_stack_push(), error(), GRANT_ENTRY_CACHE, GRANT_ENTRY_CLASS, GRANT_ENTRY_LENGTH, GRANT_ENTRY_SOURCE, au_grant::grantor, au_grant::grants, i, NO_ERROR, NULL, obj_get(), set_free(), set_get_element(), set_put_element(), set_size(), WS_IS_DELETED, and ws_is_same_object().
Referenced by apply_grants(), au_dump_user(), au_grant(), au_print_auth(), au_propagate_del_new_auth(), au_revoke(), build_class_grant_list(), collect_class_grants(), and propagate_revoke().
|
static |
Definition at line 1064 of file authenticate.c.
References Au_cache_depth, Au_cache_increment, Au_cache_index, Au_cache_max, and NULL.
Referenced by au_init(), and flush_caches().
Definition at line 5826 of file authenticate.c.
References AU_ALTER, AU_DELETE, AU_INDEX, AU_INSERT, AU_UPDATE, IS_CATALOG_CLASS, sm_ch_name(), and sm_issystem().
Referenced by check_authorization().
|
static |
Definition at line 7486 of file authenticate.c.
References AU_ALTER, AU_DELETE, AU_EXECUTE, au_get_user_name(), AU_GRANT_SHIFT, AU_INDEX, AU_INSERT, AU_SELECT, AU_TYPE_MASK, AU_UPDATE, class_auth::class_mop, NULL, class_user::obj, sm_get_ch_name(), class_grant::user, and ws_free_string().
Referenced by class_grant_loop().
|
static |
Definition at line 7210 of file authenticate.c.
References class_grant::cache, class_grant::next, NULL, au_grant::user, and class_grant::user.
Referenced by add_class_grant().
|
static |
Definition at line 7229 of file authenticate.c.
References AU_FULL_AUTHORIZATION, class_user::available_auth, class_user::grants, class_user::next, NULL, class_user::obj, and ws_is_same_object().
Referenced by find_or_add_user().
Definition at line 4764 of file authenticate.c.
References au_grant::grant_option, au_grant::grantor, au_grant::legal, au_grant::next, NULL, and au_grant::user.
Referenced by propagate_revoke().
Definition at line 2458 of file authenticate.c.
References AU_MAX_PASSWORD_BUF, Au_user_password_des_oldstyle, Au_user_password_sha1, Au_user_password_sha2_512, encrypt_password(), encrypt_password_sha1(), encrypt_password_sha2_512(), IS_ENCODED_ANY, IS_ENCODED_DES, IS_ENCODED_SHA1, IS_ENCODED_SHA2_512, and NULL.
Referenced by au_perform_login().
Definition at line 4792 of file authenticate.c.
References ARG_FILE_LINE, au_fetch_instance(), AU_FETCH_UPDATE, au_propagate_del_new_auth(), AU_UPDATE, au_grant::auth_object, catcls_Enable, db_get_int(), db_make_int(), drop_grant_entry(), ER_AU_CANT_UPDATE, ER_ERROR_SEVERITY, er_set(), error(), get_grants(), GRANT_ENTRY_CACHE, GRANT_ENTRY_LENGTH, au_grant::grant_index, au_grant::grants, i, LC_FETCH_MVCC_VERSION, au_grant::legal, map_grant_list(), au_grant::next, NO_ERROR, NULL, obj_inst_lock(), set_free(), set_get_element(), set_put_element(), and set_size().
Referenced by au_revoke().
|
static |
Definition at line 1045 of file authenticate.c.
References au_user_cache::next, NULL, au_user_cache::user, and ws_is_same_object().
Referenced by au_drop_user().
|
static |
Definition at line 984 of file authenticate.c.
References AU_CACHE_INVALID, au_class_cache::class_, au_class_cache::data, au_user_cache::index, au_class_cache::next, au_user_cache::next, and NULL.
Referenced by au_grant(), and au_revoke().
|
static |
Definition at line 4024 of file authenticate.c.
References apply_grants(), ARG_FILE_LINE, Au_cache_index, AU_DISABLE, AU_ENABLE, AU_FULL_AUTHORIZATION, au_get_object(), au_get_set(), au_is_dba_group_member(), AU_NO_AUTHORIZATION, au_set_get_obj(), AU_USER_CLASS_NAME, au_class_cache::data, db_make_object(), ER_AU_ACCESS_ERROR, ER_AU_CLASS_WITH_NO_OWNER, er_errid(), ER_ERROR_SEVERITY, er_set(), er_stack_pop(), er_stack_pop_and_keep_error(), er_stack_push(), error(), i, NO_ERROR, NULL, sm_class::owner, set_cardinality(), set_free(), set_ismember(), and ws_is_same_object().
Referenced by au_get_class_privilege(), check_authorization(), and check_grant_option().
const char* AU_AUTH_CLASS_NAME = "db_authorization" |
Definition at line 109 of file authenticate.c.
Referenced by au_add_method_check_authorization(), au_force_write_new_auth(), au_install(), au_make_user(), au_start(), and clist_init().
|
static |
Definition at line 375 of file authenticate.c.
|
static |
Definition at line 374 of file authenticate.c.
|
static |
Definition at line 407 of file authenticate.c.
Referenced by au_extend_class_caches(), au_reset_authorization_caches(), and init_caches().
|
static |
Definition at line 409 of file authenticate.c.
Referenced by au_extend_class_caches(), and init_caches().
|
static |
Definition at line 419 of file authenticate.c.
Referenced by au_get_class_privilege(), au_install(), au_set_user(), check_authorization(), check_grant_option(), init_caches(), and update_cache().
|
static |
Definition at line 408 of file authenticate.c.
Referenced by au_extend_class_caches(), au_install_class_cache(), and init_caches().
|
static |
Definition at line 393 of file authenticate.c.
Referenced by au_install_class_cache().
Definition at line 334 of file authenticate.c.
Referenced by au_get_class_owner(), au_get_dba_user(), au_install(), boot_define_attribute(), boot_define_charsets(), boot_define_class(), boot_define_class_authorization(), boot_define_collations(), boot_define_data_type(), boot_define_domain(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_index(), boot_define_index_key(), boot_define_meth_argument(), boot_define_meth_file(), boot_define_meth_sig(), boot_define_method(), boot_define_partition(), boot_define_query_spec(), boot_define_serial(), boot_define_stored_procedure(), boot_define_stored_procedure_arguments(), boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), boot_define_view_vclass(), db_add_volume_ex(), db_set_system_parameters(), do_check_internal_statements(), and tr_drop_deferred_activities().
const char* AU_DBA_USER_NAME = "DBA" |
Definition at line 113 of file authenticate.c.
Referenced by au_perform_login(), and au_start().
int Au_disable = 1 |
Definition at line 309 of file authenticate.c.
Referenced by au_check_authorization(), au_disable(), au_enable(), au_fetch_class_internal(), au_fetch_instance(), au_final(), au_get_class_privilege(), au_init(), au_start(), and check_authorization().
const char* AU_GRANT_CLASS_NAME = "db_grant" |
Definition at line 110 of file authenticate.c.
|
static |
Definition at line 323 of file authenticate.c.
Referenced by au_disable_passwords(), and au_perform_login().
const char* AU_OLD_ROOT_CLASS_NAME = "db_authorizations" |
Definition at line 105 of file authenticate.c.
Referenced by au_install().
|
static |
Definition at line 377 of file authenticate.c.
const char* AU_PASSWORD_CLASS_NAME = "db_password" |
Definition at line 108 of file authenticate.c.
Referenced by au_install(), au_set_password_internal(), au_start(), and clist_init().
Definition at line 333 of file authenticate.c.
Referenced by au_get_public_user(), boot_define_dual(), boot_define_ha_apply_info(), boot_define_serial(), boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_db_charset(), boot_define_view_db_collation(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_stored_procedure(), boot_define_view_stored_procedure_arguments(), boot_define_view_super_class(), boot_define_view_trigger(), boot_define_view_vclass(), and catcls_vclass_install().
const char* AU_PUBLIC_USER_NAME = "PUBLIC" |
Definition at line 112 of file authenticate.c.
Referenced by au_get_public_user_name(), au_perform_login(), au_start(), boot_restart_client(), and do_create_user().
Definition at line 300 of file authenticate.c.
Referenced by find_all_triggers(), lang_db_put_charset(), put_timezone_checksum(), tr_dump_selective_triggers(), tr_status_as_string(), trigger_table_add(), trigger_table_drop(), trigger_table_find(), and trigger_table_rename().
const char* AU_ROOT_CLASS_NAME = "db_root" |
Definition at line 104 of file authenticate.c.
Referenced by au_install(), au_start(), and clist_init().
|
static |
Definition at line 439 of file authenticate.c.
Definition at line 343 of file authenticate.c.
Referenced by check_authorization(), csql(), csql_do_session_cmd(), db_add_volume_ex(), db_get_user(), db_set_system_parameters(), do_check_internal_statements(), do_create_serial_internal(), do_kill(), do_update_stats(), drop_stored_procedure(), execute_activity(), get_user_trigger_objects(), jsp_add_stored_procedure(), jsp_alter_stored_procedure(), la_apply_statement_log(), loaddb_internal(), pt_check_access_status(), pt_check_union_type_compatibility_of_values_query(), pt_make_query_showstmt(), register_user_trigger(), tr_create_trigger(), tr_drop_deferred_activities(), tr_update_user_cache(), tranlist(), unregister_user_trigger(), and update_class().
|
static |
Definition at line 384 of file authenticate.c.
Referenced by au_find_user_cache_index().
|
static |
Definition at line 376 of file authenticate.c.
const char* AU_USER_CLASS_NAME = "db_user" |
Definition at line 107 of file authenticate.c.
Referenced by au_dump_auth(), au_dump_to_file(), au_dump_user(), au_export_users(), au_find_user(), au_find_user_to_drop(), au_get_user_class_name(), au_grant(), au_install(), au_make_user(), au_revoke(), au_start(), boot_define_class(), boot_define_class_authorization(), boot_define_serial(), boot_define_stored_procedure(), boot_define_view_attribute(), boot_define_view_attribute_set_domain(), boot_define_view_authorization(), boot_define_view_class(), boot_define_view_index(), boot_define_view_index_key(), boot_define_view_method(), boot_define_view_method_argument(), boot_define_view_method_argument_set_domain(), boot_define_view_method_file(), boot_define_view_partition(), boot_define_view_super_class(), boot_define_view_trigger(), boot_define_view_vclass(), build_class_grant_list(), clist_init(), collect_class_grants(), and update_cache().
|
static |
Definition at line 357 of file authenticate.c.
Referenced by au_dump_to_file(), au_has_user_name(), au_login(), au_start(), au_user_name(), and au_user_name_dup().
char Au_user_password_des_oldstyle[AU_MAX_PASSWORD_BUF+4] = { '\0' } |
Definition at line 358 of file authenticate.c.
Referenced by au_login(), and match_password().
char Au_user_password_sha1[AU_MAX_PASSWORD_BUF+4] = { '\0' } |
Definition at line 359 of file authenticate.c.
Referenced by au_login(), and match_password().
char Au_user_password_sha2_512[AU_MAX_PASSWORD_BUF+4] = { '\0' } |
Definition at line 360 of file authenticate.c.
Referenced by au_login(), au_start(), and match_password().
|
static |
Definition at line 421 of file authenticate.c.
Referenced by au_print_cache().