#ifndef _ADMINUSERS_H #define _ADMINUSERS_H /* * Copyright (c) 2016 MariaDB Corporation Ab * * Use of this software is governed by the Business Source License included * in the LICENSE.TXT file and at www.mariadb.com/bsl. * * Change Date: 2019-07-01 * * On the date above, in accordance with the Business Source License, use * of this software will be governed by version 2 or later of the General * Public License. */ /** * @file adminusers.h - Administration users support routines * * @verbatim * Revision History * * Date Who Description * 18/07/13 Mark Riddoch Initial implementation * * @endverbatim */ #include #define ADMIN_SALT "$1$MXS" /* Max length of fields in for admin users */ #define ADMIN_USER_MAXLEN 128 #define ADMIN_PASSWORD_MAXLEN 128 /** Default user for the administrative interface */ #define DEFAULT_ADMIN_USER "@DEFAULT_ADMIN_USER@" /* * MySQL session specific data * */ typedef struct admin_session { #if defined(SS_DEBUG) skygw_chk_t adminses_chk_top; #endif char user[ADMIN_USER_MAXLEN + 1]; /*< username */ bool validated; /* Was user validated? */ #if defined(SS_DEBUG) skygw_chk_t adminses_chk_tail; #endif } ADMIN_session; extern int admin_verify(char *, char *); extern char *admin_add_user(char *); extern int admin_search_user(char *); extern void dcb_PrintAdminUsers(DCB *dcb); char* admin_remove_user(char* uname); #endif