You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ubl-settings-usergroups/source/ubl-settings-usergroups.h

629 lines
27 KiB

This file contains ambiguous Unicode characters!

This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.

#ifndef USERGROUPS_H
#define USERGROUPS_H
#include <gtk/gtk.h>
#include <gtk/gtkx.h>
#include <locale.h>
#include <vte/vte.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
#include <getopt.h>
#include <libintl.h>
#include <limits.h>
#include <sys/wait.h>
#include <libublsettings.h>
#include <libublsettings-gtk3.h>
#include <libublsettingsui-gtk3.h>
#ifdef WEBKIT_FOUND
#include <webkit2/webkit2.h>
#endif
#include "ubl-strings.h"
#define WIKI_LINK "https://wiki.ublinux.ru/ru/Программное_обеспечениерограммы_и_утилиты/Все/ubl-settings-usergroups"
#define _(String) gettext(String)
#define glade_path "/com/ublinux/ui/ubl-settings-usergroups.glade"
#define glade_path_ubl_settings_usergroups_additional_settings "/com/ublinux/ui/ubl-settings-usergroups-additional-settings.glade"
#define glade_path_ubl_settings_usergroups_group_creation "/com/ublinux/ui/ubl-settings-usergroups-group-creation.glade"
#define glade_path_ubl_settings_usergroups_group "/com/ublinux/ui/ubl-settings-usergroups-group.glade"
#define glade_path_ubl_settings_usergroups_password "/com/ublinux/ui/ubl-settings-usergroups-password.glade"
#define glade_path_ubl_settings_usergroups_system "/com/ublinux/ui/ubl-settings-usergroups-system.glade"
#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 icon_path_print "com.ublinux.libublsettingsui-gtk3.print-symbolic"
#define icon_path_save "com.ublinux.libublsettingsui-gtk3.save-symbolic"
#define LocalePath "/usr/share/locale"
#define LocaleName "ubl-settings-usergroups"
#define encrypt_passwords_command "/usr/lib/ublinux/functions globalconf_convert_pass_plain_to_hash"
#define get_default_hash_command "ubconfig --raw --source default get [users] HASHPASSWD"
#define clear_config_global_command "ubconfig --target global remove TEMP_SECTION TEMP_PATAMETER"
#define clear_config_local_command "ubconfig --target system remove TEMP_SECTION TEMP_PATAMETER"
#define samba_sync_command(user) yon_char_unite("sudo smbpasswd -Lan ",user,NULL)
#define samba_sync_password_command(user, password) yon_char_unite("(echo \"",password,"\"; echo \"",password,"\") | sudo smbpasswd -Las ",user,NULL)
#define get_passwords_command "ubconfig --target global get [users] USERADD[*] GROUPADD[*]"
#define check_is_password_hash(password) system(yon_char_unite("/lib/ublinux/functions is_hash_password '", password,"'",NULL))
#define get_system_user_command(target) yon_char_unite("/usr/lib/ublinux/functions get_conf_useradd_from_system ",target,NULL)
#define get_system_shadow_command(target) yon_char_unite("/usr/lib/ublinux/functions get_conf_usershadow_from_system ",target,NULL)
#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(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"
#define shadow_path "/etc/shadow"
#define group_shadow_path "/etc/gshadow"
#define uid_path "/etc/login.defs"
#define password_limits_path "/etc/security/pwquiality.conf"
#define get_user_info_command(target) yon_char_unite("getent passwd \"",target,"\"",NULL)
#define get_group_info_command(target) yon_char_unite("getent group \"",target,"\"",NULL)
#define get_home_command(target) yon_char_unite("getent passwd \"",target,"\" | cut -d: -f6",NULL)
#define remove_home_dirs_command(users_string) yon_char_append("/usr/lib/ublinux/functions remove_userhome ", users_string)
#define default_home_initiator_path "/etc/default/useradd"
#define user_shadow_command "cat /etc/shadow"
#define hash_list_path "resource:///com/ublinux/csv/hash_list.csv"
#define shell_list_path "resource:///com/ublinux/csv/shell_list.csv"
#define USERADD(user) yon_char_unite("USERADD[",user,"]",NULL)
#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 check_box_icon_name "com.ublinux.libublsettingsui-gtk3.checkbox-symbolic"
#define check_checked_icon_name "com.ublinux.libublsettingsui-gtk3.checkbox-checked-symbolic"
#define check_attention_icon_name "com.ublinux.libublsettingsui-gtk3.checkbox-attention-symbolic"
#define add_icon_name "com.ublinux.libublsettingsui-gtk3.increase-symbolic"
#define edit_icon_name "com.ublinux.libublsettingsui-gtk3.edit-symbolic"
#define delete_icon_name "com.ublinux.libublsettingsui-gtk3.trash-symbolic"
#define sync_icon_name "com.ublinux.libublsettingsui-gtk3.move-in-symbolic"
#define update_icon_name "com.ublinux.libublsettingsui-gtk3.sync-symbolic"
#define password_hash_get_command(passwd) yon_char_append("mkpasswd2 ",passwd)
#define user_info_command(target) yon_char_append("echo ",target)
#define user_info_pdf_command(target,path) yon_char_unite("echo ",target,path,NULL)
#define user_info_txt_command(target,path) yon_char_unite("echo ",target,path,NULL)
#define config_get_command(source) yon_char_unite("ubconfig --source ",source," -ea get [users] DEFAULTPASSWD DEFAULTROOTPASSWD DEFAULTUSER HASHPASSWD USERGROUPS ADDADM USERADD[*] USERADD_SYNC USERADD_SYNC[*] USERSHADOW[*] USERSHADOW_SYNC[*] GROUPADD[*] GROUPADD_SYNC[*] GROUPADD_SYNC"," -- [system] SYSTEMBOOT_STATEMODE"," -- [save] SAVE_ROOTCOPY_CHANGES",NULL)
#define config_get_default_command "ubconfig --source default -ea get users DEFAULTPASSWD DEFAULTROOTPASSWD USERGROUPS DEFAULTUSER HASHPASSWD ADDADM"
#define config_get_global_only_parameters "ubconfig --source global -ea get users DEFAULTPASSWD DEFAULTROOTPASSWD"
#define config_get_local_only_parameters ""
#define SAVE_ROOTCOPY_CHANGES_get_command "ubconfig --source global get [save] SAVE_ROOTCOPY_CHANGES"
#define DEFAULTUSER_get_command "ubconfig --source global get [users] DEFAULTUSER"
#define DEFAULTPASSWD_get_command "ubconfig --source global get [users] DEFAULTPASSWD"
#define DEFAULTROOTPASSWD_get_command "ubconfig --source global get [users] DEFAULTROOTPASSWD"
#define ADDADM_get_command "ubconfig --source global get [users] ADDADM"
#define HASHPASSWD_get_command "ubconfig --source global get [users] HASHPASSWD"
#define USERADD_SYNC_get_command "ubconfig --source global get [users] USERADD_SYNC"
#define USERGROUPS_get_command "ubconfig --source global get [users] USERGROUPS"
#define USERGROUPS_parameter "USERGROUPS"
#define USERGROUPS_parameter_command "ubconfig --source system get users USERGROUPS"
#define DEFAULTPASSWD_parameter "DEFAULTPASSWD"
#define DEFAULTPASSWD_parameter_command "ubconfig --source system get users DEFAULTPASSWD"
#define DEFAULTROOTPASSWD_parameter "DEFAULTROOTPASSWD"
#define DEFAULTROOTPASSWD_parameter_command "ubconfig --source system get users DEFAULTROOTPASSWD"
#define ADDADM_parameter "ADDADM"
#define ADDADM_parameter_command "ubconfig --source system get users ADDADM"
#define HASHPASSWD_parameter "HASHPASSWD"
#define HASHPASSWD_parameter_command "ubconfig --source system get users HASHPASSWD"
#define DEFAULTUSER_parameter "DEFAULTUSER"
#define DEFAULTUSER_parameter_command "ubconfig --source system get users DEFAULTUSER"
#define SAVE_ROOTCOPY_CHANGES_parameter "SAVE_ROOTCOPY_CHANGES"
#define SAVE_ROOTCOPY_CHANGES_parameter_command "ubconfig --source system get users SAVE_ROOTCOPY_CHANGES"
#define USERADD_parameter "USERADD"
#define USERADD_all_parameter_command "ubconfig --source system get users USERADD"
#define GROUPADD_parameter "GROUPADD"
#define GROUPADD_all_parameter_command "ubconfig --source system get users GROUPADD"
#define USERADD_SHADOW_parameter "USERADD_SHADOW"
#define USERADD_SHADOW_parameter_command "ubconfig --source system get users USERADD_SHADOW"
#define GROUPADD_SHADOW_parameter "GROUPADD_SHADOW"
#define GROUPADD_SHADOW_parameter_command "ubconfig --source system get users GROUPADD_SHADOW"
#define USERADD_SYNC_parameter "USERADD_SYNC"
#define USERADD_SYNC_parameter_command "ubconfig --source system get users USERADD_SYNC"
#define USERADD_SEARCH_macro "USERADD["
#define USERADD_parameter_command yon_char_unite("ubconfig --source system get users USERADD[",target,"]",NULL)
#define GROUPADD_SEARCH_macro "GROUPADD["
#define GROUPADD_parameter_command yon_char_unite("GROUPADD[",target,"]",NULL)
#define date_format_parameter "DateFormat"
typedef char* string;
__attribute__((unused)) static \
string version_application;
typedef struct {
template_config_fields
config_str groups;
int groups_size;
config_str users;
int users_size;
config_str shadow;
int shadow_size;
config_str group_shadow;
int group_shadow_size;
GtkListStore *users_list;
GtkListStore *groups_list;
int MAXUID;
int MINUID;
int MAXGID;
int MINGID;
size_t password_min_length;
int hash_default_id;
config_str sync_users;
int sync_size;
config_str remove_homes;
int homes_size;
char *default_home;
int save_config;
int launch_size;
config_str launch_arguments;
} config;
extern config main_config;
typedef struct {
template_window_fields
GtkListStore *CacheAlgList;
GtkListStore *GroupsList;
GtkListStore *UsersList;
GtkWidget *UserAddToConfigButton;
GtkWidget *SystemTree;
GtkWidget *SystemGroupsTree;
GtkWidget *button2;
GtkWidget *button3;
GtkWidget *AddButton;
GtkWidget *EditButton;
GtkWidget *DeleteButton;
GtkWidget *UpdateButton;
GtkWidget *UserInfoButton;
GtkWidget *UsersTree;
GtkWidget *GroupsTree;
GtkWidget *MainNotebook;
GtkWidget *SavingSettingsButton;
GtkWidget *ConfigUserShowSystemCheck;
GtkWidget *ConfigUserSearchEntry;
GtkWidget *ConfigGroupShowSystemCheck;
GtkWidget *ConfigGroupSearchEntry;
GtkWidget *SystemUserShowSystemCheck;
GtkWidget *SystemUserSearchEntry;
GtkWidget *SystemGroupShowSystemCheck;
GtkWidget *SystemGroupSearchEntry;
GtkTreeModel *ConfigUsersFilter;
GtkTreeModel *ConfigUsersSort;
GtkTreeModel *ConfigGroupsFilter;
GtkTreeModel *ConfigGroupsSort;
GtkTreeModel *SystemUsersFilter;
GtkTreeModel *SystemUsersSort;
GtkTreeModel *SystemGroupsFilter;
GtkTreeModel *SystemGroupsSort;
rmb_menu_window *UsersMenu;
rmb_menu_window *GroupsMenu;
rmb_menu_window *SystemUsersMenu;
rmb_menu_window *SystemGroupsMenu;
GtkListStore *liststore1;
GtkListStore *liststore2;
} main_window;
typedef struct {
GtkWidget *Window;
GtkWidget *AlwaysOpenCheck;
GtkWidget *CloseButton;
GtkWidget *AcceptButton;
} documentation_confirmation_window;
typedef struct{
GtkWidget *Window;
GtkWidget *StatusBox;
GtkWidget *DefaultUserNameEntry;
GtkWidget *DefaultUserAdministratorCheck;
GtkWidget *DefaultPasswordCombo;
GtkWidget *DefaultPasswordEntry;
GtkWidget *DefaultPasswordButton;
GtkWidget *RootPasswordCombo;
GtkWidget *RootPasswordEntry;
GtkWidget *RootPasswordButton;
GtkWidget *PasswordHashCombo;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
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{
GtkWidget *CreateGroupWindow;
GtkWidget *StatusBox;
GtkWidget *userUIDAutoCheck;
GtkWidget *userUIDEntry;
GtkWidget *userLoginEntry;
GtkWidget *userGroupsEntry;
GtkWidget *UserAdditionalGroupsButton;
GtkWidget *UserCancelButton;
GtkWidget *UserOkButton;
GtkWidget *AdditionalGroupsButton;
GtkWidget *UnuniqueGIDCheck;
GtkWidget *SystemGroupCheck;
GtkWidget *PasswordCombo;
GtkWidget *PasswordEntry;
GtkWidget *ChangePasswordButton;
GtkWidget *userTitleNameLabel;
GtkWidget *AdminGroupsEntry;
GtkWidget *AdminGroupsButton;
GtkWidget *GroupaddShutdownCheck;
GtkWidget *groupExtraOptionsEntry;
GtkWidget *MainNotebook;
char *last_gid;
char *old_password;
} 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;
typedef struct{
GtkWidget *CreateGroupWindow;
GtkWidget *StatusBox;
GtkWidget *UserCancelButton;
GtkWidget *UserOkButton;
GtkWidget *PasswordEntry;
GtkWidget *RepeatPasswordEntry;
GtkWidget *PasswordHashEntry;
GtkWidget *HashBox;
GtkWidget *PasswordBox;
GtkWidget *NoEncriptionCheck;
} ubl_settings_usergroups_password_window;
typedef struct {
GtkWidget *Window;
GtkWidget *Terminal;
GtkWidget *HeaderImage;
GtkWidget *PrintButton;
GtkWidget *SaveButton;
char *target_user;
} yon_user_info_window;
typedef struct{
GtkListStore *liststore1;
GtkListStore *liststore2;
GtkWidget *MonitorWindow;
GtkWidget *ToggleAllButton;
GtkWidget *UpdateButton;
GtkWidget *SystemTree;
int show_all;
} ubl_settings_usergroups_system_window;
typedef struct{
GtkWidget *CreateUserWindow;
GtkWidget *StatusBox;
GtkWidget *userUIDAutoCheck;
GtkWidget *userUIDEntry;
GtkWidget *userLoginEntry;
GtkWidget *userPasswordCombo;
GtkWidget *userPasswordEntry;
GtkWidget *userPasswordButton;
GtkWidget *userUserNameEntry;
GtkWidget *userGroupsCheck;
GtkWidget *userGroupsEntry;
GtkWidget *UserGroupsButton;
GtkWidget *userAdditionalGroupsEntry;
GtkWidget *userAdditionalGroupsButton;
GtkWidget *userPasswordChangedEntry;
GtkWidget *userPasswordExpirationEntry;
GtkWidget *userPasswordExpirationButton;
GtkWidget *userPasswordChangeDelayMinimumSpin;
GtkWidget *userPasswordChangeDelayMaximumSpin;
GtkWidget *userWarningSpin;
GtkWidget *userActivitySpin;
GtkWidget *userForceChangeCheck;
GtkWidget *userShellCombo;
GtkWidget *userShellEntry;
GtkWidget *userHomeCombo;
GtkWidget *userHomeEntry;
GtkWidget *userHomeButton;
GtkWidget *userCreateSystemCheck;
GtkWidget *userCreateUnuniqueCheck;
GtkWidget *userDontCheckCheck;
GtkWidget *userSyncSAMBACheck;
GtkWidget *userDeactivatedCheck;
GtkWidget *userExtraOptionsEntry;
GtkWidget *UserCancelButton;
GtkWidget *UserOkButton;
GtkWidget *CalendarPopup;
GtkWidget *ExpirationCalendar;
GtkWidget *UseraddBootCheck;
GtkWidget *UseraddShutdownCheck;
GtkWidget *UsershadowBootCheck;
GtkWidget *UsershadowShutdownCheck;
GtkWidget *userTitleNameLabel;
GtkWidget *userSyncSAMBAPasswordCheck;
GtkWidget *MainNotebook;
char *expiration_unix;
char *old_password;
char *old_username;
char *last_uid;
} ubl_settings_usergroups_user_window;
typedef struct {
GtkWidget *Window;
GtkWidget *StatusBox;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
GtkWidget *SambaCheck;
} yon_savasettings_window;
typedef struct {
GtkWidget *Window;
GtkWidget *StatusBox;
GtkWidget *CancelButton;
GtkWidget *AcceptButton;
GtkWidget *DeletionTree;
GtkWidget *TitleLabel;
GtkWidget *HatLabel;
GtkListStore *list;
GtkCellRenderer *DeleteCell;
GtkCellRenderer *DeleteHomeCell;
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);
ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group_creation_new();
ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new();
void on_standard_groups_open(GtkWidget *self, main_window *widgets);
ubl_settings_usergroups_password_window *yon_ubl_settings_usergroups_password_new();
ubl_settings_usergroups_system_window *yon_ubl_settings_usergroups_system_new();
void on_settings_usergroups_system_open(GtkWidget *self, main_window *widgets);
void on_remove_expired(GtkWidget *, GtkEntryIconPosition icon_pos, GdkEvent *, GtkEntry *target);
ubl_settings_usergroups_user_window *yon_ubl_settings_usergroups_user_new();
void on_password_accept(GtkWidget *self, dictionary *dict);
void on_config_update(GtkWidget *self, main_window *widgets);
int yon_load_proceed(YON_CONFIG_TYPE type);
void yon_interface_update(main_window *widgets);
void on_config_local_load(GtkWidget *self, main_window *widgets);
void on_config_global_load(GtkWidget *self, main_window *widgets);
void on_config_custom_load(GtkWidget *self,main_window *widgets);
void yon_samba_sync_proceed();
void yon_accept_changes();
void yon_hide_passwords(template_saving_window *window);
void on_save_done(main_window *widgets, config_str output, int size);
void on_save_failed(main_window *, config_str , int );
void on_config_save(GtkWidget *self, main_window *widgets);
void on_config_global_save(GtkWidget *self, main_window *widgets);
void on_config_local_save(GtkWidget *self, main_window *widgets);
void on_config_custom_save(GtkWidget *self, main_window *widgets);
void on_saving_settings_save(GtkWidget *self, yon_savasettings_window *window);
void yon_samba_sync_add(char *user, char*password);
void yon_samba_sync_remove(char *user);
int yon_samba_sync_get(char *user);
void on_delete_confirmation_delete_home_check(GtkCellRenderer *self, char *path, yon_confirmation_window *window);
void on_delete_confirmation_delete_check(GtkCellRenderer *self, char *path, yon_confirmation_window *window);
void yon_delete_confirmation_save(GtkWidget *self, dictionary *dict);
void yon_group_delete_confirmation_save(GtkWidget *self, dictionary *dict);
int yon_check_password_blocked(char *password);
yon_confirmation_window *yon_delete_confirmation_new();
void yon_system_delete_confirmation_open(main_window *widgets);
void yon_delete_confirmation_open(main_window *widgets);
void yon_group_delete_confirmation_open(main_window *widgets);
yon_savasettings_window *yon_saving_settings_new();
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, 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();
void on_ubl_settings_usergroups_additional_settings_open(GtkWidget *self, main_window *widgets);
void on_user_choose(GtkWidget *self, GtkEntry *target);
void on_GID_update(GtkWidget *self, ubl_settings_usergroups_group_creation_window *window);
void on_group_save(GtkWidget *self, dictionary *dict);
void on_system_parameter_changed(GtkWidget *self, ubl_settings_usergroups_group_creation_window *window);
ubl_settings_usergroups_group_creation_window *yon_ubl_settings_usergroups_group_creation_new();
void on_group_clicked(GtkCellRenderer *self, char *path, ubl_settings_usergroups_group_window *window);
ubl_settings_usergroups_group_window *yon_ubl_settings_usergroups_group_new(int mode);
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_accept(GtkWidget *self, dictionary *dict);
ubl_settings_usergroups_password_window *yon_ubl_settings_usergroups_password_new();
void yon_system_load(main_window *window);
void on_system_update(GtkWidget *self, main_window *window);
ubl_settings_usergroups_system_window *yon_ubl_settings_usergroups_system_new();
void on_settings_usergroups_system_open(GtkWidget *self, main_window *widgets);
void on_user_shell_changed(GtkWidget *self, ubl_settings_usergroups_user_window *window);
void on_UID_update(GtkWidget *self, ubl_settings_usergroups_user_window *window);
void on_user_login_update(GtkWidget *self, ubl_settings_usergroups_user_window *window);
void on_user_save(GtkWidget *self, dictionary *dict);
void on_toggle_button_set_active_from_combo_box(GtkComboBox *self,ubl_settings_usergroups_user_window *window);
void on_password_user_changed(GtkComboBox *self,ubl_settings_usergroups_user_window *window);
void on_toggle_button_set_active_from_toggle_button_inversed(GtkToggleButton *self, ubl_settings_usergroups_user_window *window);
void on_date_selected(GtkWidget *self, ubl_settings_usergroups_user_window *window);
void on_parameter_changed(GtkWidget *self,ubl_settings_usergroups_user_window *window);
void on_main_add(GtkWidget *self, main_window *widgets);
void on_main_edit(GtkWidget *self, main_window *widgets);
void on_main_edit_activate(GtkWidget *self, GtkTreePath *path, GtkTreeViewColumn *column, main_window *widgets);
void on_main_delete(GtkWidget *self, main_window *widgets);
void on_config_update(GtkWidget *self, main_window *widgets);
void on_user_sync_with_config(GtkWidget *,main_window *widgets);
int yon_element_chosen(GtkWidget *target);
void config_init();
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);
gboolean on_system_menu_open(GtkWidget *self,GdkEventButton *event, rmb_menu_window *window);
template_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);
void yon_gtk_login_block_symbols(GtkEntry *target);
void on_login_insert_custom_restricted_check(GtkEditable *editable, const gchar *text, gint length, gint *position);
void on_group_delete_toggled(GtkWidget *,gchar* path,yon_confirmation_window *window);
char *yon_user_check_groups(GtkListStore *list, char *target);
char *yon_user_get_group_string(char *user);
void on_password_hash_sensitiveness(GtkWidget *,ubl_settings_usergroups_password_window *window);
gboolean on_encrypt_update(dictionary *dict);
void *yon_passwords_encrypt(dictionary *dict);
gboolean on_filter(GtkTreeModel* model, GtkTreeIter *iter, main_window *widgets);
void on_filter_changed(GtkWidget *self, main_window *widgets);
void on_user_info(GtkWidget *,main_window *widgets);
yon_user_info_window *yon_user_info_window_new();
void on_user_info_save(GtkWidget *,yon_user_info_window *window);
void on_user_info_print(GtkWidget *,yon_user_info_window *window);
void yon_shutdown_toggled(GtkWidget *self,ubl_settings_usergroups_additional_settings_window *window);
void yon_gtk_tree_view_select_first(GtkTreeView *target);
void on_date_format_changed(GtkWidget *, main_window *widgets);
char *yon_user_get_system_groups(char *target_login);
int yon_system_group_sync(char *group);
int yon_system_user_sync(char *user);
void on_homedir_changed(GtkComboBox *self, GtkWidget *target);
int yon_config_check_valid();
#endif