MXS-1354: Prevent removal of last admin account
Removing the last admin account is now forbidden. This should prevent most cases where users could lock themselves out of the administrative interface. This change does allow a non-root network user to be the last admin account. In practice this does not prevent the root user from gaining access to maxadmin. Access can be gained by removing the users file and restarting MaxScale or by editing the users file by hand.
This commit is contained in:
@ -85,6 +85,7 @@ bool admin_verify_inet_user(const char *uname, const char *password);
|
||||
bool admin_user_is_inet_admin(const char* username);
|
||||
bool admin_user_is_unix_admin(const char* username);
|
||||
bool admin_have_admin();
|
||||
bool admin_is_last_admin(const char* user);
|
||||
|
||||
/**
|
||||
* @brief Convert all admin users to JSON
|
||||
|
||||
Reference in New Issue
Block a user