|
|
|
@ -514,17 +514,19 @@ void on_user_save(GtkWidget *self, dictionary *dict){
|
|
|
|
password_change_interval_maximum = yon_char_from_long(password_change_interval_maximum_active);
|
|
|
|
password_change_interval_maximum = yon_char_from_long(password_change_interval_maximum_active);
|
|
|
|
} else password_change_interval_maximum = 0;
|
|
|
|
} else password_change_interval_maximum = 0;
|
|
|
|
|
|
|
|
|
|
|
|
guint year, month, day;
|
|
|
|
if (!yon_char_is_empty(gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry)))){
|
|
|
|
gtk_calendar_get_date(GTK_CALENDAR(window->ExpirationCalendar),&year,&month,&day);
|
|
|
|
guint year, month, day;
|
|
|
|
char *dy = yon_char_from_int(day);
|
|
|
|
gtk_calendar_get_date(GTK_CALENDAR(window->ExpirationCalendar),&year,&month,&day);
|
|
|
|
char *mn = yon_char_from_int(month+1);
|
|
|
|
char *dy = yon_char_from_int(day);
|
|
|
|
char *yr = yon_char_from_int(year);
|
|
|
|
char *mn = yon_char_from_int(month+1);
|
|
|
|
if (month+1<10) mn = yon_char_append("0",mn);
|
|
|
|
char *yr = yon_char_from_int(year);
|
|
|
|
if (day<10) dy = yon_char_append("0",dy);
|
|
|
|
if (month+1<10) mn = yon_char_append("0",mn);
|
|
|
|
password_expiration_date = yon_char_unite(yr,"-",mn,"-",dy,NULL);
|
|
|
|
if (day<10) dy = yon_char_append("0",dy);
|
|
|
|
// password_expiration_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry));
|
|
|
|
password_expiration_date = yon_char_unite(yr,"-",mn,"-",dy,NULL);
|
|
|
|
if (yon_char_is_empty(password_expiration_date)){
|
|
|
|
// password_expiration_date = (char*)gtk_entry_get_text(GTK_ENTRY(window->userPasswordExpirationEntry));
|
|
|
|
password_expiration_date="-1";
|
|
|
|
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));
|
|
|
|
long warning_days_active = gtk_spin_button_get_value(GTK_SPIN_BUTTON(window->userWarningSpin));
|
|
|
|
@ -674,11 +676,13 @@ int yon_system_user_sync(char *target_user){
|
|
|
|
free(optionals);
|
|
|
|
free(optionals);
|
|
|
|
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(config_user)){
|
|
|
|
if (!yon_char_is_empty(config_user)){
|
|
|
|
char *user_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",USERADD(target_user));
|
|
|
|
|
|
|
|
char *parameter_name = USERADD(target_user);
|
|
|
|
char *parameter_name = USERADD(target_user);
|
|
|
|
|
|
|
|
char *user_command = yon_config_parameter_prepare_command(dull_parameter_get_command,NULL,"users",parameter_name);
|
|
|
|
yon_config_register(parameter_name,user_command,config_user);
|
|
|
|
yon_config_register(parameter_name,user_command,config_user);
|
|
|
|
yon_config_remove_ignore(parameter_name);
|
|
|
|
yon_config_remove_ignore(parameter_name);
|
|
|
|
free(config_user);
|
|
|
|
free(config_user);
|
|
|
|
|
|
|
|
free(user_command);
|
|
|
|
|
|
|
|
free(parameter_name);
|
|
|
|
} else return 0;
|
|
|
|
} else return 0;
|
|
|
|
|
|
|
|
|
|
|
|
if (!yon_char_is_empty(config_shadow)){
|
|
|
|
if (!yon_char_is_empty(config_shadow)){
|
|
|
|
|