Merge pull request 'master' (#235) from YanTheKaller/ubl-settings-usergroups:master into master

Reviewed-on: #235
master v2.25
Dmitry Razumov 8 months ago
commit d4b7c12bfa

@ -10,10 +10,14 @@
<file>ubl-settings-usergroups-system.glade</file>
<file>ubl-settings-usergroups-savesettings.glade</file>
<file>ubl-settings-usergroups-confirmation.glade</file>
<file>ubl-settings-usergroups-system-deletion-confirmation.glade</file>
</gresource>
<gresource prefix="/com/ublinux/css">
<file>ubl-settings-usergroups.css</file>
</gresource>
<gresource prefix="/com/ublinux/csv">
<file>sync_parameters.csv</file>
</gresource>
<gresource prefix="/com/ublinux/images">
<file>ubl-settings-usergroups-banner.png</file>
</gresource>

@ -38,6 +38,8 @@ set(DEPENDFILES
../ubl-settings-usergroups-group.glade
../ubl-settings-usergroups-savesettings.glade
../ubl-settings-usergroups-confirmation.glade
../ubl-settings-usergroups-system-deletion-confirmation.glade
../sync_parameters.csv
../gresource.xml
../ubl-settings-usergroups-banner.png
../ubl-settings-usergroups.css
@ -79,6 +81,12 @@ endif()
set(SOURCE_FILES
ubl-settings-usergroups.c
ubl-settings-usergroups-settings.c
ubl-settings-usergroups-user.c
ubl-settings-usergroups-system.c
ubl-settings-usergroups-additional-config.c
ubl-settings-usergroups-group.c
ubl-settings-usergroups-password.c
ubl-settings-usergroups.h
ubl-strings.h
)

@ -1 +0,0 @@
#cmakedefine WEBKIT_FOUND

@ -0,0 +1,31 @@
#include "ubl-settings-usergroups.h"
void on_hash_changed(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window){
int hash_size=0;
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
for (int i=1;i<hash_size;i++){
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
int parsed_size;
config_str parsed = yon_char_parse(hash_algos[i],&parsed_size,";");
gtk_widget_set_tooltip_text(window->PasswordHashCombo,parsed[1]);
yon_char_parsed_free(parsed,parsed_size);
}
yon_char_parsed_free(hash_algos,hash_size);
}
void on_additional_settings_clicked(GtkWidget *, GtkEntry *){
ubl_settings_usergroups_additional_settings_window *window = yon_ubl_settings_usergroups_additional_settings_new();
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
gtk_widget_show(window->Window);
}
void on_passwords_encrypt(){
int pid = fork();
if (!pid){
exit(system(encrypt_passwords_command));
}
}

@ -0,0 +1,282 @@
#include "ubl-settings-usergroups.h"
ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group_creation_new(){
ubl_settings_usergroups_group_creation_window *window = malloc(sizeof(ubl_settings_usergroups_group_creation_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_group_creation);
window->CreateGroupWindow=yon_gtk_builder_get_widget(builder,"CreateGroupWindow");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->userUIDAutoCheck=yon_gtk_builder_get_widget(builder,"GIDAutoCheck");
window->userUIDEntry=yon_gtk_builder_get_widget(builder,"userUIDEntry");
window->userLoginEntry=yon_gtk_builder_get_widget(builder,"userLoginEntry");
window->userGroupsEntry=yon_gtk_builder_get_widget(builder,"userGroupsEntry");
window->UserAdditionalGroupsButton=yon_gtk_builder_get_widget(builder,"AdditionalGroupsButton");
window->UserCancelButton=yon_gtk_builder_get_widget(builder,"UserCancelButton");
window->UserOkButton=yon_gtk_builder_get_widget(builder,"UserOkButton");
window->AdditionalGroupsButton=yon_gtk_builder_get_widget(builder,"AdditionalGroupsButton");
window->UnuniqueGIDCheck=yon_gtk_builder_get_widget(builder,"UnuniqueGIDCheck");
window->SystemGroupCheck=yon_gtk_builder_get_widget(builder,"SystemGroupCheck");
window->PasswordCombo=yon_gtk_builder_get_widget(builder,"PasswordCombo");
window->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
window->ChangePasswordButton=yon_gtk_builder_get_widget(builder,"ChangePasswordButton");
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
window->AdminGroupsEntry=yon_gtk_builder_get_widget(builder,"AdminGroupsEntry");
window->AdminGroupsButton=yon_gtk_builder_get_widget(builder,"AdminGroupsButton");
window->GroupaddShutdownCheck=yon_gtk_builder_get_widget(builder,"GroupaddShutdownCheck");
window->groupExtraOptionsEntry=yon_gtk_builder_get_widget(builder,"groupExtraOptionsEntry");
window->MainNotebook=yon_gtk_builder_get_widget(builder,"MainNotebook");
window->last_gid=NULL;
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),GROUPS_TITLE_LABEL);
on_GID_update(NULL,window);
dictionary *entry_dict=NULL;
yon_dictionary_add_or_create_if_exists_with_data(entry_dict,"combo",window->PasswordCombo);
yon_dictionary_add_or_create_if_exists_with_data(entry_dict,"entry",window->PasswordEntry);
yon_window_config_custom_window_setup(GTK_WINDOW(window->CreateGroupWindow),"GroupAddWindow");
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"clicked",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userUIDEntry);
g_signal_connect(G_OBJECT(window->ChangePasswordButton),"clicked",G_CALLBACK(on_password_change),entry_dict);
g_signal_connect(G_OBJECT(window->PasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->ChangePasswordButton);
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->UserAdditionalGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->userGroupsEntry);
g_signal_connect(G_OBJECT(window->AdminGroupsButton),"clicked",G_CALLBACK(on_user_choose),window->AdminGroupsEntry);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(on_GID_update),window);
g_signal_connect(G_OBJECT(window->SystemGroupCheck),"toggled",G_CALLBACK(on_GID_update),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->SystemGroupCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->SystemGroupCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button_inversed),window->UnuniqueGIDCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UnuniqueGIDCheck);
g_signal_connect(G_OBJECT(window->UnuniqueGIDCheck),"toggled",G_CALLBACK(on_system_parameter_changed),window);
g_signal_connect(G_OBJECT(window->SystemGroupCheck),"toggled",G_CALLBACK(on_system_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userUIDEntry),"insert-text",G_CALLBACK(yon_on_text_insert_only_digits),NULL);
return window;
}
void on_GID_update(GtkWidget *, ubl_settings_usergroups_group_creation_window *window){
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck))){
if (window->last_gid){
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),window->last_gid);
} else {
int config_size=0;
int final_size=0;
config_str config_groups = yon_config_get_all_by_key(GROUPADD_parameter,&config_size);
yon_char_parsed_prepend_strings(config_groups,config_size,":");
config_str final = yon_char_parsed_merge(main_config.groups,main_config.groups_size,config_groups,config_size,&final_size);
long prev_busy=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SystemGroupCheck))?0:main_config.MINGID;
int minimum = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SystemGroupCheck))?0:main_config.MINGID;
int maximum = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SystemGroupCheck))?68000:main_config.MAXGID;
for (int i=0;i<final_size;i++){
int parsed_size;
config_str parsed = yon_char_parse(final[i],&parsed_size,":");
if (parsed_size>2&&minimum<atol(parsed[2])&&atol(parsed[2])<maximum){
if (atol(parsed[2])>prev_busy){
prev_busy=atol(parsed[2]);
}
}
yon_char_parsed_free(parsed, parsed_size);
}
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),yon_char_from_long(prev_busy+1));
}
} else {
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),"");
}
}
void on_group_save(GtkWidget *self, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
ubl_settings_usergroups_group_creation_window *window = yon_dictionary_get_data(dict->first->next,ubl_settings_usergroups_group_creation_window*);
char *final_string = NULL;
char *group_name = NULL;
char *group_users = NULL;
char *gid = NULL;
char *non_unique = NULL;
char *gsystem = NULL;
char *admins = NULL;
char *password = NULL;
int gid_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
if (gid_active){
gid="x";
} else {
gid = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUIDEntry));
if (yon_char_is_empty(gid)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
yon_ubl_status_highlight_incorrect(window->userUIDEntry);
return;
}
if (!yon_char_is_empty(window->last_gid)&&strcmp(gid,window->last_gid)){
int config_size=0;
int final_size=0;
config_str config_users = yon_config_get_all_by_key(GROUPADD_SEARCH_macro,&config_size);
config_str final = yon_char_parsed_merge(main_config.groups,main_config.groups_size,config_users,config_size,&final_size);
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UnuniqueGIDCheck))){
int found=0;
char *uid_string = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUIDEntry));
for (int i=0;i<final_size;i++){
int parsed_size;
config_str parsed = yon_char_parse(final[i],&parsed_size,":");
if (parsed_size>2&&!strcmp(parsed[2],uid_string)){
if (yon_char_is_empty(window->last_gid)||(!yon_char_is_empty(window->last_gid)&&strcmp(parsed[2],window->last_gid))){
found = yon_char_parsed_check_exist(config_users,config_size,final[i])>-1?1:2;
break;
}
}
if (parsed_size) yon_char_parsed_free(parsed,parsed_size);
}
if (found){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),found==1?GID_ALREADY_EXIST_CONFIG_LABEL:GID_ALREADY_EXIST_SYSTEM_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userUIDEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
}
}
}
group_name = (char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry));
if (group_name[0]>'0'&&group_name[0]<'9'){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),GROUP_BEGINS_WITH_DIGIT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
if (yon_char_is_empty(group_name)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
{
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList);
for_iter(model,&iter){
char *cur;
gtk_tree_model_get(model,&iter,1, &cur,-1);
if (!yon_char_is_empty(cur)&&!strcmp(cur,group_name)){
if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),GROUP_EXIST_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
}
}
}
group_users = (char*)gtk_entry_get_text(GTK_ENTRY(window->userGroupsEntry));
admins = (char*)gtk_entry_get_text(GTK_ENTRY(window->AdminGroupsEntry));
int non_unique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UnuniqueGIDCheck));
if(non_unique_active){
non_unique="--non-unique";
} else non_unique="";
int gsystem_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->SystemGroupCheck));
if(gsystem_active){
gsystem="--system";
} else gsystem="";
int shutdown_sync_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->GroupaddShutdownCheck));
if (shutdown_sync_active){
char *final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",GROUPADD_SYNC(group_name));
yon_config_register(GROUPADD_SYNC(group_name),final_command,"shutdown");
} else {
yon_config_remove_by_key(GROUPADD_SYNC(group_name));
}
int password_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->PasswordCombo));
if (password_active == 1) {
password = "!*";
} else if (password_active == 2){
password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
if (yon_char_is_empty(password)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
return;
}
} else {
password="";
}
final_string = yon_char_unite(yon_char_return_if_exist(group_users,""),
":",yon_char_return_if_exist(gid,"x"),
":",yon_char_return_if_exist(non_unique,""),
yon_char_return_if_exist(gsystem,""),
":",yon_char_return_if_exist(admins,""),
":",yon_char_return_if_exist(password,""),
NULL);
char *final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",GROUPADD_SYNC(group_name));
yon_config_register(GROUPADD(group_name),final_command,final_string);
yon_interface_update(widgets);
on_subwindow_close(self);
}
void yon_group_delete_confirmation_open(main_window *widgets){
yon_confirmation_window *window = yon_delete_confirmation_new();
gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window));
GtkTreeIter iter,itar;
dictionary *dict = NULL;
gtk_label_set_text(GTK_LABEL(window->TitleLabel),DELETE_GROUP_CONFIRMATION_CONFIRM_LABEL);
gtk_tree_view_column_set_title(window->UserCell,GROUP_LABEL);
gtk_label_set_text(GTK_LABEL(window->HatLabel),DELETE_GROUP_CONFIRMATION_TITLE_LABEL);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),2),0);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),3),0);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(window->DeletionTree),4),0);
yon_dictionary_add_or_create_if_exists_with_data(dict,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
g_signal_connect(G_OBJECT(window->AcceptButton),"clicked",G_CALLBACK(yon_group_delete_confirmation_save),dict);
GtkTreeModel *model = GTK_TREE_MODEL(widgets->GroupsList);
GList *list = gtk_tree_selection_get_selected_rows(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&model);
int chosen_size=0;
config_str chosen = NULL;
for (guint i=0;i<g_list_length(list);i++){
char *current;
gtk_tree_model_get_iter(model,&iter,(GtkTreePath*)g_list_nth_data(list,i));
gtk_tree_model_get(model,&iter,1,&current,-1);
yon_char_parsed_add_or_create_if_exists(chosen,&chosen_size,current);
}
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter);
for (;valid;valid=gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->GroupsList),&iter)){
char *name;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&iter,1,&name,-1);
gtk_list_store_append(window->list,&itar);
gtk_list_store_set(window->list,&itar,0,yon_char_parsed_check_exist(chosen,chosen_size,name)>-1?1:0,1,name,-1);
free(name);
}
gtk_widget_show(window->Window);
}
void yon_group_delete_confirmation_save(GtkWidget *self, dictionary *dict){
GtkTreeIter iter,itar;
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
yon_confirmation_window *window = yon_dictionary_get_data(dict->first->next,yon_confirmation_window*);
int valid = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(widgets->GroupsList),&iter);
for (;valid;valid = gtk_tree_model_iter_next(GTK_TREE_MODEL(widgets->GroupsList),&iter)){
char *name;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&iter,1,&name,-1);
int valid2 = gtk_tree_model_get_iter_first(GTK_TREE_MODEL(window->list),&itar);
for (;valid2;valid2 = gtk_tree_model_iter_next(GTK_TREE_MODEL(window->list),&itar)){
char *name_check;
int delete;
gtk_tree_model_get(GTK_TREE_MODEL(window->list),&itar,0,&delete,1,&name_check,-1);
if (!strcmp(name,name_check)&&delete){
yon_config_remove_by_key(GROUPADD(name));
yon_config_remove_by_key(GROUPADD_SYNC(name));
valid=0;
break;
}
}
}
yon_interface_update(widgets);
on_subwindow_close(self);
}

@ -0,0 +1,152 @@
#include "ubl-settings-usergroups.h"
void on_password_user_changed(GtkComboBox *,ubl_settings_usergroups_user_window *window){
char *passw = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordEntry));
if ((passw[0]=='$')){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),0);
} else {
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBACheck),1);
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck),0);
gtk_widget_set_sensitive(GTK_WIDGET(window->userSyncSAMBAPasswordCheck),1);
}
}
void on_password_change(GtkWidget *, dictionary *entry_dict){
GtkEntry *output_target = yon_dictionary_get_data(entry_dict->first->next,GtkEntry*);
ubl_settings_usergroups_password_window *window = yon_ubl_settings_usergroups_password_new();
dictionary *dict = NULL;
char *password = (char*)gtk_entry_get_text(output_target);
if (!yon_char_is_empty(password)){
if (main_config.load_mode==0){
password = yon_char_new(password);
if (!check_is_password_hash(password)){
gtk_entry_set_text(GTK_ENTRY(window->PasswordHashEntry),password);
} else {
if (password[0]=='%'&&password[1]=='%'){
free(yon_char_divide(password,1));
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck),1);
}
gtk_entry_set_text(GTK_ENTRY(window->PasswordEntry),password);
}
}
}
yon_dictionary_add_or_create_if_exists_with_data(dict,"window",window);
yon_dictionary_add_or_create_if_exists_with_data(dict,"target",output_target);
g_signal_connect(G_OBJECT(window->UserOkButton),"clicked",G_CALLBACK(on_password_accept),dict);
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
gtk_window_set_transient_for(GTK_WINDOW(window->CreateGroupWindow),GTK_WINDOW(gtk_widget_get_toplevel(GTK_WIDGET(output_target))));
gtk_widget_show(window->CreateGroupWindow);
}
void on_password_show_hide(GtkEntry *self, GtkEntryIconPosition icon_pos, GdkEvent*){
if (icon_pos == GTK_ENTRY_ICON_SECONDARY){
int visible = gtk_entry_get_visibility(self);
if (!visible){
gtk_entry_set_visibility(self,1);
} else {
gtk_entry_set_visibility(self,0);
gtk_entry_set_invisible_char(self,'*');
}
}
}
void on_password_accept(GtkWidget *self, dictionary *dict){
ubl_settings_usergroups_password_window *window = yon_dictionary_get_data(dict->first,ubl_settings_usergroups_password_window*);
GtkEntry *entry = yon_dictionary_get_data(dict->first->next,GtkEntry*);
char *password = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordEntry));
char *password_check = (char*)gtk_entry_get_text(GTK_ENTRY(window->RepeatPasswordEntry));
if (yon_char_is_empty(password)){
char *pasted_hash = (char*)gtk_entry_get_text(GTK_ENTRY(window->PasswordHashEntry));
if (!yon_char_is_empty(pasted_hash)){
gtk_entry_set_text(entry,pasted_hash);
} else {
yon_ubl_status_highlight_incorrect(window->PasswordEntry);
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_SHORT_LABEL(yon_char_from_int(main_config.password_min_length)),5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
} else {
for (size_t i=0;i<strlen(password);i++){
if (password[i]=='!'||password[i]=='@'||password[i]=='#'||password[i]=='%'||password[i]=='^'||password[i]=='&'||password[i]=='*'||password[i]=='\"'||password[i]=='\''){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),RESTRICTED_SYMBOLS_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
}
if (yon_char_is_empty(password)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
} else if (password[0]=='%'&&password[1]=='%'){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
if (strlen(password)<main_config.password_min_length){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_SHORT_LABEL(yon_char_from_int(main_config.password_min_length)),5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
if (!strcmp(password,password_check)){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->NoEncriptionCheck))){
char *pasw=yon_char_append("%%",password);
password=pasw;
}
gtk_entry_set_text(GTK_ENTRY(entry),password);
} else {
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),PASSWORD_MISMATCH_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
}
on_subwindow_close(self);
}
ubl_settings_usergroups_password_window *yon_ubl_settings_usergroups_password_new(){
ubl_settings_usergroups_password_window *window = malloc(sizeof(ubl_settings_usergroups_password_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_password);
window->CreateGroupWindow=yon_gtk_builder_get_widget(builder,"CreateGroupWindow");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->PasswordEntry=yon_gtk_builder_get_widget(builder,"PasswordEntry");
window->RepeatPasswordEntry=yon_gtk_builder_get_widget(builder,"RepeatPasswordEntry");
window->PasswordHashEntry=yon_gtk_builder_get_widget(builder,"PasswordHashEntry");
window->HashBox=yon_gtk_builder_get_widget(builder,"HashBox");
window->PasswordBox=yon_gtk_builder_get_widget(builder,"PasswordBox");
window->NoEncriptionCheck=yon_gtk_builder_get_widget(builder,"NoEncriptionCheck");
window->UserCancelButton=yon_gtk_builder_get_widget(builder,"UserCancelButton");
window->UserOkButton=yon_gtk_builder_get_widget(builder,"UserOkButton");
yon_window_config_custom_window_setup(GTK_WINDOW(window->CreateGroupWindow),"PasswordWindow");
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->PasswordEntry),"icon-press",G_CALLBACK(on_password_show_hide),NULL);
g_signal_connect(G_OBJECT(window->RepeatPasswordEntry),"icon-press",G_CALLBACK(on_password_show_hide),NULL);
g_signal_connect(G_OBJECT(window->PasswordHashEntry),"icon-press",G_CALLBACK(on_password_show_hide),NULL);
gtk_window_set_title(GTK_WINDOW(window->CreateGroupWindow),PASSWORD_TITLE_LABEL);
return window;
}
int yon_check_password_blocked(char *password){
if (!yon_char_is_empty(password)){
if (!strcmp(password,"!*")){
memset(password,0,strlen(password));
return 1;
} else if (password[0]=='!'&&password[1]=='*'){
char *copy = yon_char_new(password);
memcpy(copy,password+2,strlen(password+2));
memset(password,0,strlen(password));
memcpy(password,copy,strlen(copy));
free(copy);
return 1;
} else if (password[0]=='!'||password[0]=='*'){
free(yon_char_divide(password,0));
return 1;
}
}
return 0;
}

@ -0,0 +1,835 @@
#include "ubl-settings-usergroups.h"
void on_additional_settings_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window){
if (self == window->DefaultUserNameEntry){
window->default_user_name = gtk_entry_get_text(GTK_ENTRY(window->DefaultUserNameEntry));
} else if (self == window->DefaultPasswordEntry){
window->default_password = gtk_entry_get_text(GTK_ENTRY(window->DefaultPasswordEntry));
} else if (self == window->RootPasswordEntry){
window->default_root_password = gtk_entry_get_text(GTK_ENTRY(window->RootPasswordEntry));
} else if (self == window->PasswordHashCombo){
window->password_hash = "";
} else if (self == window->DefaultUserAdministratorCheck){
window->user_1000_admin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultUserAdministratorCheck));
} else if (self == window->UsersBootCheck){
window->user_boot = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck));
// } else if (self == window->UsersShutdownCheck){
// window->user_shutdown = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersShutdownCheck));
}
}
void on_additional_settings_save(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window){
const char *default_user = (char*)gtk_entry_get_text(GTK_ENTRY(window->DefaultUserNameEntry));
if (!yon_char_is_empty(default_user)){
if (window->default_user_name)
yon_config_register(DEFAULTUSER_parameter,DEFAULTUSER_parameter_command,yon_char_new((char*)default_user));
} else {
if (window->default_user_name)
yon_config_remove_by_key(DEFAULTUSER_parameter);
}
char *default_password = gtk_combo_box_get_active(GTK_COMBO_BOX(window->DefaultPasswordCombo))>1? (char*)gtk_entry_get_text(GTK_ENTRY(window->DefaultPasswordEntry)):NULL;
if (!yon_char_is_empty(default_password)){
if (window->default_password)
yon_config_register(DEFAULTPASSWD_parameter,DEFAULTPASSWD_parameter_command,default_password);
} else {
if (window->default_password)
yon_config_remove_by_key(DEFAULTPASSWD_parameter);
}
char *root_password = gtk_combo_box_get_active(GTK_COMBO_BOX(window->RootPasswordCombo)) > 1 ? (char*)gtk_entry_get_text(GTK_ENTRY(window->RootPasswordEntry)) : NULL;
if (!yon_char_is_empty(root_password)){
if (window->default_root_password)
yon_config_register(DEFAULTROOTPASSWD_parameter,DEFAULTROOTPASSWD_parameter_command,root_password);
} else {
if (window->default_root_password)
yon_config_remove_by_key(DEFAULTROOTPASSWD_parameter);
}
int user_k_admin = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->DefaultUserAdministratorCheck));
if (user_k_admin){
if (window->user_1000_admin)
yon_config_register(ADDADM_parameter,ADDADM_parameter_command,"yes");
} else {
if (window->user_1000_admin)
yon_config_register(ADDADM_parameter,ADDADM_parameter_command,"no");
}
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)){
if (window->password_hash)
yon_config_register(HASHPASSWD_parameter,HASHPASSWD_parameter_command,hash);
}
}else {
if (window->password_hash)
yon_config_remove_by_key(HASHPASSWD_parameter);
}
// char *sync = "";
// int boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck));
// int shutdown_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersShutdownCheck));
// if (!boot_active&&!shutdown_active){
// if (window->user_boot>-1||window->user_boot>-1)
// yon_config_remove_by_key(USERADD_SYNC_parameter);
// } else {
// if (boot_active){
// if (window->user_boot>-1)
// sync = "boot";
// }
// if (shutdown_active){
// if (window->user_shutdown>-1)
// sync = yon_char_unite(sync,yon_char_is_empty(sync)?"":",","shutdown",NULL);
// }
// if (window->user_boot>-1||window->user_boot>-1)
// yon_config_register(USERADD_SYNC_parameter,USERADD_SYNC_parameter_command,sync);
// }
on_useradd_sync_changed(window);
}
void on_additional_settings_user_sync_add(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window){
GtkTreeModel *model;
GtkTreeIter iter;
GtkWidget *tree;
if (self == window->UserAddButton){
tree = window->UsersTree;
} else {
tree = window->GroupsTree;
}
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)){
char *name;
char *parameter;
int min_sensitive;
int max_sensitive;
gtk_tree_model_get(model,&iter,1,&name,7,&min_sensitive,8,&max_sensitive,9,&parameter,-1);
gtk_list_store_append(GTK_LIST_STORE(model),&iter);
gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,1,1,name,5,1,6,1,7,min_sensitive,8,max_sensitive,9,parameter,10,1,11,1,-1);
}
}
void on_additional_settings_user_sync_remove(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window){
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->UsersTree)),&model,&iter)){
gboolean is_indeletable;
gtk_tree_model_get(model,&iter,4,&is_indeletable,-1);
if (!is_indeletable){
gtk_list_store_remove(window->UsersShutdownList,&iter);
}
}
}
void on_additional_settings_group_sync_remove(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window){
GtkTreeModel *model;
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(window->GroupsTree)),&model,&iter)){
gboolean is_indeletable;
gtk_tree_model_get(model,&iter,4,&is_indeletable,-1);
if (!is_indeletable){
gtk_list_store_remove(window->GroupsShutdownList,&iter);
}
}
// on_useradd_sync_changed(window);
}
void on_additional_settings_cell_toggled(GtkCellRenderer *self, char *path, ubl_settings_usergroups_additional_settings_window *window){
GtkTreeIter iter;
GtkTreeModel *model = NULL;
if (self == window->UserActiveCell){
model = GTK_TREE_MODEL(window->UsersShutdownList);
} else {
model = GTK_TREE_MODEL(window->GroupsShutdownList);
}
int status;
gtk_tree_model_get_iter_from_string(model,&iter,path);
gtk_tree_model_get(model,&iter,0,&status,-1);
gtk_list_store_set(GTK_LIST_STORE(model),&iter,0,!status,6,!status,-1);
if (path[0]=='0'&&!!status){
for_iter(model,&iter){
gtk_list_store_set(GTK_LIST_STORE(model),&iter,5,1,-1);
}
} else if (path[0] == '0'&&!status) {
int i=0;
for_iter(model,&iter){
if (i){
gtk_list_store_set(GTK_LIST_STORE(model),&iter,5,0,-1);
}
i++;
}
}
// on_useradd_sync_changed(window);
}
void on_additional_settings_cell_edited(GtkCellRenderer *self, char *path, char *new_text, ubl_settings_usergroups_additional_settings_window *window){
for (size_t i=0;i<strlen(new_text);i++){
if (!g_ascii_isdigit(new_text[i])) return;
}
GtkTreeIter iter;
GtkTreeModel *model = NULL;
int place_to_set = -1;
if (self == window->UserMinCell){
model = GTK_TREE_MODEL(window->UsersShutdownList);
place_to_set=2;
} else if (self == window->UserMaxCell) {
model = GTK_TREE_MODEL(window->UsersShutdownList);
place_to_set=3;
} else if (self == window->GroupMinCell) {
model = GTK_TREE_MODEL(window->GroupsShutdownList);
place_to_set=2;
} else if (self == window->GroupMaxCell) {
model = GTK_TREE_MODEL(window->GroupsShutdownList);
place_to_set=3;
}
gtk_tree_model_get_iter_from_string(model,&iter,path);
char *old_val;
gtk_tree_model_get(model,&iter,place_to_set==2?3:2,&old_val,-1);
if (yon_char_is_empty(old_val)) old_val = "";
if (!yon_char_is_empty(old_val)){
if (place_to_set==2){
if (atoi(new_text)>atoi(old_val)){
new_text=old_val;
}
} else {
if (atoi(old_val)>atoi(new_text)){
new_text = old_val;
}
}
}
gtk_list_store_set(GTK_LIST_STORE(model),&iter,place_to_set,new_text,place_to_set==2?3:2,old_val,-1);
// on_useradd_sync_changed(window);
}
void on_adiitional_settings_tree_selection_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window){
GtkTreeModel *model;
GtkTreeIter iter;
GtkWidget *tree;
GtkWidget *add_button;
GtkWidget *remove_button;
if (self == window->UsersTree){
tree = window->UsersTree;
add_button = window->UserAddButton;
remove_button = window->UserRemoveButton;
} else {
tree = window->GroupsTree;
add_button = window->GroupAddButton;
remove_button = window->GroupRemoveButton;
}
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(tree)),&model,&iter)){
int deletable;
int creatable;
char *parameter;
gtk_tree_model_get(model,&iter,9,&parameter,10,&creatable,11,&deletable,-1);
if (creatable) gtk_widget_set_sensitive(add_button,1); else gtk_widget_set_sensitive(add_button,0);
if (deletable) gtk_widget_set_sensitive(remove_button,1); else gtk_widget_set_sensitive(remove_button,0);
}
}
void on_useradd_sync_changed(ubl_settings_usergroups_additional_settings_window *window){
char *useradd_sync = "";
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck))){
useradd_sync = yon_char_new("boot");
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsersShutdownCheck))){
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"","shutdown",NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
}
GtkTreeIter iter;
for_iter(window->UsersShutdownList,&iter){
int active;
char *min_str, *max_str;
int sensitive;
char *parameter;
gtk_tree_model_get(GTK_TREE_MODEL(window->UsersShutdownList),&iter,0,&active,2,&min_str,3,&max_str,6,&sensitive,9,&parameter,-1);
if (active&&sensitive){
if (!strcmp(parameter,"shutdown@all")){
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
} else if (!strcmp(parameter,"shutdown@users")){
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
} else if (!strcmp(parameter,"shutdown@systems")){
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
} else if (!strcmp(parameter,"shutdown@min-max")){
if (yon_char_is_empty(min_str)||yon_char_is_empty(max_str)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"","shutdown@",min_str,"-",max_str,NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
} else if (!strcmp(parameter,"shutdown@uid")){
if (yon_char_is_empty(min_str)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
char *temp = yon_char_unite(useradd_sync,!yon_char_is_empty(useradd_sync)?",":"","shutdown@",min_str,NULL);
if(!yon_char_is_empty(useradd_sync)) free(useradd_sync);
useradd_sync = temp;
}
}
}
if (!yon_char_is_empty(useradd_sync)){
yon_config_register(USERADD_SYNC_parameter,USERADD_SYNC_get_command,useradd_sync);
} else {
yon_config_remove_by_key(USERADD_SYNC_parameter);
}
char *groupadd_sync = "";
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->GroupsBootCheck))){
groupadd_sync = yon_char_new("boot");
}
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->GroupsShutdownCheck))){
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"","shutdown",NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
}
for_iter(window->GroupsShutdownList,&iter){
int active;
char *min_str, *max_str;
int sensitive;
char *parameter;
gtk_tree_model_get(GTK_TREE_MODEL(window->GroupsShutdownList),&iter,0,&active,2,&min_str,3,&max_str,6,&sensitive,9,&parameter,-1);
if (active&&sensitive){
if (!strcmp(parameter,"shutdown@all")){
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
} else if (!strcmp(parameter,"shutdown@users")){
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
} else if (!strcmp(parameter,"shutdown@systems")){
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"",parameter,NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
} else if (!strcmp(parameter,"shutdown@min-max")){
if (yon_char_is_empty(min_str)||yon_char_is_empty(max_str)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"","shutdown@",min_str,"-",max_str,NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
} else if (!strcmp(parameter,"shutdown@gid")){
if (yon_char_is_empty(min_str)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
return;
}
char *temp = yon_char_unite(groupadd_sync,!yon_char_is_empty(groupadd_sync)?",":"","shutdown@",min_str,NULL);
if(!yon_char_is_empty(groupadd_sync)) free(groupadd_sync);
groupadd_sync = temp;
}
}
}
if (!yon_char_is_empty(groupadd_sync)){
yon_config_register(GROUPADD_SYNC_parameter,GROUPADD_SYNC_parameter_command,groupadd_sync);
} else {
yon_config_remove_by_key(GROUPADD_SYNC_parameter);
}
on_subwindow_close(window->Window);
}
ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_additional_settings_new(){
ubl_settings_usergroups_additional_settings_window *window = malloc(sizeof(ubl_settings_usergroups_additional_settings_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_additional_settings);
window->Window=yon_gtk_builder_get_widget(builder,"Window");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->DefaultUserNameEntry=yon_gtk_builder_get_widget(builder,"DefaultUserNameEntry");
window->DefaultUserAdministratorCheck=yon_gtk_builder_get_widget(builder,"DefaultUserAdministratorCheck");
window->DefaultPasswordCombo=yon_gtk_builder_get_widget(builder,"DefaultPasswordCombo");
window->DefaultPasswordEntry=yon_gtk_builder_get_widget(builder,"DefaultPasswordEntry");
window->DefaultPasswordButton=yon_gtk_builder_get_widget(builder,"DefaultPasswordButton");
window->RootPasswordCombo=yon_gtk_builder_get_widget(builder,"RootPasswordCombo");
window->RootPasswordEntry=yon_gtk_builder_get_widget(builder,"RootPasswordEntry");
window->RootPasswordButton=yon_gtk_builder_get_widget(builder,"RootPasswordButton");
window->PasswordHashCombo=yon_gtk_builder_get_widget(builder,"PasswordHashCombo");
window->EncryptAllPasswordsButton=yon_gtk_builder_get_widget(builder,"EncryptAllPasswordsButton");
window->CancelButton=yon_gtk_builder_get_widget(builder,"CancelButton");
window->AcceptButton=yon_gtk_builder_get_widget(builder,"AcceptButton");
window->UsersBootCheck=yon_gtk_builder_get_widget(builder,"UsersBootCheck");
window->UsersShutdownCheck=yon_gtk_builder_get_widget(builder,"UsersShutdownCheck");
window->UsersShutdownExpander=yon_gtk_builder_get_widget(builder,"UsersShutdownExpander");
window->UserShutdownRevealer=yon_gtk_builder_get_widget(builder,"UserShutdownRevealer");
window->UsersTree=yon_gtk_builder_get_widget(builder,"UsersTree");
window->UserAddButton=yon_gtk_builder_get_widget(builder,"UserAddButton");
window->UserRemoveButton=yon_gtk_builder_get_widget(builder,"UserRemoveButton");
window->GroupsBootCheck=yon_gtk_builder_get_widget(builder,"GroupsBootCheck");
window->GroupsShutdownCheck=yon_gtk_builder_get_widget(builder,"GroupsShutdownCheck");
window->GroupsShutdownExpander=yon_gtk_builder_get_widget(builder,"GroupShutdownExpander");
window->GroupShutdownRevealer=yon_gtk_builder_get_widget(builder,"GroupShutdownRevealer");
window->GroupsTree=yon_gtk_builder_get_widget(builder,"GroupsTree");
window->GroupAddButton=yon_gtk_builder_get_widget(builder,"GroupAddButton");
window->GroupRemoveButton=yon_gtk_builder_get_widget(builder,"GroupRemoveButton");
window->UsersShutdownList=GTK_LIST_STORE(gtk_builder_get_object(builder,"UsersShutdownList"));
window->GroupsShutdownList=GTK_LIST_STORE(gtk_builder_get_object(builder,"GroupsShutdownList"));
window->UserActiveCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"UserActiveCell"));
window->UserMinCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"UserMinCell"));
window->UserMaxCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"UserMaxCell"));
window->GroupActiveCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"GroupActiveCell"));
window->GroupMinCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"GroupMinCell"));
window->GroupMaxCell=GTK_CELL_RENDERER(gtk_builder_get_object(builder,"GroupMaxCell"));
yon_gtk_revealer_set_from_expander(GTK_REVEALER(window->UserShutdownRevealer),GTK_EXPANDER(window->UsersShutdownExpander));
yon_gtk_revealer_set_from_expander(GTK_REVEALER(window->GroupShutdownRevealer),GTK_EXPANDER(window->GroupsShutdownExpander));
window->default_password=NULL;
window->default_root_password=NULL;
window->default_user_name=NULL;
window->user_1000_admin=-1;
window->user_shutdown=-1;
window->user_boot=-1;
window->password_hash=NULL;
char *useradd_sync = yon_config_get_by_key(USERADD_SYNC_parameter);
char *groupadd_sync = yon_config_get_by_key(GROUPADD_SYNC_parameter);
if (!yon_char_is_empty(useradd_sync)){
GtkTreeModel *model = GTK_TREE_MODEL(window->UsersShutdownList);
GtkTreeIter iter;
int useradd_sync_size;
config_str parsed = yon_char_parse(useradd_sync,&useradd_sync_size,",");
if (yon_char_parsed_check_exist(parsed,useradd_sync_size,"shutdown@all")){
int a=0;
for_iter(model,&iter){
if (!a){
gtk_list_store_set(window->UsersShutdownList,&iter,6,0,-1);
a++;
} else {
gtk_list_store_set(window->UsersShutdownList,&iter,5,1,-1);
}
}
}
int uid_set=0, maxmin_set=0;
for (int i=0;i<useradd_sync_size;i++){
gtk_expander_set_expanded(GTK_EXPANDER(window->UsersShutdownExpander),1);
gtk_revealer_set_reveal_child(GTK_REVEALER(window->UserShutdownRevealer),1);
if (!strcmp(parsed[i],"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck),1);
} else if (!strcmp(parsed[i],"shutdown@all")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,7,0,8,0,-1);
} else if (!strcmp(parsed[i],"shutdown@users")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,0,5,0,6,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"1");
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,5,1,6,1,7,0,8,0,-1);
} else if (!strcmp(parsed[i],"shutdown@systems")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,0,5,0,6,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"2");
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,5,1,6,1,7,0,8,0,-1);
} else if (strstr(parsed[i],"-")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,0,5,0,6,0,-1);
if (!maxmin_set){
gtk_tree_model_get_iter_from_string(model,&iter,"3");
maxmin_set++;
} else {
gtk_list_store_append(window->UsersShutdownList,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,1,SHUTDOWN_UID_RANGE_LABEL,5,1,6,1,7,1,8,1,9,"shutdown@uid",10,1,11,1,-1);
}
char *temp = yon_char_new(parsed[i]);
free(yon_char_divide_search(temp,"@",-1));
char *min = yon_char_divide_search(temp,"-",-1);
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,2,min,3,temp,6,1,7,1,8,1,-1);
} else if (strstr(parsed[i],"shutdown@")) {
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,0,5,0,6,0,-1);
if (!uid_set){
gtk_tree_model_get_iter_from_string(model,&iter,"4");
uid_set++;
} else {
gtk_list_store_append(window->UsersShutdownList,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,1,SHUTDOWN_UID_LABEL,5,1,6,1,7,1,8,0,9,"shutdown@uid",10,1,11,1,-1);
}
char *temp = yon_char_new(parsed[i]);
free(yon_char_divide_search(temp,"@",-1));
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,2,temp,6,1,7,1,8,1,-1);
} else if (!strcmp(parsed[i],"shutdown")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->UsersShutdownList,&iter,0,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"1");
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,5,1,6,1,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"2");
gtk_list_store_set(window->UsersShutdownList,&iter,0,1,5,1,6,1,-1);
}
}
}
if (!yon_char_is_empty(groupadd_sync)){
GtkTreeModel *model = GTK_TREE_MODEL(window->GroupsShutdownList);
GtkTreeIter iter;
int useradd_sync_size;
config_str parsed = yon_char_parse(groupadd_sync,&useradd_sync_size,",");
if (yon_char_parsed_check_exist(parsed,useradd_sync_size,"shutdown@all")){
int a=0;
for_iter(model,&iter){
if (!a){
gtk_list_store_set(window->GroupsShutdownList,&iter,6,0,-1);
a++;
} else {
gtk_list_store_set(window->GroupsShutdownList,&iter,5,1,-1);
}
}
}
gtk_expander_set_expanded(GTK_EXPANDER(window->GroupsShutdownExpander),1);
gtk_revealer_set_reveal_child(GTK_REVEALER(window->GroupShutdownRevealer),1);
int uid_set=0, maxmin_set=0;
for (int i=0;i<useradd_sync_size;i++){
if (!strcmp(parsed[i],"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->GroupsBootCheck),1);
} else if (!strcmp(parsed[i],"shutdown@all")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,-1);
} else if (!strcmp(parsed[i],"shutdown@users")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"1");
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,5,1,6,1,-1);
} else if (!strcmp(parsed[i],"shutdown@systems")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"2");
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,5,1,6,1,-1);
} else if (strstr(parsed[i],"-")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,0,-1);
if (!maxmin_set){
gtk_tree_model_get_iter_from_string(model,&iter,"3");
maxmin_set++;
} else {
gtk_list_store_append(window->GroupsShutdownList,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,1,SHUTDOWN_GID_RANGE_LABEL,5,1,6,1,9,"shutdown@uid",10,1,11,1,-1);
}
char *temp = yon_char_new(parsed[i]);
free(yon_char_divide_search(temp,"@",-1));
char *min = yon_char_divide_search(temp,"-",-1);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,2,min,3,temp,6,1,7,1,8,1,-1);
} else if (strstr(parsed[i],"shutdown@")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,0,-1);
if (!uid_set){
gtk_tree_model_get_iter_from_string(model,&iter,"4");
uid_set++;
} else {
gtk_list_store_append(window->GroupsShutdownList,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,1,SHUTDOWN_GID_LABEL,5,1,6,1,7,1,8,1,9,"shutdown@uid",10,1,11,1,-1);
}
char *temp = yon_char_new(parsed[i]);
free(yon_char_divide_search(temp,"@",-1));
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,2,temp,5,1,6,1,-1);
} else if (!strcmp(parsed[i],"shutdown")){
gtk_tree_model_get_iter_first(model,&iter);
gtk_list_store_set(window->GroupsShutdownList,&iter,0,0,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"1");
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,6,1,-1);
gtk_tree_model_get_iter_from_string(model,&iter,"2");
gtk_list_store_set(window->GroupsShutdownList,&iter,0,1,6,1,-1);
}
}
}
g_signal_connect(G_OBJECT(window->UserAddButton),"clicked",G_CALLBACK(on_additional_settings_user_sync_add),window);
g_signal_connect(G_OBJECT(window->UserRemoveButton),"clicked",G_CALLBACK(on_additional_settings_user_sync_remove),window);
g_signal_connect(G_OBJECT(window->GroupAddButton),"clicked",G_CALLBACK(on_additional_settings_user_sync_add),window);
g_signal_connect(G_OBJECT(window->GroupRemoveButton),"clicked",G_CALLBACK(on_additional_settings_group_sync_remove),window);
g_signal_connect(G_OBJECT(window->UserActiveCell),"toggled",G_CALLBACK(on_additional_settings_cell_toggled),window);
g_signal_connect(G_OBJECT(window->GroupActiveCell),"toggled",G_CALLBACK(on_additional_settings_cell_toggled),window);
g_signal_connect(G_OBJECT(window->UserMinCell),"edited",G_CALLBACK(on_additional_settings_cell_edited),window);
g_signal_connect(G_OBJECT(window->UserMaxCell),"edited",G_CALLBACK(on_additional_settings_cell_edited),window);
g_signal_connect(G_OBJECT(window->GroupMinCell),"edited",G_CALLBACK(on_additional_settings_cell_edited),window);
g_signal_connect(G_OBJECT(window->GroupMaxCell),"edited",G_CALLBACK(on_additional_settings_cell_edited),window);
g_signal_connect(G_OBJECT(window->UsersShutdownExpander),"activate",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->GroupsShutdownExpander),"activate",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->UsersShutdownCheck),"toggled",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->GroupsShutdownCheck),"toggled",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->UsersTree),"cursor-changed",G_CALLBACK(on_adiitional_settings_tree_selection_changed),window);
g_signal_connect(G_OBJECT(window->GroupsTree),"cursor-changed",G_CALLBACK(on_adiitional_settings_tree_selection_changed),window);
yon_window_config_custom_window_setup(GTK_WINDOW(window->Window),"AdditionalSettingsWindow");
gtk_window_set_title(GTK_WINDOW(window->Window),ADDITIONAL_SETTINGS_TITLE_LABEL);
{
char *sync_parameters = yon_config_get_by_key(USERADD_SYNC_parameter);
int size;
config_str parsed = yon_char_parse(sync_parameters,&size,",");
if (sync_parameters){
if (strstr(sync_parameters,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsersBootCheck),1);
}
if (yon_char_parsed_check_exist(parsed,size,"shutdown")!=-1){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->UsersShutdownCheck),1);
}
}
}
{
char *sync_parameters = yon_config_get_by_key(GROUPADD_SYNC_parameter);
int size;
config_str parsed = yon_char_parse(sync_parameters,&size,",");
if (sync_parameters){
if (strstr(sync_parameters,"boot")){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->GroupsBootCheck),1);
}
if (yon_char_parsed_check_exist(parsed,size,"shutdown")!=-1){
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->GroupsShutdownCheck),1);
}
}
}
int hash_size=0;
config_str hash_algos = yon_file_open(hash_list_path,&hash_size);
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';
for (int i=0;i<hash_size;i++){
if (hash_algos[i][0]!='!'){
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
int parsed_size;
config_str parsed = yon_char_parse(hash_algos[i],&parsed_size,";");
if (!strcmp(hash,parsed[0])){
char *def_settings = yon_char_new(parsed[1]);
char *def = yon_char_divide_search(def_settings," ",-1);
free(def_settings);
gtk_combo_box_text_append_text(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),yon_char_unite(DEFAULT_USER_LABEL," (",def,")",NULL));
}
}
}
}
}
for (int i=1;i<hash_size;i++){
if (hash_algos[i][0]!='!'){
if (hash_algos[i][strlen(hash_algos[i])-1]=='\n') hash_algos[i][strlen(hash_algos[i])-1]='\0';
int parsed_size;
config_str parsed = yon_char_parse(hash_algos[i],&parsed_size,";");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->PasswordHashCombo),parsed[0],_(parsed[1]));
gtk_widget_set_tooltip_text(window->PasswordHashCombo,parsed[1]);
yon_char_parsed_free(parsed,parsed_size);
}
}
yon_char_parsed_free(hash_algos,hash_size);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->PasswordHashCombo),0);
char *default_user = yon_config_get_by_key(DEFAULTUSER_parameter);
if (!yon_char_is_empty(default_user))
gtk_entry_set_text(GTK_ENTRY(window->DefaultUserNameEntry),default_user);
g_signal_connect(G_OBJECT(window->RootPasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->RootPasswordButton);
g_signal_connect(G_OBJECT(window->DefaultPasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->DefaultPasswordButton);
char *default_password = yon_config_get_by_key(DEFAULTPASSWD_parameter);
if (!yon_char_is_empty(default_password)){
gtk_entry_set_text(GTK_ENTRY(window->DefaultPasswordEntry),default_password);
if(!yon_config_check_ignore(DEFAULTPASSWD_parameter))
gtk_combo_box_set_active(GTK_COMBO_BOX(window->DefaultPasswordCombo),2);
}
char *root_password = yon_config_get_by_key(DEFAULTROOTPASSWD_parameter);
if (!yon_char_is_empty(root_password)){
gtk_entry_set_text(GTK_ENTRY(window->RootPasswordEntry),root_password);
if(!yon_config_check_ignore(DEFAULTROOTPASSWD_parameter))
gtk_combo_box_set_active(GTK_COMBO_BOX(window->RootPasswordCombo),2);
}
char *is_k_admin = yon_config_get_by_key(ADDADM_parameter);
if (!yon_char_is_empty(is_k_admin))
if (!strcmp(is_k_admin,"yes"))
gtk_toggle_button_set_active(GTK_TOGGLE_BUTTON(window->DefaultUserAdministratorCheck),1);
char *hash = yon_config_get_by_key(HASHPASSWD_parameter);
if (!yon_char_is_empty(hash)){
gtk_combo_box_set_active_id(GTK_COMBO_BOX(window->PasswordHashCombo),hash);
}
// char *parameter = config(USERADD_SYNC_parameter);
// {
// int size;
// config_str parsed = yon_char_parse(parameter,&size,",");
// int sync_parameters_size;
// config_str sync_parameters = yon_resource_open_file(sync_parameters_path,&sync_parameters_size);
// for(int i=0;i<size;i++){
// for (int j=1;j<sync_parameters_size;j++){
// int sync_parsed_size;
// config_str sync_parsed = yon_char_parse(sync_parameters[j],&sync_parsed_size,":");
// int cur_size;
// int sync_check = yon_parameter_check_tag(parsed[i],sync_parsed[0]);
// if (sync_check) {
// config_str cur = yon_parameter_get_by_template(parsed[i],sync_parsed[0],&cur_size);
// if (cur){
// GtkTreeIter iter;
// gtk_list_store_append(window->UsersShutdownList,&iter);
// gtk_list_store_set(window->UsersShutdownList,&iter,1,sync_parsed[0],2,cur[0],3,cur_size>1?cur[1]:"",-1);
// };
// }
// yon_char_parsed_free(sync_parsed,sync_parsed_size);
// }
// }
// }
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);
dictionary *default_dict=NULL;
yon_dictionary_add_or_create_if_exists_with_data(default_dict,"combo",window->DefaultPasswordCombo);
yon_dictionary_add_or_create_if_exists_with_data(default_dict,"entry",window->DefaultPasswordEntry);
dictionary *root_dict=NULL;
yon_dictionary_add_or_create_if_exists_with_data(root_dict,"combo",window->RootPasswordCombo);
yon_dictionary_add_or_create_if_exists_with_data(root_dict,"entry",window->RootPasswordEntry);
g_signal_connect(G_OBJECT(window->DefaultPasswordButton),"clicked",G_CALLBACK(on_password_change),default_dict);
g_signal_connect(G_OBJECT(window->RootPasswordButton),"clicked",G_CALLBACK(on_password_change),root_dict);
dialog_confirmation_data *data=malloc(sizeof(dialog_confirmation_data));
data->function=on_passwords_encrypt;
data->action_text = ENCRYPT_SURE_LABEL;
data->data=NULL;
g_signal_connect(G_OBJECT(window->EncryptAllPasswordsButton),"clicked",G_CALLBACK(yon_confirmation_dialog_call),data);
g_signal_connect(G_OBJECT(window->PasswordHashCombo),"changed",G_CALLBACK(on_hash_changed),window);
g_signal_connect(G_OBJECT(window->DefaultUserNameEntry),"changed",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->DefaultPasswordEntry),"changed",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->RootPasswordEntry),"changed",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->PasswordHashCombo),"changed",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->DefaultUserAdministratorCheck),"toggled",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->UsersBootCheck),"toggled",G_CALLBACK(on_additional_settings_changed),window);
g_signal_connect(G_OBJECT(window->GroupsBootCheck),"toggled",G_CALLBACK(on_additional_settings_changed),window);
// g_signal_connect(G_OBJECT(window->UsersBootCheck),"toggled",G_CALLBACK(on_users_boot_toggled),NULL);
// g_signal_connect(G_OBJECT(window->UsersShutdownCheck),"toggled",G_CALLBACK(on_users_shutdown_toggled),NULL);
return window;
}
void on_ubl_settings_usergroups_additional_settings_open(GtkWidget *, main_window *widgets){
ubl_settings_usergroups_additional_settings_window *window = yon_ubl_settings_usergroups_additional_settings_new();
gtk_window_set_transient_for(GTK_WINDOW(window->Window),GTK_WINDOW(widgets->Window));
gtk_widget_show(window->Window);
}
config_str yon_parameter_parse(char *parameter, int *size){
if (yon_char_is_empty(parameter)) return NULL;
char *cur;
(*size)=0;
if ((cur = strstr(parameter,"<"))){
config_str parsed = yon_char_parse(parameter,size,">");
for (int i=0;i<(*size);i++){
char *tag = strstr(parsed[i],">");
int length = strlen(parsed[i])-strlen(tag+1);
free(yon_char_divide(parsed[i],length));
}
return parsed;
} else {
config_str parsed = yon_char_parsed_new(size,parameter,NULL);
return parsed;
}
}
int yon_parameter_check_tag(char *parameter, char *pattern){
char *tag_template = "[0-9]{1,}";
char *converted = "";
char *current = pattern;
while (!yon_char_is_empty(current)){
if ((*current)=='<'){
char *end = strchr(current,'>');
if (end){
converted = yon_char_append(converted,tag_template);
current = end+1;
} else {
// закрытие тэга не найдено
}
} else {
char *temp = yon_char_append_c(converted,*current);
if (!yon_char_is_empty(converted)) free(converted);
converted = temp;
current++;
}
}
GRegex *regex = g_regex_new(converted,G_REGEX_EXTENDED,0,NULL);
if (regex){
GMatchInfo *match;
if (g_regex_match(regex,parameter,0,&match)){
char *value = g_match_info_fetch(match, 0);
if (!strcmp(parameter,value))
return 1;
}
}
return 0;
}
config_str yon_parameter_get_by_template(char *parameter, char *pattern, int *size){
config_str final = NULL;
char *tag_template = "[0-9]{1,}";
char *converted = "";
char *current = pattern;
while (!yon_char_is_empty(current)){
if ((*current)=='<'){
char *end = strchr(current,'>');
if (end){
converted = yon_char_append(converted,tag_template);
current = end+1;
} else {
// закрытие тэга не найдено
}
} else {
char *temp = yon_char_append_c(converted,*current);
if (!yon_char_is_empty(converted)) free(converted);
converted=temp;
current++;
}
}
GRegex *regex = g_regex_new("[0-9]{1,}",G_REGEX_EXTENDED,0,NULL);
if (regex){
GMatchInfo *match;
if (g_regex_match(regex, parameter, 0, &match)) {
while (g_match_info_matches(match)) {
char *value = g_match_info_fetch(match, 0);
yon_char_parsed_add_or_create_if_exists(final, size, value);
g_free(value);
g_match_info_next(match, NULL);
}
}
g_match_info_free(match);
}
g_regex_unref(regex);
return final;
}

@ -0,0 +1,159 @@
#include "ubl-settings-usergroups.h"
void on_delete_system_user(GtkWidget *, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
yon_confirmation_window *dialog = yon_dictionary_get_data(dict->first->next,yon_confirmation_window*);
GtkTreeModel *model = GTK_TREE_MODEL(dialog->list);
GtkTreeIter iter;
char *command=NULL;
for_iter(model,&iter){
int status,delete_home_status;
char *target;
gtk_tree_model_get(model,&iter,0,&status,1,&target,3,&delete_home_status,-1);
if (command) command=yon_char_unite(command,"; ",delete_home_status?remove_user_and_homedir_from_system_command(target):remove_user_from_system_command(target),NULL);
else command = delete_home_status?remove_user_and_homedir_from_system_command(target):remove_user_from_system_command(target);
}
if (!yon_char_is_empty(command)){
if (system(yon_debug_output("%s\n",command))){
yon_ubl_status_box_render(USER_REMOVE_ERROR,BACKGROUND_IMAGE_FAIL_TYPE);
} else {
textdomain(template_ui_LocaleName);
yon_ubl_status_box_render(SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
textdomain(LocalePath);
}
}
on_subwindow_close(dialog->Window);
yon_system_load(widgets);
}
void on_delete_system_group(GtkWidget *, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
yon_confirmation_window *dialog = yon_dictionary_get_data(dict->first->next,yon_confirmation_window*);
GtkTreeModel *model = GTK_TREE_MODEL(dialog->list);
GtkTreeIter iter;
char *command=NULL;
for_iter(model,&iter){
int status,delete_home_status;
char *target;
gtk_tree_model_get(model,&iter,0,&status,1,&target,3,&delete_home_status,-1);
if (command) command=yon_char_unite(command,"; ",remove_group_from_system_command(target),NULL);
else command = remove_group_from_system_command(target);
}
if (!yon_char_is_empty(command)){
if (system(yon_debug_output("%s\n",command))){
yon_ubl_status_box_render(USER_REMOVE_ERROR,BACKGROUND_IMAGE_FAIL_TYPE);
} else {
textdomain(template_ui_LocaleName);
yon_ubl_status_box_render(SUCCESS_LABEL,BACKGROUND_IMAGE_SUCCESS_TYPE);
textdomain(LocalePath);
}
}
on_subwindow_close(dialog->Window);
yon_system_load(widgets);
}
void yon_remove_confirmation_window_accept_clicked(GtkWidget *self,dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window *);
system_remove_confirmation_window *window = yon_dictionary_get_data(dict->first->next,system_remove_confirmation_window *);
if (self == window->ConfigAcceptButton){
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==2){
GtkTreeIter iter, itar;
GtkTreeModel *model;
char *target;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemTree)),&model,&iter)){
gtk_tree_model_get(model,&iter,2,&target,-1);
}
for_iter(GTK_TREE_MODEL(widgets->UsersList),&itar){
char *cur;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->UsersList),&itar,2,&cur,-1);
if (!strcmp(target,cur)){
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&itar);
break;
}
}
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->MainNotebook),0);
yon_delete_confirmation_open(widgets);
} else if (self == window->AcceptButton || self == window->SystemAcceptButton) {
GtkTreeIter iter, itar;
GtkTreeModel *model;
char *target;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemGroupsTree)),&model,&iter)){
gtk_tree_model_get(model,&iter,1,&target,-1);
}
for_iter(GTK_TREE_MODEL(widgets->GroupsList),&itar){
char *cur;
gtk_tree_model_get(GTK_TREE_MODEL(widgets->GroupsList),&itar,1,&cur,-1);
if (!strcmp(target,cur)){
gtk_tree_selection_select_iter(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->GroupsTree)),&itar);
break;
}
}
gtk_notebook_set_current_page(GTK_NOTEBOOK(widgets->MainNotebook),1);
yon_group_delete_confirmation_open(widgets);
}
} else {
yon_confirmation_window *dialog = yon_delete_confirmation_new();
dictionary *dact = NULL;
yon_dictionary_add_or_create_if_exists_with_data(dact,"widgets",widgets);
yon_dictionary_add_or_create_if_exists_with_data(dact,"dialog",dialog);
if (gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook))==2){
gtk_label_set_text(GTK_LABEL(dialog->TitleLabel),DELETE_CONFIRMATION_CONFIRM_LABEL);
gtk_label_set_text(GTK_LABEL(dialog->HatLabel),DELETE_CONFIRMATION_TITLE_LABEL);
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(widgets->Window),DELETE_CONFIRMATION_TITLE_LABEL,icon_path,"delete-system-user-window");
g_signal_connect(G_OBJECT(dialog->AcceptButton),"clicked",G_CALLBACK(on_delete_system_user),dact);
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->SystemTree));
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemTree)),&model,&iter)){
char *name,*username,*homedir=NULL;
gtk_tree_model_get(model,&iter,2,&name,3,&username,6,&homedir,-1);
gtk_list_store_append(dialog->list,&iter);
gtk_list_store_set(dialog->list,&iter,0,1,1,name,2,homedir,4,!yon_char_is_empty(homedir),5,username,-1);
gtk_widget_show(dialog->Window);
}
} else {
GtkTreeModel *model = gtk_tree_view_get_model(GTK_TREE_VIEW(widgets->SystemGroupsTree));
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemGroupsTree)),&model,&iter)){
yon_gtk_window_setup(GTK_WINDOW(dialog->Window),GTK_WINDOW(widgets->Window),DELETE_GROUP_CONFIRMATION_TITLE_LABEL,icon_path,"delete-system-gruop-window");
g_signal_connect(G_OBJECT(dialog->AcceptButton),"clicked",G_CALLBACK(on_delete_system_group),dact);
gtk_widget_show(window->AcceptButton);
gtk_widget_hide(window->ConfigAcceptButton);
gtk_widget_hide(window->SystemAcceptButton);
char *name;
gtk_label_set_text(GTK_LABEL(window->TitleLabel),DELETE_GROUP_CONFIRMATION_CONFIRM_LABEL);
gtk_label_set_text(GTK_LABEL(dialog->HatLabel),DELETE_GROUP_CONFIRMATION_TITLE_LABEL);
gtk_tree_view_column_set_title(dialog->UserCell,GROUP_LABEL);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(dialog->DeletionTree),2),0);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(dialog->DeletionTree),3),0);
gtk_tree_view_column_set_visible(gtk_tree_view_get_column(GTK_TREE_VIEW(dialog->DeletionTree),4),0);
gtk_tree_model_get(model,&iter,1,&name,-1);
gtk_list_store_append(dialog->list,&iter);
gtk_list_store_set(dialog->list,&iter,0,1,1,name,-1);
gtk_widget_show(dialog->Window);
}
}
}
on_subwindow_close(self);
}
system_remove_confirmation_window *yon_system_remove_confirmation_window_new(){
system_remove_confirmation_window *window = malloc(sizeof(system_remove_confirmation_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_system_deletion_confirmation);
window->Window = yon_gtk_builder_get_widget(builder,"Window");
window->HeaderLabel = yon_gtk_builder_get_widget(builder,"HeaderLabel");
window->CancelButton = yon_gtk_builder_get_widget(builder,"CancelButton");
window->StatusBox = yon_gtk_builder_get_widget(builder,"StatusBox");
window->TitleLabel = yon_gtk_builder_get_widget(builder,"TitleLabel");
window->AcceptButton = yon_gtk_builder_get_widget(builder,"AcceptButton");
window->ConfigAcceptButton = yon_gtk_builder_get_widget(builder,"ConfigAcceptButton");
window->SystemAcceptButton = yon_gtk_builder_get_widget(builder,"SystemAcceptButton");
g_signal_connect(G_OBJECT(window->CancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
return window;
}

@ -0,0 +1,656 @@
#include "ubl-settings-usergroups.h"
void on_parameter_changed(GtkWidget *,ubl_settings_usergroups_user_window *window){
char *user_shell=NULL;
char *user_home=NULL;
char *login=NULL;
char *create_system_user=NULL;
char *create_ununique=NULL;
char *do_not_check=NULL;
char *main_group=NULL;
char *no_user_group=NULL;
int do_not_check_actve = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck));
if (do_not_check_actve)
do_not_check = "--badnames";
login = (char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry));
if (login[0]>'0'&&login[0]<'9'&&!do_not_check_actve){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),USER_BEGINS_WITH_DIGIT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
if (yon_char_is_empty(login)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
int user_shell_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo));
if (user_shell_active>0){
user_shell = yon_char_unite("--shell ",!strcmp(gtk_combo_box_get_active_id(GTK_COMBO_BOX(window->userShellCombo)),"Set")?(char*)gtk_entry_get_text(GTK_ENTRY(window->userShellEntry)):(char*)gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo)),NULL);
} else user_shell="";
int user_home_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userHomeCombo));
if (user_home_active==2){
char *path = (char*)gtk_entry_get_text(GTK_ENTRY(window->userHomeEntry));
if (!yon_char_is_empty(path))
user_home=yon_char_unite("--home-dir ",path,NULL);
else user_home = "";
} else if (user_home_active==1){
user_home="--no-create-home";
} else user_home = "";
int system_user_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck));
if (system_user_active)
create_system_user = "--system";
int create_ununique_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck));
if (create_ununique_active)
create_ununique = "--non-unique";
int main_group_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck));
if (!main_group_active){
main_group = (char*)gtk_entry_get_text(GTK_ENTRY(window->userGroupsEntry));
if (yon_char_is_empty(main_group)){
no_user_group="--no-user-group";
}
} else {
main_group = "";
}
char *final_string = user_home;
final_string = yon_char_unite(final_string,!yon_char_is_empty(final_string)?" ":"",
yon_char_return_if_exist(user_shell,""),
!yon_char_is_empty(user_shell)?" ":"",
yon_char_return_if_exist(create_system_user,""),
!yon_char_is_empty(create_system_user)?" ":"",
yon_char_return_if_exist(create_ununique,""),
!yon_char_is_empty(create_ununique)?" ":"",
yon_char_return_if_exist(do_not_check,""),
!yon_char_is_empty(do_not_check)?" ":"",
yon_char_return_if_exist(no_user_group,""),
NULL);
if (final_string&&strlen(final_string)){
if (final_string[strlen(final_string)-1]==' ') final_string[strlen(final_string)-1]='\0';
gtk_entry_set_text(GTK_ENTRY(window->userExtraOptionsEntry),final_string);
free(final_string);
} else {
gtk_entry_set_text(GTK_ENTRY(window->userExtraOptionsEntry),"");
}
}
ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new(){
ubl_settings_usergroups_user_window *window = malloc(sizeof(ubl_settings_usergroups_user_window));
GtkBuilder *builder = gtk_builder_new_from_resource(glade_path_ubl_settings_usergroups_user);
window->CreateUserWindow=yon_gtk_builder_get_widget(builder,"CreateUserWindow");
window->StatusBox=yon_gtk_builder_get_widget(builder,"StatusBox");
window->userUIDAutoCheck=yon_gtk_builder_get_widget(builder,"userUIDAutoCheck");
window->userUIDEntry=yon_gtk_builder_get_widget(builder,"userUIDEntry");
window->userLoginEntry=yon_gtk_builder_get_widget(builder,"userLoginEntry");
window->userPasswordCombo=yon_gtk_builder_get_widget(builder,"userPasswordCombo");
window->userPasswordEntry=yon_gtk_builder_get_widget(builder,"userPasswordEntry");
window->userPasswordButton=yon_gtk_builder_get_widget(builder,"userPasswordButton");
window->userUserNameEntry=yon_gtk_builder_get_widget(builder,"userUserNameEntry");
window->userGroupsCheck=yon_gtk_builder_get_widget(builder,"userGroupsCheck");
window->userGroupsEntry=yon_gtk_builder_get_widget(builder,"userGroupsEntry");
window->UserGroupsButton=yon_gtk_builder_get_widget(builder,"UserGroupsButton");
window->userAdditionalGroupsEntry=yon_gtk_builder_get_widget(builder,"userAdditionalGroupsEntry");
window->userAdditionalGroupsButton=yon_gtk_builder_get_widget(builder,"userAdditionalGroupsButton");
window->userPasswordChangedEntry=yon_gtk_builder_get_widget(builder,"userPasswordChangedEntry");
window->userPasswordExpirationEntry=yon_gtk_builder_get_widget(builder,"userPasswordExpirationEntry");
window->userPasswordExpirationButton=yon_gtk_builder_get_widget(builder,"userPasswordExpirationButton");
window->userPasswordChangeDelayMinimumSpin=yon_gtk_builder_get_widget(builder,"userPasswordChangeDelayMinimumSpin");
window->userPasswordChangeDelayMaximumSpin=yon_gtk_builder_get_widget(builder,"userPasswordChangeDelayMaximumSpin");
window->userWarningSpin=yon_gtk_builder_get_widget(builder,"userWarningSpin");
window->userActivitySpin=yon_gtk_builder_get_widget(builder,"userActivitySpin");
window->userForceChangeCheck=yon_gtk_builder_get_widget(builder,"userForceChangeCheck");
window->userShellCombo=yon_gtk_builder_get_widget(builder,"userShellCombo");
window->userShellEntry=yon_gtk_builder_get_widget(builder,"userShellEntry");
window->userHomeCombo=yon_gtk_builder_get_widget(builder,"userHomeCombo");
window->userHomeEntry=yon_gtk_builder_get_widget(builder,"userHomeEntry");
window->userHomeButton=yon_gtk_builder_get_widget(builder,"userHomeButton");
window->userCreateSystemCheck=yon_gtk_builder_get_widget(builder,"userCreateSystemCheck");
window->userCreateUnuniqueCheck=yon_gtk_builder_get_widget(builder,"userCreateUnuniqueCheck");
window->userDontCheckCheck=yon_gtk_builder_get_widget(builder,"userDontCheckCheck");
window->userSyncSAMBACheck=yon_gtk_builder_get_widget(builder,"userSyncSAMBACheck");
window->userSyncSAMBAPasswordCheck=yon_gtk_builder_get_widget(builder,"userSyncSAMBAPasswordCheck");
window->userDeactivatedCheck=yon_gtk_builder_get_widget(builder,"userDeactivatedCheck");
window->userExtraOptionsEntry=yon_gtk_builder_get_widget(builder,"userExtraOptionsEntry");
window->UserCancelButton=yon_gtk_builder_get_widget(builder,"UserCancelButton");
window->UserOkButton=yon_gtk_builder_get_widget(builder,"UserOkButton");
window->CalendarPopup=yon_gtk_builder_get_widget(builder,"CalendarPopover");
window->UseraddBootCheck=yon_gtk_builder_get_widget(builder,"UseraddBootCheck");
window->ExpirationCalendar=yon_gtk_builder_get_widget(builder,"ExpirationCalendar");
window->UseraddShutdownCheck=yon_gtk_builder_get_widget(builder,"UseraddShutdownCheck");
window->UsershadowBootCheck=yon_gtk_builder_get_widget(builder,"UsershadowBootCheck");
window->UsershadowShutdownCheck=yon_gtk_builder_get_widget(builder,"UsershadowShutdownCheck");
window->userTitleNameLabel=yon_gtk_builder_get_widget(builder,"userTitleNameLabel");
window->MainNotebook=yon_gtk_builder_get_widget(builder,"MainNotebook");
window->expiration_unix=NULL;
window->last_uid=NULL;
time_t t = time(NULL);
struct tm tm = *localtime(&t);
gtk_calendar_select_day(GTK_CALENDAR(window->ExpirationCalendar),tm.tm_mday);
gtk_calendar_select_month(GTK_CALENDAR(window->ExpirationCalendar),tm.tm_mon,1900+tm.tm_year);
on_UID_update(NULL,window);
int shell_size=0;
config_str shells = yon_file_open(shell_list_path,&shell_size);
for (int i=1;i<shell_size;i++){
if (shells[i][0]!='!'){
if (shells[i][strlen(shells[i])-1]=='\n') shells[i][strlen(shells[i])-1]='\0';
int parsed_size=0;
config_str parsed = yon_char_parse(shells[i],&parsed_size,";");
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->userShellCombo),parsed[0],parsed[0]);
yon_char_parsed_free(parsed,parsed_size);
}
}
gtk_combo_box_text_append(GTK_COMBO_BOX_TEXT(window->userShellCombo),"Set",SET_LABEL);
yon_char_parsed_free(shells,shell_size);
gtk_combo_box_set_active(GTK_COMBO_BOX(window->userShellCombo),0);
window->old_password=NULL;
window->old_username=NULL;
dictionary *entry_dict = NULL;
struct target_struct *target = malloc(sizeof(struct target_struct));
target->target=GTK_ENTRY(window->userGroupsEntry);
target->defaut_toggle=GTK_TOGGLE_BUTTON(window->userGroupsCheck);
yon_window_config_custom_window_setup(GTK_WINDOW(window->CreateUserWindow),"UserWindow");
yon_dictionary_add_or_create_if_exists_with_data(entry_dict,"combo",window->userPasswordCombo);
yon_dictionary_add_or_create_if_exists_with_data(entry_dict,"entry",window->userPasswordEntry);
// char *password = yon_config_get_by_key(USERADD((char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry))));
g_signal_connect(G_OBJECT(window->UserCancelButton),"clicked",G_CALLBACK(on_subwindow_close),NULL);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userUIDEntry);
g_signal_connect(G_OBJECT(window->userHomeButton),"clicked",G_CALLBACK(on_filechooser_open),window->userHomeEntry);
g_signal_connect(G_OBJECT(window->UserGroupsButton),"clicked",G_CALLBACK(on_groups_clicked),target);
g_signal_connect(G_OBJECT(window->userPasswordButton),"clicked",G_CALLBACK(on_password_change),entry_dict);
g_signal_connect(G_OBJECT(window->userAdditionalGroupsButton),"clicked",G_CALLBACK(on_groups_multiple_clicked),window->userAdditionalGroupsEntry);
g_signal_connect(G_OBJECT(window->userPasswordExpirationButton),"clicked",G_CALLBACK(on_expiration_clicked),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userUIDEntry);
g_signal_connect(G_OBJECT(window->userHomeCombo),"changed",G_CALLBACK(on_password_combo_changed),window->userHomeEntry);
g_signal_connect(G_OBJECT(window->userHomeCombo),"changed",G_CALLBACK(on_password_combo_changed),window->userHomeButton);
g_signal_connect(G_OBJECT(window->userPasswordCombo),"changed",G_CALLBACK(on_password_combo_changed),window->userPasswordButton);
g_signal_connect(G_OBJECT(window->userGroupsCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userGroupsEntry);
g_signal_connect(G_OBJECT(window->userGroupsCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->UserGroupsButton);
g_signal_connect(G_OBJECT(window->userShellCombo),"changed",G_CALLBACK(on_user_shell_changed),window);
g_signal_connect(G_OBJECT(window->ExpirationCalendar),"day-selected",G_CALLBACK(on_date_selected),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(on_UID_update),window);
g_signal_connect(G_OBJECT(window->userCreateSystemCheck),"toggled",G_CALLBACK(on_UID_update),window);
g_signal_connect(G_OBJECT(window->userGroupsCheck),"toggled",G_CALLBACK(on_user_login_update),window);
g_signal_connect(G_OBJECT(window->userLoginEntry),"changed",G_CALLBACK(on_user_login_update),window);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button),window->userCreateSystemCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button),window->userCreateSystemCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userCreateUnuniqueCheck);
g_signal_connect(G_OBJECT(window->userUIDAutoCheck),"toggled",G_CALLBACK(yon_gtk_toggle_button_set_inactive_from_toggle_button_inversed),window->userCreateUnuniqueCheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBACheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userSyncSAMBAPasswordCheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBAPasswordCheck),"toggled",G_CALLBACK(yon_gtk_widget_set_sensitive_from_toggle_button_inversed),window->userSyncSAMBACheck);
g_signal_connect(G_OBJECT(window->userSyncSAMBACheck),"toggled",G_CALLBACK(on_toggle_button_set_active_from_toggle_button_inversed),window);
g_signal_connect(G_OBJECT(window->userSyncSAMBAPasswordCheck),"toggled",G_CALLBACK(on_toggle_button_set_active_from_toggle_button_inversed),window);
g_signal_connect(G_OBJECT(window->userPasswordCombo),"changed",G_CALLBACK(on_toggle_button_set_active_from_combo_box),window);
g_signal_connect(G_OBJECT(window->userPasswordCombo),"changed",G_CALLBACK(on_toggle_button_set_active_from_combo_box),window);
g_signal_connect(G_OBJECT(window->userPasswordEntry),"changed",G_CALLBACK(on_password_user_changed),window);
g_signal_connect(G_OBJECT(window->userHomeEntry),"changed",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userHomeCombo),"changed",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userShellCombo),"changed",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userShellEntry),"changed",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userCreateSystemCheck),"toggled",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userCreateUnuniqueCheck),"toggled",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userDontCheckCheck),"toggled",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userGroupsCheck),"toggled",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userGroupsEntry),"changed",G_CALLBACK(on_parameter_changed),window);
g_signal_connect(G_OBJECT(window->userPasswordExpirationEntry),"icon-press",G_CALLBACK(on_remove_expired),window->userPasswordExpirationEntry);
g_signal_connect(G_OBJECT(window->userUIDEntry),"insert-text",G_CALLBACK(yon_on_text_insert_only_digits),NULL);
return window;
}
void on_UID_update(GtkWidget *, ubl_settings_usergroups_user_window *window){
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck))){
if (window->last_uid){
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),window->last_uid);
} else {
int config_size=0;
int final_size=0;
config_str config_users = yon_config_get_all_by_key(USERADD_SEARCH_macro,&config_size);
yon_char_parsed_prepend_strings(config_users,config_size,":");
config_str final = yon_char_parsed_merge(main_config.users,main_config.users_size,config_users,config_size,&final_size);
long prev_busy=gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateSystemCheck))?0:main_config.MINGID;
for (int i=0;i<final_size;i++){
int parsed_size;
config_str parsed = yon_char_parse(final[i],&parsed_size,":");
int minimum = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck))?0:main_config.MINGID;
int maximum = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck))?68000:main_config.MAXGID;
for (int i=0;i<final_size;i++){
int parsed_size;
config_str parsed = yon_char_parse(final[i],&parsed_size,":");
if (minimum<atol(parsed[2])&&atol(parsed[2])<maximum){
if (atol(parsed[2])>prev_busy){
prev_busy=atol(parsed[2]);
}
}
}
yon_char_parsed_free(parsed, parsed_size);
}
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),yon_char_from_long(prev_busy+1));
}
} else {
gtk_entry_set_text(GTK_ENTRY(window->userUIDEntry),"");
}
}
void on_user_shell_changed(GtkWidget *, ubl_settings_usergroups_user_window *window){
const char *current = gtk_combo_box_text_get_active_text(GTK_COMBO_BOX_TEXT(window->userShellCombo));
if (!yon_char_is_empty(current)&&!strcmp(current,SET_LABEL)){
if(gtk_combo_box_get_active(GTK_COMBO_BOX(window->userShellCombo))>1){
gtk_widget_set_sensitive(window->userShellEntry,1);
} else {
gtk_widget_set_sensitive(window->userShellEntry,0);
}
} else {
gtk_widget_set_sensitive(window->userShellEntry,0);
}
}
void on_user_login_update(GtkWidget *, ubl_settings_usergroups_user_window *window){
if (gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck))){
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry),gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry)));
} else {
gtk_entry_set_text(GTK_ENTRY(window->userGroupsEntry),"");
}
}
void on_user_save(GtkWidget *self, dictionary *dict){
main_window *widgets = yon_dictionary_get_data(dict->first,main_window*);
ubl_settings_usergroups_user_window *window = yon_dictionary_get_data(dict->first->next,ubl_settings_usergroups_user_window*);
char *final_user="";
char *uid_string = NULL;
char *password = NULL;
char *login = NULL;
char *username = NULL;
char *main_group = NULL;
char *additional_groups = NULL;
char *password_changed_date = NULL;
char *password_expiration_date = NULL;
char *password_change_interval_minimum = NULL;
char *password_change_interval_maximum = NULL;
char *warning_days = NULL;
char *no_activity_days = NULL;
int samba_sync = 0;
int samba_password_sync = 0;
int deactivate = 0;
char *extra_options = NULL;
char *useradd_boot = "";
char *useradd_shutdown = "";
char *usershadow_boot = "";
char *usershadow_shutdown = "";
int uid_auto_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userUIDAutoCheck));
if (uid_auto_active){
uid_string="";
} else {
int config_size=0;
int final_size=0;
config_str config_users = yon_config_get_all_by_key(USERADD_SEARCH_macro,&config_size);
yon_char_parsed_prepend_strings(config_users,config_size,":");
config_str final = yon_char_parsed_merge(main_config.users,main_config.users_size,config_users,config_size,&final_size);
uid_string = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUIDEntry));
if (strcmp(uid_string,window->last_uid)){
if (!gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userCreateUnuniqueCheck))){
int found=0;
for (int i=0;i<final_size;i++){
int parsed_size;
config_str parsed = yon_char_parse(final[i],&parsed_size,":");
if (parsed_size>2&&!strcmp(parsed[2],uid_string)){
if (yon_char_is_empty(window->last_uid)||(!yon_char_is_empty(window->last_uid)&&strcmp(parsed[2],window->last_uid))){
found = yon_char_parsed_check_exist(config_users,config_size,final[i])>-1?1:2;
break;
}
}
if (parsed_size) yon_char_parsed_free(parsed,parsed_size);
}
if (found){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),found==1?UID_ALREADY_EXIST_CONFIG_LABEL:UID_ALREADY_EXIST_SYSTEM_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userUIDEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
}
}
if (yon_char_is_empty(uid_string)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userUIDEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
}
int do_not_check_actve = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDontCheckCheck));
login = (char*)gtk_entry_get_text(GTK_ENTRY(window->userLoginEntry));
if (yon_char_is_empty(login)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
if (login[0]>'0'&&login[0]<'9'&&!do_not_check_actve){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),USER_BEGINS_WITH_DIGIT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
return;
}
{
GtkTreeIter iter;
GtkTreeModel *model = GTK_TREE_MODEL(widgets->UsersList);
for_iter(model,&iter){
char *cur;
gtk_tree_model_get(model,&iter,2, &cur,-1);
if (!yon_char_is_empty(cur)&&!strcmp(cur,login)){
if (!gtk_tree_selection_iter_is_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->UsersTree)),&iter)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),USER_EXIST_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userLoginEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
}
}
}
int password_active = gtk_combo_box_get_active(GTK_COMBO_BOX(window->userPasswordCombo));
if (password_active > 1){
password = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordEntry));
if (yon_char_is_empty(password)){
yon_ubl_status_box_spawn(GTK_CONTAINER(window->StatusBox),EMPTY_IMPORTANT_LABEL,5,BACKGROUND_IMAGE_FAIL_TYPE);
yon_ubl_status_highlight_incorrect(window->userPasswordEntry);
gtk_notebook_set_current_page(GTK_NOTEBOOK(window->MainNotebook),0);
return;
}
} else if (password_active==1){
password = "!*";
} else {
password="";
}
char *old_password = NULL;
if (window->old_password){
old_password = window->old_password;
yon_check_password_blocked(old_password);
}
if (!old_password||(old_password&&strcmp(old_password,password))){
time_t t = time(NULL);
struct tm tm = *localtime(&t);
char *month = yon_char_from_int(tm.tm_mon+1);
if (strlen(month)==1){
month=yon_char_append("0",month);
}
char *day = yon_char_from_int(tm.tm_mday);
if (strlen(day)<2){
day=yon_char_append("0",day);
}
password_changed_date = yon_char_unite(yon_char_from_int(1900+tm.tm_year),"-",month,"-",day,NULL);
} else {
password_changed_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordChangedEntry));
}
deactivate = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userDeactivatedCheck));
if (deactivate){
if (strlen(password)>1&&password[0]=='%'&&password[1]=='%'){
char *temp = yon_char_replace(password,"%%","!!");
password = yon_char_replace(temp,"!!","%%!");
} else {
password = yon_char_append("!",password);
}
}
username = (char*)gtk_entry_get_text(GTK_ENTRY(window->userUserNameEntry));
if (yon_char_is_empty(username)){
username="";
}
int main_group_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userGroupsCheck));
if (!main_group_active){
main_group = (char*)gtk_entry_get_text(GTK_ENTRY(window->userGroupsEntry));
} else {
main_group = "";
}
additional_groups = (char*)gtk_entry_get_text(GTK_ENTRY(window->userAdditionalGroupsEntry));
char *default_groups = yon_config_get_by_key(USERGROUPS_parameter);
if (!yon_char_is_empty(default_groups)&&!strcmp(default_groups,additional_groups)){
additional_groups="";
}
long password_change_interval_minimum_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMinimumSpin));
if (password_change_interval_minimum_active>0){
password_change_interval_minimum = yon_char_from_long(password_change_interval_minimum_active);
} else password_change_interval_minimum = 0;
long password_change_interval_maximum_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userPasswordChangeDelayMaximumSpin));
if (password_change_interval_minimum_active>0){
password_change_interval_maximum = yon_char_from_long(password_change_interval_maximum_active);
} else password_change_interval_maximum = 0;
password_expiration_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry));
if (yon_char_is_empty(password_expiration_date)){
password_expiration_date="-1";
}
long warning_days_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userWarningSpin));
if (warning_days_active>0)
warning_days = yon_char_from_long(warning_days_active);
int no_activity_days_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userActivitySpin));
if (no_activity_days_active>0){
no_activity_days = yon_char_from_long(no_activity_days_active);
}
samba_sync = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBACheck));
samba_password_sync = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userSyncSAMBAPasswordCheck));
if (samba_sync){
if (yon_samba_sync_get(login)==2)
yon_samba_sync_remove(login);
yon_samba_sync_add(login,NULL);
} else if (samba_password_sync){
if (yon_samba_sync_get(login)==1)
yon_samba_sync_remove(login);
yon_samba_sync_add(login,password);
} else {
yon_samba_sync_remove(login);
}
extra_options=(char*)gtk_entry_get_text(GTK_ENTRY(window->userExtraOptionsEntry));
int force_at_next_login_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->userForceChangeCheck));
if (force_at_next_login_active){
password_changed_date = "0";
}
int useradd_boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UseraddBootCheck));
if (useradd_boot_active){
useradd_boot = "boot";
}
int useradd_shutdown_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UseraddShutdownCheck));
if (useradd_shutdown_active){
useradd_shutdown = "shutdown";
}
int usershadow_boot_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsershadowBootCheck));
if (usershadow_boot_active){
usershadow_boot = "boot";
}
int usershadow_shutdown_active = gtk_toggle_button_get_active(GTK_TOGGLE_BUTTON(window->UsershadowShutdownCheck));
if (usershadow_shutdown_active){
usershadow_shutdown = "shutdown";
}
char *useradd_sync_string = NULL;
useradd_sync_string = yon_char_unite(useradd_boot,!yon_char_is_empty(useradd_boot)&&!yon_char_is_empty(useradd_shutdown)?",":"",useradd_shutdown,NULL);
char *usershadow_sync_string = NULL;
usershadow_sync_string = yon_char_unite(usershadow_boot,!yon_char_is_empty(usershadow_boot)?",":"",usershadow_shutdown,NULL);
char *shadow_string = NULL;
shadow_string = yon_char_unite(yon_char_return_if_exist(password_changed_date,""),
":",yon_char_return_if_exist(password_change_interval_minimum,""),
":",yon_char_return_if_exist(password_change_interval_maximum,""),
":",yon_char_return_if_exist(warning_days,""),
":",yon_char_return_if_exist(no_activity_days,""),
":",yon_char_return_if_exist(password_expiration_date,""),
NULL);
final_user = yon_char_unite(yon_char_return_if_exist(username,""),
":",yon_char_return_if_exist(uid_string,""),
":",yon_char_return_if_exist(main_group,""),
":",yon_char_return_if_exist(additional_groups,""),
":",yon_char_return_if_exist(extra_options,""),
":",yon_char_return_if_exist(password,""),
NULL);
char *final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERADD(login));
yon_config_register(USERADD(login),final_command,final_user);
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERADD(window->old_username));
}
if (window->old_password&&strcmp(window->old_password,password)){
final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW(login));
yon_config_register(USERSHADOW(login),final_command,shadow_string);
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERSHADOW(window->old_username));
}
}
int home_delete = yon_char_parsed_check_exist(main_config.remove_homes,main_config.homes_size,login);
if (home_delete>-1){
main_config.remove_homes = yon_char_parsed_rip(main_config.remove_homes,&main_config.homes_size,home_delete);
}
if (!yon_char_is_empty(useradd_sync_string)){
final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERADD_SYNC(login));
yon_config_register(USERADD_SYNC(login),final_command,useradd_sync_string);
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERADD_SYNC(window->old_username));
}
} else {
yon_config_remove_by_key(USERADD_SYNC(window->old_username));
}
if (!yon_char_is_empty(usershadow_sync_string)){
final_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW_SYNC(login));
yon_config_register(USERSHADOW_SYNC(login),final_command,usershadow_sync_string);
if (!yon_char_is_empty(window->old_username)&&strcmp(window->old_username,login)){
yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username));
}
} else {
yon_config_remove_by_key(USERSHADOW_SYNC(window->old_username));
}
yon_interface_update(widgets);
on_subwindow_close(self);
}
void on_user_sync_with_config(GtkWidget *,main_window *widgets){
int active = gtk_notebook_get_current_page(GTK_NOTEBOOK(widgets->MainNotebook));
switch (active){
case 2:{
GtkTreeModel *model = GTK_TREE_MODEL(widgets->liststore1);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemTree)),&model,&iter)){
char *target;
gtk_tree_model_get(model,&iter,2,&target,-1);
dialog_confirmation_data data;
if (config(USERADD(target))){
data.action_text = SYSTEM_USER_SYNC_CONFIRMATION_LABEL(target);
data.data=NULL;
data.function=NULL;
} else {
data.action_text = SYSTEM_USER_ADD_CONFIRMATION_LABEL(target);
data.data=NULL;
data.function=NULL;
}
if (yon_confirmation_dialog_call(widgets->Window,&data)!=GTK_RESPONSE_ACCEPT){
return;
}
char *user = yon_char_parsed_check_exist_begins_with(main_config.groups,main_config.groups_size,target);
char *shadow = yon_char_parsed_check_exist_begins_with(main_config.group_shadow,main_config.group_shadow_size,target);
yon_char_remove_last_symbol(user,'\n');
yon_char_remove_last_symbol(shadow,'\n');
int user_size=0;
int shadow_size=0;
config_str parsed = yon_char_parse(user,&user_size,":");
config_str parsed_shadow = yon_char_parse(shadow,&shadow_size,":");
char *optionals = yon_char_unite(user_size>5? parsed[5]:"",user_size>5?" ":"",user_size>6?parsed[6]:"",NULL);
char *config_user = yon_char_unite(parsed[0],":",
user_size>4?parsed[4]:"",":",
user_size>2?parsed[2]:"",":",
user_size>3?parsed[3]:"",":",
!yon_char_is_empty(optionals)?optionals:"",":",
user_size>1&&strcmp(parsed[1],"x")?yon_char_return_if_exist(parsed[1],""):yon_char_return_if_exist(parsed_shadow[1],""),NULL);
char *config_shadow = yon_char_unite(yon_char_return_if_exist(parsed[2],""),":",
user_size>3?parsed[3]:"",":",
user_size>4?parsed[4]:"",":",
user_size>5?parsed[5]:"",":",
user_size>6?parsed[6]:"",":",
user_size>7?parsed[7]:"",":",NULL);
if (!yon_char_is_empty(config_user)){
char *user_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERADD(target));
yon_config_register(USERADD(target),user_command,config_user);
}
if (!yon_char_is_empty(config_shadow)){
char *shadow_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERSHADOW(target));
yon_config_register(USERSHADOW(target),shadow_command,config_shadow);
}
yon_interface_update(widgets);
}
yon_interface_update((main_window*)widgets);
}break;
case 3:{
GtkTreeModel *model = GTK_TREE_MODEL(widgets->liststore1);
GtkTreeIter iter;
if (gtk_tree_selection_get_selected(gtk_tree_view_get_selection(GTK_TREE_VIEW(widgets->SystemGroupsTree)),&model,&iter)){
char *target;
gtk_tree_model_get(model,&iter,1,&target,-1);
dialog_confirmation_data data;
if (config(GROUPADD(target))){
data.action_text = SYSTEM_GROUP_ADD_CONFIRMATION_LABEL(target);
data.data=NULL;
data.function=NULL;
} else {
data.action_text = SYSTEM_GROUP_SYNC_CONFIRMATION_LABEL(target);
data.data=NULL;
data.function=NULL;
}
if (yon_confirmation_dialog_call(widgets->Window,&data)!=GTK_RESPONSE_ACCEPT){
return;
}
char *group = yon_char_parsed_check_exist_begins_with(main_config.groups,main_config.groups_size,target);
char *group_shadow = yon_char_parsed_check_exist_begins_with(main_config.group_shadow,main_config.group_shadow_size,target);
yon_char_remove_last_symbol(group,'\n');
yon_char_remove_last_symbol(group_shadow,'\n');
int group_size=0;
int group_shadow_size=0;
config_str parsed = yon_char_parse(group,&group_size,":");
config_str parsed_shadow = yon_char_parse(group_shadow,&group_shadow_size,":");
char *config_group = yon_char_unite(yon_char_return_if_exist(parsed[3],""),
":",yon_char_return_if_exist(parsed[2],""),
"::",yon_char_return_if_exist(parsed_shadow[2],""),
":",strcmp(parsed[1],"x")?yon_char_return_if_exist(parsed[1],""):yon_char_return_if_exist(parsed_shadow[1],""),
NULL);
if (!yon_char_is_empty(config_group)){
char *group_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",GROUPADD(target));
yon_config_register(GROUPADD(target),group_command,config_group);
yon_interface_update(widgets);
}
}
}break;
}
}

File diff suppressed because it is too large Load Diff

@ -1,3 +1,5 @@
#ifndef USERGROUPS_H
#define USERGROUPS_H
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <locale.h>
@ -30,10 +32,13 @@
#define glade_path_ubl_settings_usergroups_user "/com/ublinux/ui/ubl-settings-usergroups-user.glade"
#define glade_path_ubl_settings_usergroups_savesettings "/com/ublinux/ui/ubl-settings-usergroups-savesettings.glade"
#define glade_path_ubl_settings_usergroups_confirmation "/com/ublinux/ui/ubl-settings-usergroups-confirmation.glade"
#define glade_path_ubl_settings_usergroups_system_deletion_confirmation "/com/ublinux/ui/ubl-settings-usergroups-system-deletion-confirmation.glade"
#define banner_path "/com/ublinux/images/ubl-settings-usergroups-banner.png"
#define CssPath "/com/ublinux/css/ubl-settings-usergroups.css"
#define config_path yon_char_unite(yon_ubl_user_get_home_directory(),"/.config/",LocaleName,"/",LocaleName,".conf",NULL)
#define icon_path "com.ublinux.ubl-settings-usergroups"
#define sync_parameters_path "resource:///com/ublinux/csv/sync_parameters.csv"
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-usergroups"
@ -52,8 +57,8 @@
#define get_system_group_command(target) yon_char_unite("/usr/lib/ublinux/functions get_conf_groupadd_from_system ",target,NULL)
#define remove_user_from_system_command(target) yon_char_append("userdel ",target)
#define remove_user_and_homedir_from_system_command yon_char_append("userdel -r ",target)
#define remove_group_from_system_command yon_char_append("groupdel ",target)
#define remove_user_and_homedir_from_system_command(target) yon_char_append("userdel -r ",target)
#define remove_group_from_system_command(target) yon_char_append("groupdel ",target)
#define groups_path "/etc/group"
#define users_path "/etc/passwd"
@ -74,16 +79,22 @@
#define GROUPADD(group) yon_char_unite("GROUPADD[",group,"]",NULL)
#define USERSHADOW(user) yon_char_unite("USERSHADOW[",user,"]",NULL)
#define USERADD_SYNC(user) yon_char_unite("USERADD_SYNC[",user,"]",NULL)
#define USERADD_SYNC_command(target) yon_char_unite("ubconfig --source system get users USERADD_SYNC[",target,"]",NULL)
#define USERSHADOW_SYNC(user) yon_char_unite("USERSHADOW_SYNC[",user,"]",NULL)
#define GROUPADD_SYNC(user) yon_char_unite("GROUPADD_SYNC[",user,"]",NULL)
#define GROUPADD_SYNC_parameter "GROUPADD_SYNC"
#define GROUPADD_SYNC_parameter_command "ubconfig --source system get users USERADD_SYNC"
#define add_icon_name "com.ublinux.ubl-settings-usergroups.increase-symbolic"
#define edit_icon_name "com.ublinux.ubl-settings-usergroups.edit-symbolic"
#define delete_icon_name "com.ublinux.ubl-settings-usergroups.trash-symbolic"
#define sync_icon_name "com.ublinux.ubl-settings-usergroups.user-add-symbolic"
#define update_icon_name "com.ublinux.ubl-settings-usergroups.sync-symbolic"
#define password_hash_get_command(passwd) yon_char_append("mkpasswd2 ",passwd)
#define config_get_command(source) yon_char_unite("ubconfig --source ",source," get users DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERADD_SYNC USERADD_SYNC[*] USERSHADOW[*] GROUPADD[*]",NULL),yon_char_unite("ubconfig --source ",source," get [system] SYSTEMBOOT_STATEMODE",NULL),yon_char_unite("ubconfig --source ",source," get [save] SAVE_ROOTCOPY_CHANGES",NULL)
#define config_get_command(source) yon_char_unite("ubconfig --source ",source," get users DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERADD_SYNC USERADD_SYNC[*] USERSHADOW[*] USERSHADOW_SYNC[*] GROUPADD[*] GROUPADD_SYNC[*] GROUPADD_SYNC",NULL),yon_char_unite("ubconfig --source ",source," get [system] SYSTEMBOOT_STATEMODE",NULL),yon_char_unite("ubconfig --source ",source," get [save] SAVE_ROOTCOPY_CHANGES",NULL)
#define config_get_default_command "ubconfig --source default get users DEFAULTPASSWD DEFAULTROOTPASSWD USERGROUPS DEFAULTUSER HASHPASSWD ADDADM"
#define config_get_global_only_parameters "ubconfig --source global get users DEFAULTPASSWD DEFAULTROOTPASSWD"
@ -142,10 +153,10 @@
#define GROUPADD_parameter_command yon_char_unite("GROUPADD[",target,"]",NULL)
typedef char* string;
__attribute__((unused)) static \
string version_application;
char *local;
typedef struct {
template_config_fields
@ -179,6 +190,7 @@ typedef struct {
int launch_size;
config_str launch_arguments;
} config;
extern config main_config;
typedef struct {
template_window_fields
@ -201,6 +213,8 @@ typedef struct {
rmb_menu_window *UsersMenu;
rmb_menu_window *GroupsMenu;
rmb_menu_window *SystemUsersMenu;
rmb_menu_window *SystemGroupsMenu;
GtkListStore *liststore1;
GtkListStore *liststore2;
@ -233,6 +247,36 @@ typedef struct{
GtkWidget *EncryptAllPasswordsButton;
GtkWidget *UsersBootCheck;
GtkWidget *UsersShutdownCheck;
GtkWidget *UsersShutdownExpander;
GtkWidget *UserShutdownRevealer;
GtkWidget *UsersTree;
GtkWidget *UserAddButton;
GtkWidget *UserRemoveButton;
GtkWidget *GroupsBootCheck;
GtkWidget *GroupsShutdownCheck;
GtkWidget *GroupsShutdownExpander;
GtkWidget *GroupShutdownRevealer;
GtkWidget *GroupsTree;
GtkWidget *GroupAddButton;
GtkWidget *GroupRemoveButton;
GtkListStore *UsersShutdownList;
GtkListStore *GroupsShutdownList;
GtkCellRenderer *UserActiveCell;
GtkCellRenderer *UserMinCell;
GtkCellRenderer *UserMaxCell;
GtkCellRenderer *GroupActiveCell;
GtkCellRenderer *GroupMinCell;
GtkCellRenderer *GroupMaxCell;
const char *default_user_name;
const char *default_password;
const char *default_root_password;
const char *password_hash;
int user_1000_admin;
int user_boot;
int user_shutdown;
} ubl_settings_usergroups_additional_settings_window;
typedef struct{
@ -256,17 +300,23 @@ typedef struct{
GtkWidget *AdminGroupsButton;
GtkWidget *GroupaddShutdownCheck;
GtkWidget *groupExtraOptionsEntry;
GtkWidget *MainNotebook;
char *last_gid;
} ubl_settings_usergroups_group_creation_window;
typedef struct{
GtkWidget *GroupsWindow;
GtkWidget *StatusBox;
GtkWidget *GroupsTree;
GtkListStore *list;
GtkWidget *GroupsCancelButton;
GtkWidget *GroupsOkButton;
GtkWidget *HeaderLabel;
GtkWidget *DefaultCheck;
GtkWidget *AddNewCheck;
GtkWidget *AddNewEntry;
GtkWidget *AddNewBox;
GtkCellRenderer *StatusCell;
GtkTreeViewColumn *GroupColumn;
} ubl_settings_usergroups_group_window;
@ -338,6 +388,7 @@ typedef struct{
GtkWidget *UsershadowShutdownCheck;
GtkWidget *userTitleNameLabel;
GtkWidget *userSyncSAMBAPasswordCheck;
GtkWidget *MainNotebook;
char *expiration_unix;
@ -368,6 +419,23 @@ typedef struct{
GtkTreeViewColumn *UserCell;
} yon_confirmation_window;
typedef struct {
GtkWidget *Window;
GtkWidget *HeaderLabel;
GtkWidget *CancelButton;
GtkWidget *StatusBox;
GtkWidget *TitleLabel;
GtkWidget *AcceptButton;
GtkWidget *ConfigAcceptButton;
GtkWidget *SystemAcceptButton;
} system_remove_confirmation_window;
struct target_struct{
GtkEntry *target;
GtkToggleButton *defaut_toggle;
};
ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_additional_settings_new();
void on_ubl_settings_usergroups_additional_settings_open(GtkWidget *self, main_window *widgets);
@ -428,13 +496,15 @@ void on_saving_settings_open(GtkWidget *self, main_window *widgets);
void on_password_combo_changed(GtkComboBox *self, GtkWidget *target);
void on_filechooser_open(GtkWidget *self, GtkEntry *output_target);
void on_groups_save(GtkWidget *self, dictionary *dict);
void on_groups_clicked(GtkWidget *self, GtkEntry *output_target);
void on_groups_clicked(GtkWidget *self, struct target_struct *output_target);
void on_groups_multiple_save(GtkWidget *self, dictionary *dict);
void on_groups_multiple_clicked(GtkWidget *self, GtkEntry *output_target);
void on_passwords_encrypt();
void on_password_change(GtkWidget *self, dictionary *entry_dict);
void on_additional_settings_clicked(GtkWidget *self, GtkEntry *output_target);
void on_expiration_clicked(GtkWidget *self, ubl_settings_usergroups_user_window *window);
void on_additional_settings_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window);
void on_additional_settings_save(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window);
void on_hash_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window);
ubl_settings_usergroups_additional_settings_window *yon_ubl_settings_usergroups_additional_settings_new();
@ -449,7 +519,6 @@ ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(int
void on_standard_groups_accept(GtkWidget *self, ubl_settings_usergroups_group_window *window);
void on_standard_groups_open(GtkWidget *self, main_window *widgets);
void on_password_show_hide(GtkEntry *self, GtkEntryIconPosition icon_pos, GdkEvent* event);
void on_password_changed(GtkEntry *self, ubl_settings_usergroups_password_window *window);
void on_password_accept(GtkWidget *self, dictionary *dict);
ubl_settings_usergroups_password_window *yon_ubl_settings_usergroups_password_new();
void yon_system_load(main_window *window);
@ -476,4 +545,21 @@ void config_init();
void on_selection_changed(GtkWidget *self, main_window *widgets);
void on_notebook_page_changed(GtkWidget *self, GtkWidget *page, int num, main_window *widgets);
gboolean on_menu_open(GtkWidget *self,GdkEventButton *event, rmb_menu_window *window);
main_window *yon_main_window_complete(main_window *widgets);
gboolean on_system_menu_open(GtkWidget *self,GdkEventButton *event, rmb_menu_window *window);
main_window *yon_main_window_complete(main_window *widgets);
void yon_remove_confirmation_window_accept_clicked(GtkWidget *self,dictionary *dict);
system_remove_confirmation_window *yon_system_remove_confirmation_window_new();
void on_delete_system_user(GtkWidget *, dictionary *dict);
void on_delete_system_group(GtkWidget *, dictionary *dict);
char *yon_char_parsed_to_string_include_empty(config_str parsed, int parsed_size, char *divider);
config_str yon_parameter_parse(char *parameter, int *size);
int yon_parameter_check_tag(char *tag,char *string);
config_str yon_parameter_get_by_template(char *parameter, char *pattern, int *size);
void on_additional_settings_group_sync_remove(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window);
void on_additional_settings_user_sync_remove(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window);
void on_additional_settings_user_sync_add(GtkWidget *, ubl_settings_usergroups_additional_settings_window *window);
void on_additional_settings_cell_toggled(GtkCellRenderer *self, char *path, ubl_settings_usergroups_additional_settings_window *window);
void on_additional_settings_cell_edited(GtkCellRenderer *self, char *path, char *new_text, ubl_settings_usergroups_additional_settings_window *window);
void on_adiitional_settings_tree_selection_changed(GtkWidget *self, ubl_settings_usergroups_additional_settings_window *window);
void on_useradd_sync_changed(ubl_settings_usergroups_additional_settings_window *window);
#endif

@ -51,16 +51,20 @@
#define UPDATE_LABEL _("Update users and groups")
#define SAVING_CONFIGURATION_LABEL _("Additional saving configuration")
#define FILTER_NAME_CONFIG_LABEL yon_char_append(_("Configuration file")," *.ini")
#define CHOOSE_CUSTOM_CONFIG_LABEL _("Choose custom configuration file")
#define SYSTEM_USER_ADD_CONFIRMATION_LABEL(target) yon_char_unite(_("This user doesn't exist in configuration. Are you sure want to add user")," <b>",target,"</b> ", _("to configuration?"),NULL)
#define SYSTEM_USER_SYNC_CONFIRMATION_LABEL(target) yon_char_unite(_("This user exists in configuration. Are you sure want to update user")," <b>",target,"</b> ", _("data at configuration?"),NULL)
#define SYSTEM_GROUP_SYNC_CONFIRMATION_LABEL(target) yon_char_unite(_("This group doesn't exist in configuration. Are you sure want to add group")," <b>",target,"</b> ", _("to configuration?"),NULL)
#define SYSTEM_GROUP_ADD_CONFIRMATION_LABEL(target) yon_char_unite(_("This group exists in configuration. Are you sure want to update group")," <b>",target,"</b> ", _("data at configuration?"),NULL)
#define SYSTEM_USER_SYSTEM_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This user doesn't exist in configuration and will be removed from the system. Are you sure want to remove user")," <b>",target,"</b> ", _("from the system??"),NULL)
#define SYSTEM_USER_CONFIG_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This user exists in configuration. Are you sure want to remove user")," <b>",target,"</b> ", _("?"),NULL)
#define SYSTEM_GROUP_SYSTEM_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group doesn't exist in configuration and will be removed from the system. Are you sure want to remove group")," <b>",target,"</b> ", _("from the system?"),NULL)
#define SYSTEM_GROUP_CONFIG_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group exists in configuration. Are you sure want to remove group")," <b>",target,"</b>", _("?"),NULL)
#define SYSTEM_USER_SYSTEM_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This user doesn't exist in configuration. Are you sure want to remove user")," <b>",target,"</b> ", _("from the system?"),NULL)
#define SYSTEM_USER_CONFIG_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This user exists in configuration and system. Are you sure want to remove user")," <b>",target,"</b>", "?",NULL)
#define SYSTEM_GROUP_SYSTEM_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group doesn't exist in configuration. Are you sure want to remove group")," <b>",target,"</b> ", _("from the system?"),NULL)
#define SYSTEM_GROUP_CONFIG_REMOVE_CONFIRMATION_LABEL(target) yon_char_unite(_("This group exists in configuration and system. Are you sure want to remove group")," <b>",target,"</b>", "?",NULL)
#define SYNC_TOOLTIP_LABEL _("Syncronize with configuration")
//ubl-settings-usergroups-additional-settings.glade
#define ADDITIONAL_SETTINGS_TITLE_LABEL _("Additional settings")
@ -99,8 +103,10 @@
#define DESCRYPT_DESCRIPTION_LABEL _("descrypt (Hash function from the DES family of algorithms)")
#define NTHASH_DESCRIPTION_LABEL _("NTHash (Hash function from the NT Windows family of algorithms)")
#define ADDITIONAL_BOOT_LABEL _("While booting the operating system, apply the settings of all users from the configuration")
#define ADDITIONAL_SHUTDOWN_LABEL _("While shutdown, save the settings of all users with UID>=1000 to the configuration")
#define ADDITIONAL_USER_BOOT_LABEL _("While booting the operating system, apply the settings of all users from the configuration")
#define ADDITIONAL_USER_SHUTDOWN_LABEL _("While shutdown, save the settings of all users with UID>=1000 to the configuration")
#define ADDITIONAL_GROUP_BOOT_LABEL _("While booting the operating system, apply the settings of all groups from the configuration")
#define ADDITIONAL_GROUP_SHUTDOWN_LABEL _("While shutdown, save the settings of all groups with GID>=1000 to the configuration")
//ubl-settings-usergroups-group-creation.glade
#define CONFIGURE_GROUP_TITLE_LABEL _("Configure group")
@ -110,6 +116,7 @@
#define GROUP_USERS_LABEL _("Group users:")
#define AUTOMATICALLY_LABEL _("Automatically")
#define LOGIN_GROUP_LABEL _("Login")
#define GROUP_EXIST_LABEL _("Group already exists in configuration")
#define CREATE_GROUP_UNUNIQUE_LABEL _("Create group with ununique GID")
#define CREATE_SYSTEM_GROUP_LABEL _("Create system group")
#define ENCRYPTED_PASSWORD_LABEL _("Encrypted")
@ -125,6 +132,7 @@
#define ADDITIONAL_GROUPS_TITLE_LABEL _("Additional groups")
#define GROUPS_TITLE_LABEL _("Choose groups")
#define GROUP_USERS_TITLE_LABEL _("Choose users")
#define ADD_TO_NEW _("Add to new:")
//ubl-settings-usergroups-system.glade
#define INSPECTOR_TITLE_LABEL _("System users and groups")
@ -162,6 +170,7 @@
#define PASSWORD_MIN_INTERVAL_LABEL _("Password change interval: minimum")
#define PASSWORD_MAX_INTERVAL_LABEL _("days, maximum")
#define DAYS_LABEL _("days")
#define USER_EXIST_LABEL _("User already exists in configuration")
#define DAYS_WARNING_LABEL _("Days until warning:")
#define DAYS_ACTIVITY_LABEL _("Days without activity:")
#define FORCE_CONFIGURE_LABEL _("Force change at next login")
@ -203,6 +212,7 @@
#define PASSWORD_REPEAT_LABEL _("Repeat password:")
#define PASSWORD_HASH_LABEL _("Password hash:")
#define PASSWORD_NO_ENCRYPT_LABEL _("Do not encrypt password")
#define RESTRICTED_SYMBOLS_LABEL _("Password contain special symbols")
//ubl-settings-usergroups-savesettings.glade
#define SAVESETTINGS_TITLE_LABEL _("Additional configuration of service parameter saving")
@ -223,4 +233,38 @@
#define CONFIG_USERS_TAB_LABEL _("Configuration users")
#define CONFIG_GROUPS_TAB_LABEL _("Configuration groups")
#define SYSTEM_USERS_TAB_LABEL _("System users")
#define SYSTEM_GROUPS_TAB_LABEL _("System groups")
#define SYSTEM_GROUPS_TAB_LABEL _("System groups")
#define SYSTEM_REMOVE_FROM_CONFIG_LABEL _("Remove from system")
#define SYSTEM_REMOVE_FROM_SYSTEM_LABEL _("Remove from configuration")
#define GROUP_REMOVE_ERROR _("Group deletion has failed")
#define USER_REMOVE_ERROR _("User deletion has failed")
#define ADD_TO_CONFIGURATION_TITLE_LABEL _("Add to configuration")
#define REMOVE_FROM_CONFIGURATION_TITLE_LABEL _("Remove from configuration")
#define ADD_TO_SYSTEM_TITLE_LABEL _("Add to system")
#define REMOVE_FROM_SYSTEM_TITLE_LABEL _("Remove from system")
#define SHUTDOWN_ALL_SYSTEM_USERS_LABEL _("All system users")
#define SHUTDOWN_USERS_LABEL _("Users")
#define SHUTDOWN_SYSTEM_USER_LABEL _("System users")
#define SHUTDOWN_UID_RANGE_LABEL _("Users UID range")
#define SHUTDOWN_UID_LABEL _("User UID in system")
#define SHUTDOWN_GID_RANGE_LABEL _("Users GID range")
#define SHUTDOWN_GID_LABEL _("User GID in system")
#define SHUTDOWN_SAVE_USERS_LABEL _("While shutdown, save the settings of all users to configuration")
#define SHUTDOWN_SAVE_GROUPS_LABEL _("While shutdown, save the settings of all groups to the configuration")
#define SHUTDOWN_ALL_USERS_LABEL _("All groups in system")
#define SHUTDOWN_SYSTEM_GROUPS_USERS_LABEL _("System groups")
#define SHUTDOWN_GROUP_GID_RANGE_LABEL _("Group GID range")
#define SHUTDOWN_GID_IN_SYSTEM_LABEL _("Group GID in system")
#define SHUTDOWNALL_SYSTEM_USERS_LABEL _("All system users")
#define SHUTDOWN_SYSTEM_USERS_LABEL _("System users")
#define SHUTDOWN_UID_USERS_LABEL _("Users UID range")
#define SHUTDOWN_SYSTEM_ID_USERS_LABEL _("User UID in system")
#define SHUTDOWN_SYNC_TYPE_LABEL _("Syncronization type")
#define SHUTDOWN_MINIMUM_UID_LABEL _("Minimum UID")
#define SHUTDOWN_MAXIMUM_UID_LABEL _("Maximum UID")
#define SHUTDOWN_MINIMUM_GID_LABEL _("Minimum GID")
#define SHUTDOWN_MAXIMUM_GID_LABEL _("Maximum GID")

@ -0,0 +1,6 @@
PARAMETER:DESCRIPTION:PARAMETER_NAME
shutdown@all:When the system is shut down, synchronize all users in the system with the global configuration
shutdown@users:On system shutdown, synchronize users 1000<=UID<=6000 in the system with the global configuration
shutdown@systems:On system shutdown, synchronize system users 500<=UID<=999 in the system with the global configuration
shutdown@<min>-<max>:When the system is shut down, synchronize the range of UIDs of users in the system with the global configuration
shutdown@<uid>:When the system is shut down, synchronize the user UID in the system with the global configuration
1 PARAMETER:DESCRIPTION:PARAMETER_NAME
2 shutdown@all:When the system is shut down, synchronize all users in the system with the global configuration
3 shutdown@users:On system shutdown, synchronize users 1000<=UID<=6000 in the system with the global configuration
4 shutdown@systems:On system shutdown, synchronize system users 500<=UID<=999 in the system with the global configuration
5 shutdown@<min>-<max>:When the system is shut down, synchronize the range of UIDs of users in the system with the global configuration
6 shutdown@<uid>:When the system is shut down, synchronize the user UID in the system with the global configuration

@ -3,6 +3,206 @@
<interface domain="ubl-settings-usergroups">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-usergroups.css -->
<object class="GtkListStore" id="GroupsShutdownList">
<columns>
<!-- column-name active -->
<column type="gboolean"/>
<!-- column-name RenderName -->
<column type="gchararray"/>
<!-- column-name ValueMin -->
<column type="gchararray"/>
<!-- column-name ValueMax -->
<column type="gchararray"/>
<!-- column-name Indeletable -->
<column type="gboolean"/>
<!-- column-name ActveSensitive -->
<column type="gboolean"/>
<!-- column-name Sensitive -->
<column type="gboolean"/>
<!-- column-name MinValueSensitive -->
<column type="gboolean"/>
<!-- column-name MaxValueSensitive -->
<column type="gboolean"/>
<!-- column-name Parameter -->
<column type="gchararray"/>
<!-- column-name Creatable -->
<column type="gboolean"/>
<!-- column-name Deletable -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">All groups in system</col>
<col id="2" translatable="yes">1</col>
<col id="3" translatable="yes">65535</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@all</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">Groups</col>
<col id="2" translatable="yes">1000</col>
<col id="3" translatable="yes">6000</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@users</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">System groups</col>
<col id="2" translatable="yes">500</col>
<col id="3" translatable="yes">999</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@systems</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">Group GID range</col>
<col id="2" translatable="yes"></col>
<col id="3" translatable="yes"></col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">True</col>
<col id="8">True</col>
<col id="9" translatable="yes">shutdown@min-max</col>
<col id="10">True</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">Group GID in system</col>
<col id="2" translatable="yes"></col>
<col id="3" translatable="yes"></col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">True</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@gid</col>
<col id="10">True</col>
<col id="11">False</col>
</row>
</data>
</object>
<object class="GtkListStore" id="UsersShutdownList">
<columns>
<!-- column-name Active -->
<column type="gboolean"/>
<!-- column-name Target -->
<column type="gchararray"/>
<!-- column-name MinValue -->
<column type="gchararray"/>
<!-- column-name MaxValue -->
<column type="gchararray"/>
<!-- column-name Indeletable -->
<column type="gboolean"/>
<!-- column-name ActiveSensitive -->
<column type="gboolean"/>
<!-- column-name Sensitive -->
<column type="gboolean"/>
<!-- column-name ValueMinSensitive -->
<column type="gboolean"/>
<!-- column-name ValueMaxSensitive -->
<column type="gboolean"/>
<!-- column-name Parameter -->
<column type="gchararray"/>
<!-- column-name Creatable -->
<column type="gboolean"/>
<!-- column-name Deletable -->
<column type="gboolean"/>
</columns>
<data>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">All system users</col>
<col id="2" translatable="yes">1</col>
<col id="3" translatable="yes">65535</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@all</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">Users</col>
<col id="2" translatable="yes">1000</col>
<col id="3" translatable="yes">6000</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@users</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">System users</col>
<col id="2" translatable="yes">500</col>
<col id="3" translatable="yes">999</col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">False</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@systems</col>
<col id="10">False</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">Users UID range</col>
<col id="2" translatable="yes"></col>
<col id="3" translatable="yes"></col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">True</col>
<col id="8">True</col>
<col id="9" translatable="yes">shutdown@min-max</col>
<col id="10">True</col>
<col id="11">False</col>
</row>
<row>
<col id="0">False</col>
<col id="1" translatable="yes">User UID in system</col>
<col id="2" translatable="yes"></col>
<col id="3" translatable="yes"></col>
<col id="4">True</col>
<col id="5">True</col>
<col id="6">False</col>
<col id="7">True</col>
<col id="8">False</col>
<col id="9" translatable="yes">shutdown@uid</col>
<col id="10">True</col>
<col id="11">False</col>
</row>
</data>
</object>
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
@ -28,6 +228,26 @@
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.lock-symbolic</property>
</object>
<object class="GtkImage" id="image6">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property>
</object>
<object class="GtkImage" id="image7">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property>
</object>
<object class="GtkImage" id="image8">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.increase-symbolic</property>
</object>
<object class="GtkImage" id="image9">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.libublsettingsui-gtk3.trash-symbolic</property>
</object>
<object class="GtkWindow" id="Window">
<property name="width-request">600</property>
<property name="can-focus">False</property>
@ -394,8 +614,229 @@
</packing>
</child>
<child>
<object class="GtkCheckButton" id="UsersShutdownCheck">
<property name="label" translatable="yes">While shutdown, save the settings of all users with UID&gt;=1000 to the configuration</property>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="top-padding">5</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="UsersShutdownCheck">
<property name="label" translatable="yes">While shutdown, save the settings of all users to configuration</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkExpander" id="UsersShutdownExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<placeholder/>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRevealer" id="UserShutdownRevealer">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<property name="min-content-height">160</property>
<child>
<object class="GtkTreeView" id="UsersTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">UsersShutdownList</property>
<property name="enable-grid-lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererToggle" id="UserActiveCell"/>
<attributes>
<attribute name="sensitive">5</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Syncronization type</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="sensitive">5</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Minimum UID</property>
<child>
<object class="GtkCellRendererText" id="UserMinCell">
<property name="max-width-chars">5</property>
</object>
<attributes>
<attribute name="sensitive">6</attribute>
<attribute name="editable">7</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Maximum UID</property>
<child>
<object class="GtkCellRendererText" id="UserMaxCell">
<property name="max-width-chars">5</property>
</object>
<attributes>
<attribute name="sensitive">6</attribute>
<attribute name="editable">8</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="UserAddButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image6</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="UserRemoveButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image7</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
<style>
<class name="bggrey"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="GroupsBootCheck">
<property name="label" translatable="yes">While booting the operating system, apply the settings of all groups from the configuration</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@ -404,7 +845,229 @@
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
<property name="position">2</property>
</packing>
</child>
<child>
<object class="GtkFrame">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label-xalign">0</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkAlignment">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="top-padding">5</property>
<property name="bottom-padding">5</property>
<property name="left-padding">5</property>
<property name="right-padding">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkExpander" id="GroupShutdownExpander">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>
<placeholder/>
</child>
<child type="label_item">
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkCheckButton" id="GroupsShutdownCheck">
<property name="label" translatable="yes">While shutdown, save the settings of all groups to the configuration</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkRevealer" id="GroupShutdownRevealer">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="transition-type">slide-up</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<property name="min-content-height">160</property>
<child>
<object class="GtkTreeView" id="GroupsTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="model">GroupsShutdownList</property>
<property name="enable-grid-lines">both</property>
<child internal-child="selection">
<object class="GtkTreeSelection"/>
</child>
<child>
<object class="GtkTreeViewColumn">
<child>
<object class="GtkCellRendererToggle" id="GroupActiveCell"/>
<attributes>
<attribute name="sensitive">5</attribute>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Syncronization type</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="sensitive">5</attribute>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Minimum GID</property>
<child>
<object class="GtkCellRendererText" id="GroupMinCell">
<property name="max-width-chars">5</property>
</object>
<attributes>
<attribute name="sensitive">6</attribute>
<attribute name="editable">7</attribute>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Maximum GID</property>
<child>
<object class="GtkCellRendererText" id="GroupMaxCell">
<property name="max-width-chars">5</property>
</object>
<attributes>
<attribute name="sensitive">6</attribute>
<attribute name="editable">8</attribute>
<attribute name="text">3</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="GroupAddButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image8</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="GroupRemoveButton">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image9</property>
<style>
<class name="thin"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
</child>
<child type="label_item">
<placeholder/>
</child>
<style>
<class name="bggrey"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">3</property>
</packing>
</child>
</object>
@ -425,7 +1088,7 @@
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
@ -484,4 +1147,8 @@
<widget name="label1"/>
</widgets>
</object>
<object class="GtkMenu" id="menu1">
<property name="visible">True</property>
<property name="can-focus">False</property>
</object>
</interface>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface domain="ubl-settings-usergroups">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-usergroups.css -->
@ -56,7 +56,7 @@
</packing>
</child>
<child>
<object class="GtkNotebook">
<object class="GtkNotebook" id="MainNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="margin-start">5</property>

@ -23,83 +23,36 @@
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkScrolledWindow">
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<property name="can-focus">False</property>
<child>
<object class="GtkTreeView" id="GroupsTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="search-column">2</property>
<property name="enable-grid-lines">vertical</property>
<child internal-child="selection">
<object class="GtkTreeSelection">
<property name="mode">none</property>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Chosen</property>
<child>
<object class="GtkCellRendererToggle" id="StatusCell"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">ID</property>
<property name="sort-indicator">True</property>
<property name="sort-column-id">2</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="GroupColumn">
<property name="title" translatable="yes">Group</property>
<property name="sort-order">descending</property>
<property name="sort-column-id">1</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox" id="AddNewBox">
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-left">5</property>
<property name="margin-right">5</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-top">5</property>
<property name="margin-bottom">5</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="AddNewCheck">
<property name="label" translatable="yes">Add to new:</property>
<object class="GtkCheckButton" id="DefaultCheck">
<property name="label" translatable="yes">Default</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
@ -112,19 +65,102 @@
</packing>
</child>
<child>
<object class="GtkEntry" id="AddNewEntry">
<object class="GtkScrolledWindow">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="shadow-type">in</property>
<child>
<object class="GtkTreeView" id="GroupsTree">
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="search-column">2</property>
<property name="enable-grid-lines">vertical</property>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">Chosen</property>
<child>
<object class="GtkCellRendererToggle" id="StatusCell"/>
<attributes>
<attribute name="active">0</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn">
<property name="title" translatable="yes">ID</property>
<property name="sort-indicator">True</property>
<property name="sort-column-id">2</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">2</attribute>
</attributes>
</child>
</object>
</child>
<child>
<object class="GtkTreeViewColumn" id="GroupColumn">
<property name="title" translatable="yes">Group</property>
<property name="sort-order">descending</property>
<property name="sort-column-id">1</property>
<child>
<object class="GtkCellRendererText"/>
<attributes>
<attribute name="text">1</attribute>
</attributes>
</child>
</object>
</child>
</object>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
<child>
<object class="GtkBox" id="AddNewBox">
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkCheckButton" id="AddNewCheck">
<property name="label" translatable="yes">Add to new:</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">False</property>
<property name="draw-indicator">True</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkEntry" id="AddNewEntry">
<property name="visible">True</property>
<property name="sensitive">False</property>
<property name="can-focus">True</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">2</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>

@ -0,0 +1,226 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<interface domain="ubl-settings-usergroups">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-usergroups.css -->
<object class="GtkImage" id="image1">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.accept-symbolic</property>
</object>
<object class="GtkImage" id="image2">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.accept-symbolic</property>
</object>
<object class="GtkImage" id="image4">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.cancel-symbolic</property>
</object>
<object class="GtkImage" id="image5">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups.accept-symbolic</property>
</object>
<object class="GtkWindow" id="Window">
<property name="width-request">650</property>
<property name="height-request">200</property>
<property name="can-focus">False</property>
<property name="modal">True</property>
<property name="default-width">450</property>
<property name="icon-name">com.ublinux.ubl-settings-usergroups</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<object class="GtkBox" id="StatusBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<child>
<placeholder/>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="orientation">vertical</property>
<property name="spacing">5</property>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="spacing">5</property>
<child>
<object class="GtkImage">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="margin-start">20</property>
<property name="margin-end">20</property>
<property name="margin-top">10</property>
<property name="margin-bottom">10</property>
<property name="pixel-size">50</property>
<property name="icon-name">dialog-information-symbolic</property>
<property name="icon_size">6</property>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkLabel" id="TitleLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="use-markup">True</property>
<property name="wrap">True</property>
<property name="xalign">0</property>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkBox">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="halign">end</property>
<property name="margin-start">5</property>
<property name="margin-end">5</property>
<property name="margin-bottom">5</property>
<property name="spacing">5</property>
<child>
<object class="GtkButton" id="ConfigAcceptButton">
<property name="label" translatable="yes">Remove from configuration</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image1</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">0</property>
</packing>
</child>
<child>
<object class="GtkButton" id="SystemAcceptButton">
<property name="label" translatable="yes">Remove from system</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image5</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">False</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
<packing>
<property name="expand">True</property>
<property name="fill">True</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
<child type="titlebar">
<object class="GtkHeaderBar">
<property name="visible">True</property>
<property name="can-focus">False</property>
<child type="title">
<object class="GtkLabel" id="HeaderLabel">
<property name="visible">True</property>
<property name="can-focus">False</property>
<property name="label" translatable="yes">User deletion</property>
<attributes>
<attribute name="weight" value="bold"/>
</attributes>
</object>
</child>
<child>
<object class="GtkButton" id="CancelButton">
<property name="label" translatable="yes">Cancel</property>
<property name="visible">True</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image4</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
</child>
<child>
<object class="GtkButton" id="AcceptButton">
<property name="label" translatable="yes">Accept</property>
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="image">image2</property>
<style>
<class name="button"/>
<class name="marginright"/>
</style>
</object>
<packing>
<property name="pack-type">end</property>
<property name="position">1</property>
</packing>
</child>
</object>
</child>
</object>
<object class="GtkListStore" id="liststore1">
<columns>
<!-- column-name gboolean1 -->
<column type="gboolean"/>
<!-- column-name gchararray1 -->
<column type="gchararray"/>
<!-- column-name gchararray2 -->
<column type="gchararray"/>
<!-- column-name gboolean2 -->
<column type="gboolean"/>
<!-- column-name gboolean3 -->
<column type="gboolean"/>
<!-- column-name gchararray3 -->
<column type="gchararray"/>
</columns>
</object>
</interface>

@ -1,5 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<!-- Generated with glade 3.38.2 -->
<!-- Generated with glade 3.40.0 -->
<interface domain="ubl-settings-usergroups">
<requires lib="gtk+" version="3.24"/>
<!-- interface-css-provider-path ubl-settings-usergroups.css -->
@ -86,7 +86,7 @@
</packing>
</child>
<child>
<object class="GtkNotebook">
<object class="GtkNotebook" id="MainNotebook">
<property name="visible">True</property>
<property name="can-focus">True</property>
<child>

@ -16,6 +16,14 @@ background:transparent;
color: @theme_text_color;
}
.bggrey{
border-radius:5px;
border-color:@theme_text_color;
border-style:solid;
border-width:0.3px;
box-shadow: 1px 1px 2px rgba(0, 0, 0, 0.15);
}
.inherited>* {
border:none;
background:inherit;

@ -209,7 +209,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<object class="GtkButton" id="UserAddToConfigButton">
<property name="can-focus">True</property>
<property name="receives-default">True</property>
<property name="tooltip-text" translatable="yes">Additional saving configuration</property>
<property name="tooltip-text" translatable="yes">Syncronize with configuration</property>
<property name="image">image5</property>
<style>
<class name="thin"/>
@ -374,7 +374,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
<object class="GtkTreeViewColumn">
<property name="resizable">True</property>
<property name="sizing">fixed</property>
<property name="fixed-width">50</property>
<property name="fixed-width">10</property>
<property name="min-width">10</property>
<property name="title" translatable="yes">UID</property>
<property name="sort-column-id">1</property>

@ -53,7 +53,7 @@ msgstr ""
msgid "UID"
msgstr ""
#: source/ubl-strings.h:14 source/ubl-strings.h:107
#: source/ubl-strings.h:14 source/ubl-strings.h:118
msgid "Login"
msgstr ""
@ -139,7 +139,7 @@ msgid ""
"status"
msgstr ""
#: source/ubl-strings.h:36
#: source/ubl-strings.h:36 source/ubl-strings.h:249
msgid "Users"
msgstr ""
@ -159,7 +159,7 @@ msgid ""
"users"
msgstr ""
#: source/ubl-strings.h:40
#: source/ubl-strings.h:40 source/ubl-strings.h:259
msgid "Groups"
msgstr ""
@ -175,7 +175,7 @@ msgstr ""
msgid "Inspect users and groups in system"
msgstr ""
#: source/ubl-strings.h:46 source/ubl-strings.h:61
#: source/ubl-strings.h:46 source/ubl-strings.h:70
msgid "Additional settings"
msgstr ""
@ -204,553 +204,703 @@ msgid "Additional saving configuration"
msgstr ""
#: source/ubl-strings.h:54
msgid "Configuration file"
msgstr ""
#: source/ubl-strings.h:55
msgid "Choose custom configuration file"
msgstr ""
#: source/ubl-strings.h:57
msgid "This user doesn't exist in configuration. Are you sure want to add user"
msgstr ""
#: source/ubl-strings.h:54 source/ubl-strings.h:56
#: source/ubl-strings.h:57 source/ubl-strings.h:59
msgid "to configuration?"
msgstr ""
#: source/ubl-strings.h:55
#: source/ubl-strings.h:58
msgid "This user exists in configuration. Are you sure want to update user"
msgstr ""
#: source/ubl-strings.h:55 source/ubl-strings.h:57
#: source/ubl-strings.h:58 source/ubl-strings.h:60
msgid "data at configuration?"
msgstr ""
#: source/ubl-strings.h:56
#: source/ubl-strings.h:59
msgid ""
"This group doesn't exist in configuration. Are you sure want to add group"
msgstr ""
#: source/ubl-strings.h:57
#: source/ubl-strings.h:60
msgid "This group exists in configuration. Are you sure want to update group"
msgstr ""
#: source/ubl-strings.h:62
msgid "No password required"
msgid ""
"This user doesn't exist in configuration. Are you sure want to remove user"
msgstr ""
#: source/ubl-strings.h:62 source/ubl-strings.h:64
msgid "from the system?"
msgstr ""
#: source/ubl-strings.h:63
msgid ""
"This user exists in configuration and system. Are you sure want to remove "
"user"
msgstr ""
#: source/ubl-strings.h:64
msgid ""
"This group doesn't exist in configuration. Are you sure want to remove group"
msgstr ""
#: source/ubl-strings.h:65
msgid ""
"This group exists in configuration and system. Are you sure want to remove "
"group"
msgstr ""
#: source/ubl-strings.h:67
msgid "Syncronize with configuration"
msgstr ""
#: source/ubl-strings.h:71
msgid "No password required"
msgstr ""
#: source/ubl-strings.h:72
msgid "Set a password"
msgstr ""
#: source/ubl-strings.h:64 source/ubl-strings.h:110
#: source/ubl-strings.h:73 source/ubl-strings.h:122
msgid "Encrypted"
msgstr ""
#: source/ubl-strings.h:65
#: source/ubl-strings.h:74
msgid "Unencrypted"
msgstr ""
#: source/ubl-strings.h:78
#: source/ubl-strings.h:87
msgid "Accept"
msgstr ""
#: source/ubl-strings.h:79
#: source/ubl-strings.h:88
msgid ""
"Are you sure want to encrypt all passwords?\n"
"This action can't be undone."
msgstr ""
#: source/ubl-strings.h:80
#: source/ubl-strings.h:89
msgid "Encrypt all unencrypted passwords at global configuration"
msgstr ""
#: source/ubl-strings.h:81
#: source/ubl-strings.h:90
msgid "DES (Algorithm for Symmetric Encryption)"
msgstr ""
#: source/ubl-strings.h:82
#: source/ubl-strings.h:91
msgid "MD5 (128-bit hashing algorithm)"
msgstr ""
#: source/ubl-strings.h:83
#: source/ubl-strings.h:92
msgid "yescrypt (Cryptographic hash function)"
msgstr ""
#: source/ubl-strings.h:84
#: source/ubl-strings.h:93
msgid "GOST-YESCRYPT (Design according to GOST R 34.11─2012)"
msgstr ""
#: source/ubl-strings.h:85
#: source/ubl-strings.h:94
msgid "scrypt (Adaptive cryptographic key generation function)"
msgstr ""
#: source/ubl-strings.h:86
#: source/ubl-strings.h:95
msgid "Blowfish (Symmetric Block Cipher Algorithm)"
msgstr ""
#: source/ubl-strings.h:87
#: source/ubl-strings.h:96
msgid "bcrypt (Adaptive hash function from the Blowfish family of algorithms)"
msgstr ""
#: source/ubl-strings.h:88
#: source/ubl-strings.h:97
msgid ""
"bcrypt-a (Adaptive hash function from the Blowfish family of algorithms)"
msgstr ""
#: source/ubl-strings.h:89
#: source/ubl-strings.h:98
msgid "SHA512 (Hash function from the SHA-2 family of algorithms)"
msgstr ""
#: source/ubl-strings.h:90
#: source/ubl-strings.h:99
msgid "SHA256 (Hash function from the SHA-2 family of algorithms)"
msgstr ""
#: source/ubl-strings.h:91
#: source/ubl-strings.h:100
msgid "Sun MD5 (Hash algorithm from Sun Microsystems)"
msgstr ""
#: source/ubl-strings.h:92
#: source/ubl-strings.h:101
msgid "MD5 Unix (Hash algorithm calls standard MD5 thousand times)"
msgstr ""
#: source/ubl-strings.h:93
#: source/ubl-strings.h:102
msgid ""
"Extended DES Crypt (Hash function from the BSDi family of DES algorithms)"
msgstr ""
#: source/ubl-strings.h:94
#: source/ubl-strings.h:103
msgid "descrypt (Hash function from the DES family of algorithms)"
msgstr ""
#: source/ubl-strings.h:95
#: source/ubl-strings.h:104
msgid "NTHash (Hash function from the NT Windows family of algorithms)"
msgstr ""
#: source/ubl-strings.h:97
#: source/ubl-strings.h:106
msgid ""
"While booting the operating system, apply the settings of all users from the "
"configuration"
msgstr ""
#: source/ubl-strings.h:98
#: source/ubl-strings.h:107
msgid ""
"While shutdown, save the settings of all users with UID>=1000 to the "
"configuration"
msgstr ""
#: source/ubl-strings.h:101
#: source/ubl-strings.h:108
msgid ""
"While booting the operating system, apply the settings of all groups from "
"the configuration"
msgstr ""
#: source/ubl-strings.h:109
msgid ""
"While shutdown, save the settings of all groups with GID>=1000 to the "
"configuration"
msgstr ""
#: source/ubl-strings.h:112
msgid "Configure group"
msgstr ""
#: source/ubl-strings.h:102
#: source/ubl-strings.h:113
msgid "Add group"
msgstr ""
#: source/ubl-strings.h:103
#: source/ubl-strings.h:114
msgid "Group id:"
msgstr ""
#: source/ubl-strings.h:104
#: source/ubl-strings.h:115
msgid "Group name:"
msgstr ""
#: source/ubl-strings.h:105
#: source/ubl-strings.h:116
msgid "Group users:"
msgstr ""
#: source/ubl-strings.h:106
#: source/ubl-strings.h:117
msgid "Automatically"
msgstr ""
#: source/ubl-strings.h:108
#: source/ubl-strings.h:119
msgid "Group already exists in configuration"
msgstr ""
#: source/ubl-strings.h:120
msgid "Create group with ununique GID"
msgstr ""
#: source/ubl-strings.h:109
#: source/ubl-strings.h:121
msgid "Create system group"
msgstr ""
#: source/ubl-strings.h:111
#: source/ubl-strings.h:123
msgid "Additional configuration"
msgstr ""
#: source/ubl-strings.h:112
#: source/ubl-strings.h:124
msgid "Group configuration synchronization"
msgstr ""
#: source/ubl-strings.h:113
#: source/ubl-strings.h:125
msgid "When shutting down the system, save the group into the configuration"
msgstr ""
#: source/ubl-strings.h:114
#: source/ubl-strings.h:126
msgid "Group administrators:"
msgstr ""
#: source/ubl-strings.h:115
#: source/ubl-strings.h:127
msgid "Group name must not start with digit"
msgstr ""
#: source/ubl-strings.h:118
#: source/ubl-strings.h:130
msgid "Default groups"
msgstr ""
#: source/ubl-strings.h:119
#: source/ubl-strings.h:131
msgid "Main group"
msgstr ""
#: source/ubl-strings.h:120
#: source/ubl-strings.h:132
msgid "Additional groups"
msgstr ""
#: source/ubl-strings.h:121
#: source/ubl-strings.h:133
msgid "Choose groups"
msgstr ""
#: source/ubl-strings.h:122
#: source/ubl-strings.h:134
msgid "Choose users"
msgstr ""
#: source/ubl-strings.h:125
#: source/ubl-strings.h:135
msgid "Add to new:"
msgstr ""
#: source/ubl-strings.h:138
msgid "System users and groups"
msgstr ""
#: source/ubl-strings.h:126
#: source/ubl-strings.h:139
msgid "Locked"
msgstr ""
#: source/ubl-strings.h:127
#: source/ubl-strings.h:140
msgid "Username"
msgstr ""
#: source/ubl-strings.h:128
#: source/ubl-strings.h:141
msgid ""
"Primary\n"
"group"
msgstr ""
#: source/ubl-strings.h:129
#: source/ubl-strings.h:142
msgid ""
"Home\n"
"directory"
msgstr ""
#: source/ubl-strings.h:130 source/ubl-strings.h:136
#: source/ubl-strings.h:143 source/ubl-strings.h:149
msgid "Group"
msgstr ""
#: source/ubl-strings.h:131
#: source/ubl-strings.h:144
msgid "Update the system users and groups list"
msgstr ""
#: source/ubl-strings.h:132
#: source/ubl-strings.h:145
msgid "Toggle system groups and users"
msgstr ""
#: source/ubl-strings.h:134
#: source/ubl-strings.h:147
msgid "Password mismatch"
msgstr ""
#: source/ubl-strings.h:135
#: source/ubl-strings.h:148
msgid "Password must be at least"
msgstr ""
#: source/ubl-strings.h:135
#: source/ubl-strings.h:148
msgid "characters"
msgstr ""
#: source/ubl-strings.h:137
#: source/ubl-strings.h:150
msgid ""
"Days until\n"
"warning"
msgstr ""
#: source/ubl-strings.h:138
#: source/ubl-strings.h:151
msgid ""
"Days\n"
"without activity"
msgstr ""
#: source/ubl-strings.h:139
#: source/ubl-strings.h:152
msgid ""
"Shell\n"
"path"
msgstr ""
#: source/ubl-strings.h:140
#: source/ubl-strings.h:153
msgid ""
"Password has\n"
"been changed"
msgstr ""
#: source/ubl-strings.h:141
#: source/ubl-strings.h:154
msgid ""
"Expiration\n"
"date"
msgstr ""
#: source/ubl-strings.h:142
#: source/ubl-strings.h:155
msgid ""
"Password change\n"
"interval (min)"
msgstr ""
#: source/ubl-strings.h:143
#: source/ubl-strings.h:156
msgid ""
"Password change\n"
"interval (max)"
msgstr ""
#: source/ubl-strings.h:146
#: source/ubl-strings.h:159
msgid "Add user"
msgstr ""
#: source/ubl-strings.h:147
#: source/ubl-strings.h:160
msgid "Configure user"
msgstr ""
#: source/ubl-strings.h:148
#: source/ubl-strings.h:161
msgid "Set"
msgstr ""
#: source/ubl-strings.h:149
#: source/ubl-strings.h:162
msgid "Empty important field"
msgstr ""
#: source/ubl-strings.h:150
#: source/ubl-strings.h:163
msgid "Login must not start with digit"
msgstr ""
#: source/ubl-strings.h:151
#: source/ubl-strings.h:164
msgid "Loading has failed"
msgstr ""
#: source/ubl-strings.h:152
#: source/ubl-strings.h:165
msgid "Login name"
msgstr ""
#: source/ubl-strings.h:153
#: source/ubl-strings.h:166
msgid "Additional groups:"
msgstr ""
#: source/ubl-strings.h:154
#: source/ubl-strings.h:167
msgid "Password configuration"
msgstr ""
#: source/ubl-strings.h:155
#: source/ubl-strings.h:168
msgid "Password has been changed:"
msgstr ""
#: source/ubl-strings.h:156
#: source/ubl-strings.h:169
msgid "expiration date:"
msgstr ""
#: source/ubl-strings.h:157
#: source/ubl-strings.h:170
msgid "Password change interval: minimum"
msgstr ""
#: source/ubl-strings.h:158
#: source/ubl-strings.h:171
msgid "days, maximum"
msgstr ""
#: source/ubl-strings.h:159
#: source/ubl-strings.h:172
msgid "days"
msgstr ""
#: source/ubl-strings.h:160
#: source/ubl-strings.h:173
msgid "User already exists in configuration"
msgstr ""
#: source/ubl-strings.h:174
msgid "Days until warning:"
msgstr ""
#: source/ubl-strings.h:161
#: source/ubl-strings.h:175
msgid "Days without activity:"
msgstr ""
#: source/ubl-strings.h:162
#: source/ubl-strings.h:176
msgid "Force change at next login"
msgstr ""
#: source/ubl-strings.h:163
#: source/ubl-strings.h:177
msgid "User shell:"
msgstr ""
#: source/ubl-strings.h:164
#: source/ubl-strings.h:178
msgid "Home directory:"
msgstr ""
#: source/ubl-strings.h:165
#: source/ubl-strings.h:179
msgid "Don't set"
msgstr ""
#: source/ubl-strings.h:166
#: source/ubl-strings.h:180
msgid "Create system user"
msgstr ""
#: source/ubl-strings.h:167
#: source/ubl-strings.h:181
msgid "Create user with ununique (repeating) UID"
msgstr ""
#: source/ubl-strings.h:168
#: source/ubl-strings.h:182
msgid "Do not check login for compliance with character rules"
msgstr ""
#: source/ubl-strings.h:169
#: source/ubl-strings.h:183
msgid "Temporary deactivation"
msgstr ""
#: source/ubl-strings.h:170
#: source/ubl-strings.h:184
msgid "Save"
msgstr ""
#: source/ubl-strings.h:171
#: source/ubl-strings.h:185
msgid "login_name"
msgstr ""
#: source/ubl-strings.h:172
#: source/ubl-strings.h:186
msgid "group_name"
msgstr ""
#: source/ubl-strings.h:173
#: source/ubl-strings.h:187
msgid "User name"
msgstr ""
#: source/ubl-strings.h:174
#: source/ubl-strings.h:188
msgid "Sync user"
msgstr ""
#: source/ubl-strings.h:175
#: source/ubl-strings.h:189
msgid "Sync user with password"
msgstr ""
#: source/ubl-strings.h:176
#: source/ubl-strings.h:190
msgid "Encrypt all passwords"
msgstr ""
#: source/ubl-strings.h:178
#: source/ubl-strings.h:192
msgid "User configuration"
msgstr ""
#: source/ubl-strings.h:179
#: source/ubl-strings.h:193
msgid "User configuration synchronization"
msgstr ""
#: source/ubl-strings.h:180
#: source/ubl-strings.h:194
msgid "During system startup, load the user from the configuration"
msgstr ""
#: source/ubl-strings.h:181
#: source/ubl-strings.h:195
msgid "When shutting down the system, save the user into the configuration"
msgstr ""
#: source/ubl-strings.h:182
#: source/ubl-strings.h:196
msgid "User password configuration syncronization"
msgstr ""
#: source/ubl-strings.h:183
#: source/ubl-strings.h:197
msgid ""
"During system startup, load the user's parameters from the configuration"
msgstr ""
#: source/ubl-strings.h:184
#: source/ubl-strings.h:198
msgid ""
"When shutting down the system, save the user's parameters into the "
"configuration"
msgstr ""
#: source/ubl-strings.h:186
#: source/ubl-strings.h:200
msgid "Basic"
msgstr ""
#: source/ubl-strings.h:187
#: source/ubl-strings.h:201
msgid "Additional"
msgstr ""
#: source/ubl-strings.h:188
#: source/ubl-strings.h:202
msgid "Syncronization"
msgstr ""
#: source/ubl-strings.h:190
#: source/ubl-strings.h:204
msgid "Not specified"
msgstr ""
#: source/ubl-strings.h:192
#: source/ubl-strings.h:206
msgid "UID already exists in configuration"
msgstr ""
#: source/ubl-strings.h:193
#: source/ubl-strings.h:207
msgid "UID already exists in system"
msgstr ""
#: source/ubl-strings.h:194
#: source/ubl-strings.h:208
msgid "GID already exists in configuration"
msgstr ""
#: source/ubl-strings.h:195
#: source/ubl-strings.h:209
msgid "GID already exists in system"
msgstr ""
#: source/ubl-strings.h:198
#: source/ubl-strings.h:212
msgid "Repeat password:"
msgstr ""
#: source/ubl-strings.h:199
#: source/ubl-strings.h:213
msgid "Password hash:"
msgstr ""
#: source/ubl-strings.h:200
#: source/ubl-strings.h:214
msgid "Do not encrypt password"
msgstr ""
#: source/ubl-strings.h:203
#: source/ubl-strings.h:215
msgid "Password contain special symbols"
msgstr ""
#: source/ubl-strings.h:218
msgid "Additional configuration of service parameter saving"
msgstr ""
#: source/ubl-strings.h:204
#: source/ubl-strings.h:219
msgid ""
"At every system shutdown save changes of (root)/var/lib/samba\n"
"into (hd)/ublinux-data/rootcopy"
msgstr ""
#: source/ubl-strings.h:205
#: source/ubl-strings.h:220
msgid "For system save mode \"Sandbox\""
msgstr ""
#: source/ubl-strings.h:208
#: source/ubl-strings.h:223
msgid "Group deletion"
msgstr ""
#: source/ubl-strings.h:209
#: source/ubl-strings.h:224
msgid "Confirm group(-s) deletion:"
msgstr ""
#: source/ubl-strings.h:211
#: source/ubl-strings.h:226
msgid "User deletion"
msgstr ""
#: source/ubl-strings.h:212
#: source/ubl-strings.h:227
msgid "Confirm user(-s) deletion:"
msgstr ""
#: source/ubl-strings.h:213
#: source/ubl-strings.h:228
msgid "Chosen"
msgstr ""
#: source/ubl-strings.h:214
#: source/ubl-strings.h:229
msgid "User"
msgstr ""
#: source/ubl-strings.h:215
#: source/ubl-strings.h:230
msgid "Home directory"
msgstr ""
#: source/ubl-strings.h:216
#: source/ubl-strings.h:231
msgid "Delete home directory"
msgstr ""
#: source/ubl-strings.h:218
#: source/ubl-strings.h:233
msgid "Configuration users"
msgstr ""
#: source/ubl-strings.h:219
#: source/ubl-strings.h:234
msgid "Configuration groups"
msgstr ""
#: source/ubl-strings.h:220
#: source/ubl-strings.h:235 source/ubl-strings.h:250 source/ubl-strings.h:264
msgid "System users"
msgstr ""
#: source/ubl-strings.h:221
#: source/ubl-strings.h:236 source/ubl-strings.h:260
msgid "System groups"
msgstr ""
#: source/ubl-strings.h:237 source/ubl-strings.h:246
msgid "Remove from system"
msgstr ""
#: source/ubl-strings.h:238 source/ubl-strings.h:244
msgid "Remove from configuration"
msgstr ""
#: source/ubl-strings.h:240
msgid "Group deletion has failed"
msgstr ""
#: source/ubl-strings.h:241
msgid "User deletion has failed"
msgstr ""
#: source/ubl-strings.h:243
msgid "Add to configuration"
msgstr ""
#: source/ubl-strings.h:245
msgid "Add to system"
msgstr ""
#: source/ubl-strings.h:248 source/ubl-strings.h:263
msgid "All system users"
msgstr ""
#: source/ubl-strings.h:251 source/ubl-strings.h:265
msgid "Users UID range"
msgstr ""
#: source/ubl-strings.h:252 source/ubl-strings.h:266
msgid "User UID in system"
msgstr ""
#: source/ubl-strings.h:253
msgid "Users GID range"
msgstr ""
#: source/ubl-strings.h:254
msgid "User GID in system"
msgstr ""
#: source/ubl-strings.h:256
msgid "While shutdown, save the settings of all users to configuration"
msgstr ""
#: source/ubl-strings.h:257
msgid "While shutdown, save the settings of all groups to the configuration"
msgstr ""
#: source/ubl-strings.h:258
msgid "All groups in system"
msgstr ""
#: source/ubl-strings.h:261
msgid "Group GID range"
msgstr ""
#: source/ubl-strings.h:262
msgid "Group GID in system"
msgstr ""
#: source/ubl-strings.h:267
msgid "Syncronization type"
msgstr ""
#: source/ubl-strings.h:268
msgid "Minimum UID"
msgstr ""
#: source/ubl-strings.h:269
msgid "Maximum UID"
msgstr ""
#: source/ubl-strings.h:270
msgid "Minimum GID"
msgstr ""
#: source/ubl-strings.h:271
msgid "Maximum GID"
msgstr ""

@ -53,7 +53,7 @@ msgstr "Алгоритм хэширования пароля:"
msgid "UID"
msgstr "UID"
#: source/ubl-strings.h:14 source/ubl-strings.h:107
#: source/ubl-strings.h:14 source/ubl-strings.h:118
msgid "Login"
msgstr "Логин"
@ -149,7 +149,7 @@ msgstr ""
"Статус\n"
"пароля"
#: source/ubl-strings.h:36
#: source/ubl-strings.h:36 source/ubl-strings.h:249
msgid "Users"
msgstr "Пользователи"
@ -173,7 +173,7 @@ msgstr ""
"Пользователи\n"
"группы"
#: source/ubl-strings.h:40
#: source/ubl-strings.h:40 source/ubl-strings.h:259
msgid "Groups"
msgstr "Группы"
@ -189,7 +189,7 @@ msgstr "Обзор файлов"
msgid "Inspect users and groups in system"
msgstr "Просмотр пользователей и групп в системе"
#: source/ubl-strings.h:46 source/ubl-strings.h:61
#: source/ubl-strings.h:46 source/ubl-strings.h:70
msgid "Additional settings"
msgstr "Дополнительные настройки"
@ -218,57 +218,103 @@ msgid "Additional saving configuration"
msgstr "Дополнительные настройки сохранения"
#: source/ubl-strings.h:54
msgid "Configuration file"
msgstr "Файл конфигурации"
#: source/ubl-strings.h:55
msgid "Choose custom configuration file"
msgstr "Выбор файла конфигурации"
#: source/ubl-strings.h:57
msgid "This user doesn't exist in configuration. Are you sure want to add user"
msgstr ""
"Пользователь в конфигурации отсутствует, но его можно добавить. Вы "
"действительно хотите добавить пользователя"
#: source/ubl-strings.h:54 source/ubl-strings.h:56
#: source/ubl-strings.h:57 source/ubl-strings.h:59
msgid "to configuration?"
msgstr "в конфигурацию?"
#: source/ubl-strings.h:55
#: source/ubl-strings.h:58
msgid "This user exists in configuration. Are you sure want to update user"
msgstr ""
"Пользователь уже присутствует в конфигурации. Хотите обновить данные "
"пользователя"
#: source/ubl-strings.h:55 source/ubl-strings.h:57
#: source/ubl-strings.h:58 source/ubl-strings.h:60
msgid "data at configuration?"
msgstr "в конфигурации?"
#: source/ubl-strings.h:56
#: source/ubl-strings.h:59
msgid ""
"This group doesn't exist in configuration. Are you sure want to add group"
msgstr ""
"Группа в конфигурации отсутствует, но её можно добавить. Вы действительно "
"хотите добавить группу"
#: source/ubl-strings.h:57
#: source/ubl-strings.h:60
msgid "This group exists in configuration. Are you sure want to update group"
msgstr "Группа уже присутствует в конфигурации. Хотите обновить данные группы"
#: source/ubl-strings.h:62
msgid ""
"This user doesn't exist in configuration. Are you sure want to remove user"
msgstr ""
"Пользователь в конфигурации отсутствует. Вы действительно хотите удалить "
"пользователя"
#: source/ubl-strings.h:62 source/ubl-strings.h:64
msgid "from the system?"
msgstr "из системы?"
#: source/ubl-strings.h:63
msgid ""
"This user exists in configuration and system. Are you sure want to remove "
"user"
msgstr ""
"Пользователь уже присутствует в конфигурации и системе. Вы действительно "
"хотите удалить пользователя"
#: source/ubl-strings.h:64
msgid ""
"This group doesn't exist in configuration. Are you sure want to remove group"
msgstr ""
"Группа в конфигурации отсутствует и удаление будет выполнено из системы. Вы "
"действительно хотите удалить группу"
#: source/ubl-strings.h:65
msgid ""
"This group exists in configuration and system. Are you sure want to remove "
"group"
msgstr ""
"Группа уже присутствует в конфигурации и системе. Вы действительно хотите "
"удалить группу"
#: source/ubl-strings.h:67
msgid "Syncronize with configuration"
msgstr "Синхронизировать с конфигурацией"
#: source/ubl-strings.h:71
msgid "No password required"
msgstr "Пароль не требуется"
#: source/ubl-strings.h:63
#: source/ubl-strings.h:72
msgid "Set a password"
msgstr "Задать пароль"
#: source/ubl-strings.h:64 source/ubl-strings.h:110
#: source/ubl-strings.h:73 source/ubl-strings.h:122
msgid "Encrypted"
msgstr "Зашифрован"
#: source/ubl-strings.h:65
#: source/ubl-strings.h:74
msgid "Unencrypted"
msgstr "Не зашифрован"
#: source/ubl-strings.h:78
#: source/ubl-strings.h:87
msgid "Accept"
msgstr "Принять"
#: source/ubl-strings.h:79
#: source/ubl-strings.h:88
msgid ""
"Are you sure want to encrypt all passwords?\n"
"This action can't be undone."
@ -276,73 +322,73 @@ msgstr ""
"Вы уверены что хотите зашифровать все пароли?\n"
"Это действие нельзя отменить."
#: source/ubl-strings.h:80
#: source/ubl-strings.h:89
msgid "Encrypt all unencrypted passwords at global configuration"
msgstr "Зашифровать все незашифрованные пароли в глобальной конфигурации"
#: source/ubl-strings.h:81
#: source/ubl-strings.h:90
msgid "DES (Algorithm for Symmetric Encryption)"
msgstr "DES (Алгоритм для симметричного шифрования)"
#: source/ubl-strings.h:82
#: source/ubl-strings.h:91
msgid "MD5 (128-bit hashing algorithm)"
msgstr "MD5 (128-битный алгоритм хеширования)"
#: source/ubl-strings.h:83
#: source/ubl-strings.h:92
msgid "yescrypt (Cryptographic hash function)"
msgstr "yescrypt (Криптографическая хэш-функция)"
#: source/ubl-strings.h:84
#: source/ubl-strings.h:93
msgid "GOST-YESCRYPT (Design according to GOST R 34.11─2012)"
msgstr "GOST-YESCRYPT (Конструкция согласно ГОСТ Р 34.11─2012)"
#: source/ubl-strings.h:85
#: source/ubl-strings.h:94
msgid "scrypt (Adaptive cryptographic key generation function)"
msgstr "scrypt (Адаптивная криптографическая функция формирования ключа)"
#: source/ubl-strings.h:86
#: source/ubl-strings.h:95
msgid "Blowfish (Symmetric Block Cipher Algorithm)"
msgstr "Blowfish (Алгоритм блочного симметричного шифрования)"
#: source/ubl-strings.h:87
#: source/ubl-strings.h:96
msgid "bcrypt (Adaptive hash function from the Blowfish family of algorithms)"
msgstr "bcrypt (Адаптивная хеш-функция из семейства алгоритмов Blowfish)"
#: source/ubl-strings.h:88
#: source/ubl-strings.h:97
msgid ""
"bcrypt-a (Adaptive hash function from the Blowfish family of algorithms)"
msgstr "bcrypt-a (Адаптивная хеш-функция из семейства алгоритмов Blowfish)"
#: source/ubl-strings.h:89
#: source/ubl-strings.h:98
msgid "SHA512 (Hash function from the SHA-2 family of algorithms)"
msgstr "SHA512 (Хеш-функция из семейства алгоритмов SHA-2)"
#: source/ubl-strings.h:90
#: source/ubl-strings.h:99
msgid "SHA256 (Hash function from the SHA-2 family of algorithms)"
msgstr "SHA256 (Хеш-функция из семейства алгоритмов SHA-2)"
#: source/ubl-strings.h:91
#: source/ubl-strings.h:100
msgid "Sun MD5 (Hash algorithm from Sun Microsystems)"
msgstr "Sun MD5 (Хеш-алгоритм от Sun Microsystems)"
#: source/ubl-strings.h:92
#: source/ubl-strings.h:101
msgid "MD5 Unix (Hash algorithm calls standard MD5 thousand times)"
msgstr "MD5 Unix (Хэш-алгоритм вызывает тысячу раз стандартный MD5)"
#: source/ubl-strings.h:93
#: source/ubl-strings.h:102
msgid ""
"Extended DES Crypt (Hash function from the BSDi family of DES algorithms)"
msgstr "Extended DES Crypt (Хеш-функция из семейства алгоритмов DES от BSDi)"
#: source/ubl-strings.h:94
#: source/ubl-strings.h:103
msgid "descrypt (Hash function from the DES family of algorithms)"
msgstr "descrypt (Хеш-функция из семейства алгоритмов DES)"
#: source/ubl-strings.h:95
#: source/ubl-strings.h:104
msgid "NTHash (Hash function from the NT Windows family of algorithms)"
msgstr "NTHash (Хеш-функция из семейства алгоритмов NT Windows)"
#: source/ubl-strings.h:97
#: source/ubl-strings.h:106
msgid ""
"While booting the operating system, apply the settings of all users from the "
"configuration"
@ -350,7 +396,7 @@ msgstr ""
"При запуске операционной системы применять настройки всех пользователей из "
"конфигурации"
#: source/ubl-strings.h:98
#: source/ubl-strings.h:107
msgid ""
"While shutdown, save the settings of all users with UID>=1000 to the "
"configuration"
@ -358,91 +404,114 @@ msgstr ""
"При завершении работы сохранить настройки пользователей с UID>=1000 в "
"конфигурацию"
#: source/ubl-strings.h:101
#: source/ubl-strings.h:108
msgid ""
"While booting the operating system, apply the settings of all groups from "
"the configuration"
msgstr ""
"При запуске операционной системы применять настройки всех групп из "
"конфигурации"
#: source/ubl-strings.h:109
msgid ""
"While shutdown, save the settings of all groups with GID>=1000 to the "
"configuration"
msgstr ""
"При завершении работы сохранить настройки групп с GID>=1000 в конфигурацию"
#: source/ubl-strings.h:112
msgid "Configure group"
msgstr "Редактировать группу"
#: source/ubl-strings.h:102
#: source/ubl-strings.h:113
msgid "Add group"
msgstr "Добавить группу"
#: source/ubl-strings.h:103
#: source/ubl-strings.h:114
msgid "Group id:"
msgstr "Идентификатор группы (GID):"
#: source/ubl-strings.h:104
#: source/ubl-strings.h:115
msgid "Group name:"
msgstr "Имя группы:"
#: source/ubl-strings.h:105
#: source/ubl-strings.h:116
msgid "Group users:"
msgstr "Пользователи группы:"
#: source/ubl-strings.h:106
#: source/ubl-strings.h:117
msgid "Automatically"
msgstr "Автоматически"
#: source/ubl-strings.h:108
#: source/ubl-strings.h:119
msgid "Group already exists in configuration"
msgstr "Группа уже существует в конфигурации"
#: source/ubl-strings.h:120
msgid "Create group with ununique GID"
msgstr "Создать группу с повторяющимися (не уникальными) GID"
#: source/ubl-strings.h:109
#: source/ubl-strings.h:121
msgid "Create system group"
msgstr "Создать системную группу"
#: source/ubl-strings.h:111
#: source/ubl-strings.h:123
msgid "Additional configuration"
msgstr "Дополнительные настройки"
#: source/ubl-strings.h:112
#: source/ubl-strings.h:124
msgid "Group configuration synchronization"
msgstr "Синхронизация настроек группы"
#: source/ubl-strings.h:113
#: source/ubl-strings.h:125
msgid "When shutting down the system, save the group into the configuration"
msgstr "При завершении работы системы сохранить группу в конфигурацию"
#: source/ubl-strings.h:114
#: source/ubl-strings.h:126
msgid "Group administrators:"
msgstr "Администраторы группы:"
#: source/ubl-strings.h:115
#: source/ubl-strings.h:127
msgid "Group name must not start with digit"
msgstr "Имя группы не должно начинаться с цифры"
#: source/ubl-strings.h:118
#: source/ubl-strings.h:130
msgid "Default groups"
msgstr "Группы пользователей по умолчанию"
#: source/ubl-strings.h:119
#: source/ubl-strings.h:131
msgid "Main group"
msgstr "Основная группа"
#: source/ubl-strings.h:120
#: source/ubl-strings.h:132
msgid "Additional groups"
msgstr "Дополнительные группы"
#: source/ubl-strings.h:121
#: source/ubl-strings.h:133
msgid "Choose groups"
msgstr "Выбрать группы"
#: source/ubl-strings.h:122
#: source/ubl-strings.h:134
msgid "Choose users"
msgstr "Выбрать пользователей"
#: source/ubl-strings.h:125
#: source/ubl-strings.h:135
msgid "Add to new:"
msgstr "Добавить в новую:"
#: source/ubl-strings.h:138
msgid "System users and groups"
msgstr "Пользователи и группы в системе"
#: source/ubl-strings.h:126
#: source/ubl-strings.h:139
msgid "Locked"
msgstr "Отключен"
#: source/ubl-strings.h:127
#: source/ubl-strings.h:140
msgid "Username"
msgstr "Имя пользователя"
#: source/ubl-strings.h:128
#: source/ubl-strings.h:141
msgid ""
"Primary\n"
"group"
@ -450,7 +519,7 @@ msgstr ""
"Основная\n"
"группа"
#: source/ubl-strings.h:129
#: source/ubl-strings.h:142
msgid ""
"Home\n"
"directory"
@ -458,31 +527,31 @@ msgstr ""
"Домашний\n"
"каталог"
#: source/ubl-strings.h:130 source/ubl-strings.h:136
#: source/ubl-strings.h:143 source/ubl-strings.h:149
msgid "Group"
msgstr "Группа"
#: source/ubl-strings.h:131
#: source/ubl-strings.h:144
msgid "Update the system users and groups list"
msgstr "Обновить список пользователей и групп системы"
#: source/ubl-strings.h:132
#: source/ubl-strings.h:145
msgid "Toggle system groups and users"
msgstr "Переключить видимость системных пользователей и групп"
#: source/ubl-strings.h:134
#: source/ubl-strings.h:147
msgid "Password mismatch"
msgstr "Несовпадение паролей"
#: source/ubl-strings.h:135
#: source/ubl-strings.h:148
msgid "Password must be at least"
msgstr "Пароль должен состоять из как минимум"
#: source/ubl-strings.h:135
#: source/ubl-strings.h:148
msgid "characters"
msgstr "символов"
#: source/ubl-strings.h:137
#: source/ubl-strings.h:150
msgid ""
"Days until\n"
"warning"
@ -490,7 +559,7 @@ msgstr ""
"Дней до\n"
"предупреждения"
#: source/ubl-strings.h:138
#: source/ubl-strings.h:151
msgid ""
"Days\n"
"without activity"
@ -498,7 +567,7 @@ msgstr ""
"Дней без\n"
"активности"
#: source/ubl-strings.h:139
#: source/ubl-strings.h:152
msgid ""
"Shell\n"
"path"
@ -506,7 +575,7 @@ msgstr ""
"Путь до\n"
"оболочки"
#: source/ubl-strings.h:140
#: source/ubl-strings.h:153
msgid ""
"Password has\n"
"been changed"
@ -514,7 +583,7 @@ msgstr ""
"Пароль\n"
"изменён"
#: source/ubl-strings.h:141
#: source/ubl-strings.h:154
msgid ""
"Expiration\n"
"date"
@ -522,7 +591,7 @@ msgstr ""
"Дата\n"
"устаревания"
#: source/ubl-strings.h:142
#: source/ubl-strings.h:155
msgid ""
"Password change\n"
"interval (min)"
@ -530,7 +599,7 @@ msgstr ""
"Интервал смены\n"
"пароля (мин.)"
#: source/ubl-strings.h:143
#: source/ubl-strings.h:156
msgid ""
"Password change\n"
"interval (max)"
@ -538,215 +607,223 @@ msgstr ""
"Интервал смены\n"
"пароля (макс.)"
#: source/ubl-strings.h:146
#: source/ubl-strings.h:159
msgid "Add user"
msgstr "Добавить пользователя"
#: source/ubl-strings.h:147
#: source/ubl-strings.h:160
msgid "Configure user"
msgstr "Редактировать пользователя"
#: source/ubl-strings.h:148
#: source/ubl-strings.h:161
msgid "Set"
msgstr "Задать"
#: source/ubl-strings.h:149
#: source/ubl-strings.h:162
msgid "Empty important field"
msgstr "Пустое важное поле"
#: source/ubl-strings.h:150
#: source/ubl-strings.h:163
msgid "Login must not start with digit"
msgstr "Логин не должен начинаться с цифры"
#: source/ubl-strings.h:151
#: source/ubl-strings.h:164
msgid "Loading has failed"
msgstr "Ошибка загрузки"
#: source/ubl-strings.h:152
#: source/ubl-strings.h:165
msgid "Login name"
msgstr "Имя логина"
#: source/ubl-strings.h:153
#: source/ubl-strings.h:166
msgid "Additional groups:"
msgstr "Дополнительные группы:"
#: source/ubl-strings.h:154
#: source/ubl-strings.h:167
msgid "Password configuration"
msgstr "Конфигурация пароля"
#: source/ubl-strings.h:155
#: source/ubl-strings.h:168
msgid "Password has been changed:"
msgstr "Пароль изменён:"
#: source/ubl-strings.h:156
#: source/ubl-strings.h:169
msgid "expiration date:"
msgstr "Дата устаревания:"
#: source/ubl-strings.h:157
#: source/ubl-strings.h:170
msgid "Password change interval: minimum"
msgstr "Интервал смены пароля: минимум"
#: source/ubl-strings.h:158
#: source/ubl-strings.h:171
msgid "days, maximum"
msgstr "дней, максимум"
#: source/ubl-strings.h:159
#: source/ubl-strings.h:172
msgid "days"
msgstr "дней"
#: source/ubl-strings.h:160
#: source/ubl-strings.h:173
msgid "User already exists in configuration"
msgstr "Пользователь уже существует в конфигурации"
#: source/ubl-strings.h:174
msgid "Days until warning:"
msgstr "Дней до предупреждения:"
#: source/ubl-strings.h:161
#: source/ubl-strings.h:175
msgid "Days without activity:"
msgstr "Дней без активности:"
#: source/ubl-strings.h:162
#: source/ubl-strings.h:176
msgid "Force change at next login"
msgstr "Принудительно сменить при следующем входе в систему"
#: source/ubl-strings.h:163
#: source/ubl-strings.h:177
msgid "User shell:"
msgstr "Оболочка пользователя:"
#: source/ubl-strings.h:164
#: source/ubl-strings.h:178
msgid "Home directory:"
msgstr "Домашний каталог:"
#: source/ubl-strings.h:165
#: source/ubl-strings.h:179
msgid "Don't set"
msgstr "Не создавать"
#: source/ubl-strings.h:166
#: source/ubl-strings.h:180
msgid "Create system user"
msgstr "Создать системного пользователя"
#: source/ubl-strings.h:167
#: source/ubl-strings.h:181
msgid "Create user with ununique (repeating) UID"
msgstr "Создать пользователя с повторяющимися (не уникальными) UID"
#: source/ubl-strings.h:168
#: source/ubl-strings.h:182
msgid "Do not check login for compliance with character rules"
msgstr "Не проверять логин на несоответствие правилам использования символов"
#: source/ubl-strings.h:169
#: source/ubl-strings.h:183
msgid "Temporary deactivation"
msgstr "Временное отключение учётной записи"
#: source/ubl-strings.h:170
#: source/ubl-strings.h:184
msgid "Save"
msgstr "Сохранить"
#: source/ubl-strings.h:171
#: source/ubl-strings.h:185
msgid "login_name"
msgstr "Имя_логина"
#: source/ubl-strings.h:172
#: source/ubl-strings.h:186
msgid "group_name"
msgstr "Имя_группы"
#: source/ubl-strings.h:173
#: source/ubl-strings.h:187
msgid "User name"
msgstr "Имя пользователя"
#: source/ubl-strings.h:174
#: source/ubl-strings.h:188
msgid "Sync user"
msgstr "Синхронизировать пользователя"
#: source/ubl-strings.h:175
#: source/ubl-strings.h:189
msgid "Sync user with password"
msgstr "Синхронизировать пользователя с паролем"
#: source/ubl-strings.h:176
#: source/ubl-strings.h:190
msgid "Encrypt all passwords"
msgstr "Зашифровать все пароли"
#: source/ubl-strings.h:178
#: source/ubl-strings.h:192
msgid "User configuration"
msgstr "Настройка пользователя"
#: source/ubl-strings.h:179
#: source/ubl-strings.h:193
msgid "User configuration synchronization"
msgstr "Синхронизация настроек пользователя"
#: source/ubl-strings.h:180
#: source/ubl-strings.h:194
msgid "During system startup, load the user from the configuration"
msgstr ""
"При запуске операционной системы применять настройки пользователя из "
"конфигурации"
#: source/ubl-strings.h:181
#: source/ubl-strings.h:195
msgid "When shutting down the system, save the user into the configuration"
msgstr ""
"При завершении работы операционной системы сохранить настройки пользователя "
"в конфигурацию"
#: source/ubl-strings.h:182
#: source/ubl-strings.h:196
msgid "User password configuration syncronization"
msgstr "Синхронизация настроек пароля пользователя"
#: source/ubl-strings.h:183
#: source/ubl-strings.h:197
msgid ""
"During system startup, load the user's parameters from the configuration"
msgstr "При загрузке системы загрузить параметры пользователя из конфигурации"
#: source/ubl-strings.h:184
#: source/ubl-strings.h:198
msgid ""
"When shutting down the system, save the user's parameters into the "
"configuration"
msgstr ""
"При завершении работы системы сохранить параметры пользователя в конфигурацию"
#: source/ubl-strings.h:186
#: source/ubl-strings.h:200
msgid "Basic"
msgstr "Основные"
#: source/ubl-strings.h:187
#: source/ubl-strings.h:201
msgid "Additional"
msgstr "Дополнительные"
#: source/ubl-strings.h:188
#: source/ubl-strings.h:202
msgid "Syncronization"
msgstr "Синхронизация"
#: source/ubl-strings.h:190
#: source/ubl-strings.h:204
msgid "Not specified"
msgstr "Не задан"
#: source/ubl-strings.h:192
#: source/ubl-strings.h:206
msgid "UID already exists in configuration"
msgstr "UID уже существует в конфигурации"
#: source/ubl-strings.h:193
#: source/ubl-strings.h:207
msgid "UID already exists in system"
msgstr "UID уже существует в системе"
#: source/ubl-strings.h:194
#: source/ubl-strings.h:208
msgid "GID already exists in configuration"
msgstr "GID уже существует в конфигурации"
#: source/ubl-strings.h:195
#: source/ubl-strings.h:209
msgid "GID already exists in system"
msgstr "GID уже существует в системе"
#: source/ubl-strings.h:198
#: source/ubl-strings.h:212
msgid "Repeat password:"
msgstr "Подтверждение пароля:"
#: source/ubl-strings.h:199
#: source/ubl-strings.h:213
msgid "Password hash:"
msgstr "Хэш пароля:"
#: source/ubl-strings.h:200
#: source/ubl-strings.h:214
msgid "Do not encrypt password"
msgstr "Не шифровать пароль"
#: source/ubl-strings.h:203
#: source/ubl-strings.h:215
msgid "Password contain special symbols"
msgstr "Пароль содержит спецсимволы"
#: source/ubl-strings.h:218
msgid "Additional configuration of service parameter saving"
msgstr "Дополнительные настройки сохранения параметров сервисов"
#: source/ubl-strings.h:204
#: source/ubl-strings.h:219
msgid ""
"At every system shutdown save changes of (root)/var/lib/samba\n"
"into (hd)/ublinux-data/rootcopy"
@ -754,54 +831,138 @@ msgstr ""
"При каждом завершении работы ОС сохранять изменения (root)/var/lib/samba\n"
"в (hd)/ublinux-data/rootcopy/"
#: source/ubl-strings.h:205
#: source/ubl-strings.h:220
msgid "For system save mode \"Sandbox\""
msgstr "Для режима сохранения системы \"Песочница\""
#: source/ubl-strings.h:208
#: source/ubl-strings.h:223
msgid "Group deletion"
msgstr "Удаление групп(-ы)"
#: source/ubl-strings.h:209
#: source/ubl-strings.h:224
msgid "Confirm group(-s) deletion:"
msgstr "Подтвердите удаление групп(-ы):"
#: source/ubl-strings.h:211
#: source/ubl-strings.h:226
msgid "User deletion"
msgstr "Удаление пользователя(-ей)"
#: source/ubl-strings.h:212
#: source/ubl-strings.h:227
msgid "Confirm user(-s) deletion:"
msgstr "Подтвердите удаление пользователя (-ей):"
#: source/ubl-strings.h:213
#: source/ubl-strings.h:228
msgid "Chosen"
msgstr "Выбран"
#: source/ubl-strings.h:214
#: source/ubl-strings.h:229
msgid "User"
msgstr "Пользователь"
#: source/ubl-strings.h:215
#: source/ubl-strings.h:230
msgid "Home directory"
msgstr "Домашний каталог"
#: source/ubl-strings.h:216
#: source/ubl-strings.h:231
msgid "Delete home directory"
msgstr "Удалить домашний каталог"
#: source/ubl-strings.h:218
#: source/ubl-strings.h:233
msgid "Configuration users"
msgstr "Пользователи конфигурации"
#: source/ubl-strings.h:219
#: source/ubl-strings.h:234
msgid "Configuration groups"
msgstr "Группы конфигурации"
#: source/ubl-strings.h:220
#: source/ubl-strings.h:235 source/ubl-strings.h:250 source/ubl-strings.h:264
msgid "System users"
msgstr "Пользователи системы"
#: source/ubl-strings.h:221
#: source/ubl-strings.h:236 source/ubl-strings.h:260
msgid "System groups"
msgstr "Группы системы"
#: source/ubl-strings.h:237 source/ubl-strings.h:246
msgid "Remove from system"
msgstr "Удалить из системы"
#: source/ubl-strings.h:238 source/ubl-strings.h:244
msgid "Remove from configuration"
msgstr "Удалить из конфигурации"
#: source/ubl-strings.h:240
msgid "Group deletion has failed"
msgstr "Удаление группы завершено с ошибкой"
#: source/ubl-strings.h:241
msgid "User deletion has failed"
msgstr "Удаление пользователя завершено с ошибкой"
#: source/ubl-strings.h:243
#, fuzzy
msgid "Add to configuration"
msgstr "в конфигурацию?"
#: source/ubl-strings.h:245
#, fuzzy
msgid "Add to system"
msgstr "Добавить в новую:"
#: source/ubl-strings.h:248 source/ubl-strings.h:263
msgid "All system users"
msgstr "Все пользователи в системе"
#: source/ubl-strings.h:251 source/ubl-strings.h:265
msgid "Users UID range"
msgstr "Диапазон UID пользователей в системе"
#: source/ubl-strings.h:253
msgid "Users GID range"
msgstr "Диапазон UID пользователей в системе"
#: source/ubl-strings.h:254
msgid "User UID in system"
msgstr "Пользователь в системе с UID"
#: source/ubl-strings.h:256
msgid "While shutdown, save the settings of all users to configuration"
msgstr ""
"При завершении работы сохранить настройки пользователей"
#: source/ubl-strings.h:257
msgid "While shutdown, save the settings of all groups to the configuration"
msgstr ""
"При завершении работы сохранить настройки групп пользователей"
#: source/ubl-strings.h:258
msgid "All groups in system"
msgstr "Все группы в системе"
#: source/ubl-strings.h:261
msgid "Group GID range"
msgstr "Диапазон GID групп"
#: source/ubl-strings.h:262
msgid "Group GID in system"
msgstr "Группы в системе с GID"
#: source/ubl-strings.h:267
msgid "Syncronization type"
msgstr "Тип синхронизации с глобальной конфигурацией"
#: source/ubl-strings.h:268
msgid "Minimum UID"
msgstr "Минимальный UID"
#: source/ubl-strings.h:269
msgid "Maximum UID"
msgstr "Максимальный UID"
#: source/ubl-strings.h:270
msgid "Minimum GID"
msgstr "Минимальный GID"
#: source/ubl-strings.h:271
msgid "Maximum GID"
msgstr "Максимальный GID"

Loading…
Cancel
Save