From d00da3544e320c3da59c2f313f12d9cee3be00b8 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Apr 06 2010 02:14:26 +0000 Subject: fix a crash when changing password --- diff --git a/0001-Fix-a-possible-crash-when-changing-password.patch b/0001-Fix-a-possible-crash-when-changing-password.patch new file mode 100644 index 0000000..3815d93 --- /dev/null +++ b/0001-Fix-a-possible-crash-when-changing-password.patch @@ -0,0 +1,49 @@ +From adf5a77d5f4f5f0e94f0fad669ee7192d1a5f5f5 Mon Sep 17 00:00:00 2001 +From: Matthias Clasen +Date: Mon, 5 Apr 2010 22:03:02 -0400 +Subject: [PATCH] Fix a possible crash when changing password + +--- + src/run-passwd.c | 1 - + src/um-password-dialog.c | 6 ++---- + 2 files changed, 2 insertions(+), 5 deletions(-) + +diff --git a/src/run-passwd.c b/src/run-passwd.c +index c702364..7e40661 100644 +--- a/src/run-passwd.c ++++ b/src/run-passwd.c +@@ -57,7 +57,6 @@ typedef enum { + struct PasswdHandler { + const char *current_password; + const char *new_password; +- const char *retyped_password; + + /* Communication with the passwd program */ + GPid backend_pid; +diff --git a/src/um-password-dialog.c b/src/um-password-dialog.c +index d581a18..81c03dd 100644 +--- a/src/um-password-dialog.c ++++ b/src/um-password-dialog.c +@@ -777,10 +777,6 @@ um_password_dialog_set_user (UmPasswordDialog *um, + GdkPixbuf *pixbuf; + GtkTreeModel *model; + +- if (um->passwd_handler) { +- passwd_destroy (um->passwd_handler); +- um->passwd_handler = NULL; +- } + if (um->user) { + g_object_unref (um->user); + um->user = NULL; +@@ -803,6 +799,8 @@ um_password_dialog_set_user (UmPasswordDialog *um, + if (um_user_get_uid (um->user) == getuid()) { + gtk_widget_show (um->old_password_label); + gtk_widget_show (um->old_password_entry); ++ if (um->passwd_handler != NULL) ++ passwd_destroy (um->passwd_handler); + um->passwd_handler = passwd_init (); + um->old_password_ok = FALSE; + } +-- +1.7.0.1 + diff --git a/accountsdialog.spec b/accountsdialog.spec index 524ee20..59f6689 100644 --- a/accountsdialog.spec +++ b/accountsdialog.spec @@ -1,6 +1,6 @@ Name: accountsdialog Version: 0.6 -Release: 2%{?dist} +Release: 3%{?dist} Summary: An application to view and modify user accounts information Group: Applications/System @@ -13,6 +13,8 @@ Source0: http://download.gnome.org/sources/accountsdialog/0.6/%{name}-%{v Patch0: hide-unimplemented-parts.patch # upstream fix Patch1: 0001-Fix-some-issues-with-icon-handling.patch +# upstream fix +Patch2: 0001-Fix-a-possible-crash-when-changing-password.patch Requires: cheese-libs >= 2.29.90 @@ -43,6 +45,7 @@ also lets you configure some aspects of the gdm login screen. %setup -q %patch0 -p1 -b .hide-unimplemented-parts %patch1 -p1 -b .icon-changes +%patch2 -p1 -b .password-crash %build %configure @@ -70,6 +73,9 @@ rm -rf $RPM_BUILD_ROOT %changelog +* Mon Apr 5 2010 Matthias Clasen - 0.6-3 +- Fix a possible crash when changing password + * Mon Apr 5 2010 Matthias Clasen - 0.6-2 - Fix some issues with icon handling