From 7f95118f5703d43f931db2236de51cf9beecc751 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 28 Nov 2024 17:30:31 +0600 Subject: [PATCH 1/5] Fixed crash --- source/ubinstall-gtk.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 792e8f8..15e32d9 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -126,11 +126,11 @@ void yon_load_proceed(YON_CONFIG_TYPE type); void yon_load_proceed(YON_CONFIG_TYPE type){ yon_config_clean(); if (!yon_char_is_empty(config_get_default_command)) - yon_config_load_config(YON_CONFIG_DEFAULT,config_get_default_command,NULL); + yon_config_load_config(YON_CONFIG_DEFAULT,yon_debug_output("%s\n",config_get_default_command),NULL); if (type==YON_CONFIG_GLOBAL){ - yon_config_load_config(type,config_get_global_command,NULL); + yon_config_load_config(type,yon_debug_output("%s\n",config_get_global_command),NULL); } else if (type==YON_CONFIG_LOCAL){ - yon_config_load_config(type,config_get_local_command,NULL); + yon_config_load_config(type,yon_debug_output("%s\n",config_get_local_command),NULL); } else if (type==YON_CONFIG_CUSTOM){ char *path=""; GtkWidget *dialog = gtk_file_chooser_dialog_new(TITLE_LABEL,NULL,GTK_FILE_CHOOSER_ACTION_SAVE,CANCEL_LABEL,GTK_RESPONSE_CANCEL,OPEN_LABEL,GTK_RESPONSE_ACCEPT,NULL); @@ -154,7 +154,7 @@ void yon_load_proceed(YON_CONFIG_TYPE type){ } else { gtk_widget_destroy(dialog); } - yon_config_load_config(type,yon_config_get_custom_command(path),NULL); + yon_config_load_config(type,yon_debug_output("%s\n",yon_config_get_custom_command(path)),NULL); if (path) free(path); } } @@ -430,11 +430,11 @@ void yon_interface_update(main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(widgets->UserNameEntry),""); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->UsernameSensitiveCheck),0); } - int def_size; + int def_size=0; config_str default_password = NULL; if (!getuid()){ - default_password = yon_config_load(get_default_password_command, &def_size); - if (def_size){ + default_password = yon_config_load(yon_debug_output("%s\n",get_default_password_command), &def_size); + if (def_size>0&&default_passwrod){ yon_char_remove_last_symbol(default_password[0],'\n'); } } @@ -2097,7 +2097,7 @@ void on_separate_installation_changed(GtkWidget *self, main_window *widgets){ gtk_tree_model_get(model,&iter,0,&disk_path,-1); int size; config_str parsed; - parsed = yon_config_load(get_parts_and_devices_command,&size); + parsed = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size); char *string = yon_char_parsed_to_string(parsed,size,""); struct json_object *root; struct json_object *blockdevices; @@ -2163,7 +2163,7 @@ void on_near_installation_device_changed(GtkWidget *self, main_window *widgets){ gtk_tree_model_get(model,&iter,0,&disk_path,-1); int size; config_str parsed; - parsed = yon_config_load(get_parts_and_devices_command,&size); + parsed = yon_config_load((get_parts_and_devices_command),&size); char *string = yon_char_parsed_to_string(parsed,size,""); struct json_object *root; struct json_object *blockdevices; @@ -2232,7 +2232,7 @@ void on_same_installation_device_changed(GtkWidget *, main_window *widgets){ gtk_tree_model_get(model,&iter,0,&disk_path,-1); int size; config_str parsed; - parsed = yon_config_load(get_parts_and_devices_command,&size); + parsed = yon_config_load(yon_debug_output("%s\n",get_parts_and_devices_command),&size); char *string = yon_char_parsed_to_string(parsed,size,""); struct json_object *root; struct json_object *blockdevices; @@ -2667,7 +2667,7 @@ main_window *yon_main_window_complete(){ } gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->RegionCombo),0); yon_char_parsed_free(parsed,size); - parsed = yon_config_load(get_layouts_command,&size); + parsed = yon_config_load(yon_debug_output("%s\n",get_layouts_command),&size); GtkTreeIter itar; for (int i=0;iLayoutList,&iter,0,layout[0],1,_(layout[1]),2,1,-1); yon_char_parsed_free(layout,layout_size); char *command = get_layouts_local_command(layout_id); - config_str layout_local = yon_config_load(command,&layout_size); + config_str layout_local = yon_config_load(yon_debug_output("%s\n",command),&layout_size); free(command); free(layout_id); for (int j=0;j Date: Thu, 28 Nov 2024 17:31:33 +0600 Subject: [PATCH 2/5] Fixed crash --- source/ubinstall-gtk.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 15e32d9..13eca77 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -434,7 +434,7 @@ void yon_interface_update(main_window *widgets){ config_str default_password = NULL; if (!getuid()){ default_password = yon_config_load(yon_debug_output("%s\n",get_default_password_command), &def_size); - if (def_size>0&&default_passwrod){ + if (def_size>0&&default_password){ yon_char_remove_last_symbol(default_password[0],'\n'); } } -- 2.35.1 From 6990bd0c2a3b7e0a86aa429434625042afd26999 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 28 Nov 2024 17:33:00 +0600 Subject: [PATCH 3/5] Fixed crash --- source/ubinstall-gtk.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/source/ubinstall-gtk.c b/source/ubinstall-gtk.c index 13eca77..0d43cb0 100644 --- a/source/ubinstall-gtk.c +++ b/source/ubinstall-gtk.c @@ -438,7 +438,7 @@ void yon_interface_update(main_window *widgets){ yon_char_remove_last_symbol(default_password[0],'\n'); } } - if ((def_size&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ + if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->PasswordCombo),0); gtk_entry_set_text(GTK_ENTRY(widgets->PasswordEntry),""); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->PasswordSensitiveCheck),0); @@ -447,7 +447,7 @@ void yon_interface_update(main_window *widgets){ gtk_entry_set_text(GTK_ENTRY(widgets->PasswordEntry),user_password); gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->PasswordCombo),1); } - if ((def_size&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ + if ((def_size>0&&!strcmp(default_password[0],user_password))||yon_char_is_empty(user_password)){ gtk_combo_box_set_active(GTK_COMBO_BOX(widgets->AdminPasswordCombo),0); gtk_entry_set_text(GTK_ENTRY(widgets->AdminPasswordEntry),""); gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(widgets->RootPasswordSensitiveCheck),0); -- 2.35.1 From 6563202e6775a0d9a58c77618d5af3c985f66bb2 Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 28 Nov 2024 17:38:09 +0600 Subject: [PATCH 4/5] Change of password getting command --- source/ubinstall-gtk.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/ubinstall-gtk.h b/source/ubinstall-gtk.h index a5930d3..d538577 100755 --- a/source/ubinstall-gtk.h +++ b/source/ubinstall-gtk.h @@ -124,7 +124,7 @@ NULL #define set_user_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ",parameters,";nice ubinstall2 autoconfig",NULL) #define save_additional_config_command(parameters) yon_char_unite("ubconfig --target system set [autoinstall] ",parameters,NULL) -#define get_default_password_command "ubconfig --raw --conarg --default --source global get [users] NOSECUREROOTPASSWD" +#define get_default_password_command "ubconfig --raw --conarg --source default get [users] NOSECUREROOTPASSWD" #define open_gparted_command "gparted" -- 2.35.1 From b755df31360c6fa3d7804303e3ebc496e13ebb2d Mon Sep 17 00:00:00 2001 From: Ivan Yarcev Date: Thu, 28 Nov 2024 17:59:25 +0600 Subject: [PATCH 5/5] Changed **** in password to 'ublinux' --- ubinstall-gtk.glade | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ubinstall-gtk.glade b/ubinstall-gtk.glade index 62aae47..2ad950d 100644 --- a/ubinstall-gtk.glade +++ b/ubinstall-gtk.glade @@ -2482,7 +2482,7 @@ and help you install UBLinux on your computer True False - ****** + ublinux password @@ -2593,7 +2593,7 @@ and help you install UBLinux on your computer True False - ****** + ublinux password -- 2.35.1