|
|
077f563 |
From adf5a77d5f4f5f0e94f0fad669ee7192d1a5f5f5 Mon Sep 17 00:00:00 2001
|
|
|
077f563 |
From: Matthias Clasen <mclasen@redhat.com>
|
|
|
077f563 |
Date: Mon, 5 Apr 2010 22:03:02 -0400
|
|
|
077f563 |
Subject: [PATCH] Fix a possible crash when changing password
|
|
|
077f563 |
|
|
|
077f563 |
---
|
|
|
077f563 |
src/run-passwd.c | 1 -
|
|
|
077f563 |
src/um-password-dialog.c | 6 ++----
|
|
|
077f563 |
2 files changed, 2 insertions(+), 5 deletions(-)
|
|
|
077f563 |
|
|
|
077f563 |
diff --git a/src/run-passwd.c b/src/run-passwd.c
|
|
|
077f563 |
index c702364..7e40661 100644
|
|
|
077f563 |
--- a/src/run-passwd.c
|
|
|
077f563 |
+++ b/src/run-passwd.c
|
|
|
077f563 |
@@ -57,7 +57,6 @@ typedef enum {
|
|
|
077f563 |
struct PasswdHandler {
|
|
|
077f563 |
const char *current_password;
|
|
|
077f563 |
const char *new_password;
|
|
|
077f563 |
- const char *retyped_password;
|
|
|
077f563 |
|
|
|
077f563 |
/* Communication with the passwd program */
|
|
|
077f563 |
GPid backend_pid;
|
|
|
077f563 |
diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c
|
|
|
077f563 |
index d581a18..81c03dd 100644
|
|
|
077f563 |
--- a/src/um-password-dialog.c
|
|
|
077f563 |
+++ b/src/um-password-dialog.c
|
|
|
077f563 |
@@ -777,10 +777,6 @@ um_password_dialog_set_user (UmPasswordDialog *um,
|
|
|
077f563 |
GdkPixbuf *pixbuf;
|
|
|
077f563 |
GtkTreeModel *model;
|
|
|
077f563 |
|
|
|
077f563 |
- if (um->passwd_handler) {
|
|
|
077f563 |
- passwd_destroy (um->passwd_handler);
|
|
|
077f563 |
- um->passwd_handler = NULL;
|
|
|
077f563 |
- }
|
|
|
077f563 |
if (um->user) {
|
|
|
077f563 |
g_object_unref (um->user);
|
|
|
077f563 |
um->user = NULL;
|
|
|
077f563 |
@@ -803,6 +799,8 @@ um_password_dialog_set_user (UmPasswordDialog *um,
|
|
|
077f563 |
if (um_user_get_uid (um->user) == getuid()) {
|
|
|
077f563 |
gtk_widget_show (um->old_password_label);
|
|
|
077f563 |
gtk_widget_show (um->old_password_entry);
|
|
|
077f563 |
+ if (um->passwd_handler != NULL)
|
|
|
077f563 |
+ passwd_destroy (um->passwd_handler);
|
|
|
077f563 |
um->passwd_handler = passwd_init ();
|
|
|
077f563 |
um->old_password_ok = FALSE;
|
|
|
077f563 |
}
|
|
|
077f563 |
--
|
|
|
077f563 |
1.7.0.1
|
|
|
077f563 |
|