From 90ad4dbd17a44c64cfaf8cb81588d3f999efd40b Mon Sep 17 00:00:00 2001 From: Robert Bindar Date: Wed, 16 Jan 2019 19:44:30 +0200 Subject: MDEV-7597 Expiration of user passwords This patch adds support for expiring user passwords. The following statements are extended: CREATE USER user@localhost PASSWORD EXPIRE [option] ALTER USER user@localhost PASSWORD EXPIRE [option] If no option is specified, the password is expired with immediate effect. If option is DEFAULT, global policy applies according to the default_password_lifetime system var (if 0, password never expires, if N, password expires every N days). If option is NEVER, the password never expires and if option is INTERVAL N DAY, the password expires every N days. The feature also supports the disconnect_on_expired_password system var and the --connect-expired-password client option. Closes #1166 --- sql/sql_class.h | 3 +++ 1 file changed, 3 insertions(+) (limited to 'sql/sql_class.h') diff --git a/sql/sql_class.h b/sql/sql_class.h index 6df1e58c95f..4e846d3f169 100644 --- a/sql/sql_class.h +++ b/sql/sql_class.h @@ -1334,6 +1334,8 @@ public: ulong master_access; /* Global privileges from mysql.user */ ulong db_access; /* Privileges for current db */ + bool password_expired; + void init(); void destroy(); void skip_grants(); @@ -1364,6 +1366,7 @@ public: @return True if the security context fulfills the access requirements. */ bool check_access(ulong want_access, bool match_any = false); + bool is_priv_user(const char *user, const char *host); }; -- cgit v1.2.1