|
|
|
|
@ -399,9 +399,13 @@ void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window
|
|
|
|
|
} else {
|
|
|
|
|
yon_config_register("ADDADM","users","no");
|
|
|
|
|
}
|
|
|
|
|
char *hash = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->PasswordHashCombo));
|
|
|
|
|
if (!yon_char_is_empty(hash)){
|
|
|
|
|
yon_config_register("HASHPASSWD","users",hash);
|
|
|
|
|
if (gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordHashCombo))!=0){
|
|
|
|
|
char *hash = (char*)gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->PasswordHashCombo));
|
|
|
|
|
if (!yon_char_is_empty(hash)){
|
|
|
|
|
yon_config_register("HASHPASSWD","users",hash);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
yon_config_remove_by_key("HASHPASSWD");
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@ -438,6 +442,16 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
|
|
|
|
|
|
|
|
|
|
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"AdditionalSettingsWindow");
|
|
|
|
|
gtk_window_set_title(GTK_WINDOW(window->Window),ADDITIONAL_SETTINGS_TITLE_LABEL);
|
|
|
|
|
|
|
|
|
|
if (main_config.hash_default_id==-1){
|
|
|
|
|
int size;
|
|
|
|
|
config_str ret = yon_config_load(get_default_hash_command,&size);
|
|
|
|
|
if (size>0){
|
|
|
|
|
char *hash = ret[0];
|
|
|
|
|
if (hash[strlen(hash)-1]=='\n') hash[strlen(hash)-1]='\0';
|
|
|
|
|
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),yon_char_unite(DEFAULT_USER_LABEL," (",hash,")",NULL));
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
int hash_size=0;
|
|
|
|
|
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
|
|
|
|
|
for (int i=1;i<hash_size;i++){
|
|
|
|
|
@ -475,7 +489,6 @@ ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_
|
|
|
|
|
if (!yon_char_is_empty(hash)){
|
|
|
|
|
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->PasswordHashCombo),hash);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
|
|
|
|
|
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_additional_settings_save),window);
|
|
|
|
|
@ -1596,6 +1609,7 @@ void config_init(){
|
|
|
|
|
main_config.lock_save_local=0;
|
|
|
|
|
main_config.groups_size=0;
|
|
|
|
|
main_config.load_mode=1;
|
|
|
|
|
main_config.hash_default_id=-1;
|
|
|
|
|
main_config.groups = yon_file_open(groups_path,&main_config.groups_size);
|
|
|
|
|
main_config.users = yon_file_open(users_path,&main_config.users_size);
|
|
|
|
|
main_config.users_list=NULL;
|
|
|
|
|
|