[accounts-dialog] Some password cleansing
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [accounts-dialog] Some password cleansing
- Date: Fri, 26 Mar 2010 05:52:31 +0000 (UTC)
commit c8a80803f95baa30b8127521f8957e0669d73914
Author: Matthias Clasen <mclasen redhat com>
Date: Fri Mar 26 01:09:50 2010 -0400
Some password cleansing
src/um-password-dialog.c | 15 ++++++++++-----
src/um-user.c | 3 +++
2 files changed, 13 insertions(+), 5 deletions(-)
---
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
index 7f0f2d0..d581a18 100644
--- a/src/um-password-dialog.c
+++ b/src/um-password-dialog.c
@@ -249,6 +249,12 @@ static void
finish_password_change (UmPasswordDialog *um)
{
gtk_widget_hide (um->dialog);
+
+ gtk_entry_set_text (GTK_ENTRY (um->password_entry), " ");
+ gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
+ gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), "");
+ gtk_entry_set_text (GTK_ENTRY (um->old_password_entry), "");
+
um_password_dialog_set_user (um, NULL);
}
@@ -779,9 +785,8 @@ um_password_dialog_set_user (UmPasswordDialog *um,
g_object_unref (um->user);
um->user = NULL;
}
- um->user = user;
- if (um->user) {
- g_object_ref (um->user);
+ if (user) {
+ um->user = g_object_ref (user);
pixbuf = um_user_render_icon (user, FALSE, 48);
gtk_image_set_from_pixbuf (GTK_IMAGE (um->user_icon), pixbuf);
@@ -790,7 +795,6 @@ um_password_dialog_set_user (UmPasswordDialog *um,
gtk_label_set_label (GTK_LABEL (um->user_name),
um_user_get_real_name (user));
- gtk_combo_box_set_active (GTK_COMBO_BOX (um->action_combo), 0);
gtk_entry_set_text (GTK_ENTRY (um->password_entry), "");
gtk_entry_set_text (GTK_ENTRY (um->verify_entry), "");
gtk_entry_set_text (GTK_ENTRY (um->normal_hint_entry), "");
@@ -814,11 +818,12 @@ um_password_dialog_set_user (UmPasswordDialog *um,
model = gtk_tree_model_filter_new (model, NULL);
gtk_combo_box_set_model (GTK_COMBO_BOX (um->action_combo), model);
gtk_tree_model_filter_set_visible_func (GTK_TREE_MODEL_FILTER (model),
- visible_func,
+ (GtkTreeModelFilterVisibleFunc) visible_func,
um, NULL);
}
gtk_tree_model_filter_refilter (GTK_TREE_MODEL_FILTER (model));
+ gtk_combo_box_set_active (GTK_COMBO_BOX (um->action_combo), 0);
}
void
diff --git a/src/um-user.c b/src/um-user.c
index 341aaae..8d7e3c2 100644
--- a/src/um-user.c
+++ b/src/um-user.c
@@ -974,6 +974,7 @@ um_user_set_password (UmUser *user,
g_warning ("SetPassword call failed: %s", error->message);
g_error_free (error);
}
+ memset (crypted, 0, strlen (crypted));
g_free (crypted);
}
else if (password_mode == 3 || password_mode == 4) {
@@ -998,6 +999,8 @@ um_user_set_password (UmUser *user,
g_error_free (error);
}
}
+
+ memset (password, 0, strlen (password));
}
gboolean
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]