mirror of
https://gitee.com/wangbin579/cetus.git
synced 2024-12-02 03:47:41 +08:00
modify admin pwd
This commit is contained in:
parent
8e8f10009a
commit
cfbbd4593a
@ -440,18 +440,17 @@ gchar*
|
||||
show_admin_password(gpointer param) {
|
||||
struct external_param *opt_param = (struct external_param *)param;
|
||||
gint opt_type = opt_param->opt_type;
|
||||
GString* hashed_pwd = g_string_new(0);
|
||||
network_mysqld_proto_password_hash(hashed_pwd, L(config->admin_password));
|
||||
|
||||
char* pwdhex = g_malloc0(hashed_pwd->len * 2 + 10);
|
||||
bytes_to_hex_str(hashed_pwd->str, hashed_pwd->len, pwdhex);
|
||||
g_string_free(hashed_pwd, TRUE);
|
||||
|
||||
if(CAN_SHOW_OPTS_PROPERTY(opt_type)) {
|
||||
GString* hashed_pwd = g_string_new(0);
|
||||
network_mysqld_proto_password_hash(hashed_pwd, L(config->admin_password));
|
||||
char* pwdhex = g_malloc0(hashed_pwd->len * 2 + 10);
|
||||
bytes_to_hex_str(hashed_pwd->str, hashed_pwd->len, pwdhex);
|
||||
g_string_free(hashed_pwd, TRUE);
|
||||
return pwdhex;
|
||||
}
|
||||
if(CAN_SAVE_OPTS_PROPERTY(opt_type)) {
|
||||
return pwdhex;
|
||||
return g_strdup(config->admin_password);
|
||||
}
|
||||
return NULL;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user