File seahorse-ssh-keypair.patch of Package seahorse.openSUSE_13.1_Update

From db804a82e7828848bcf48b1603f7bcbb0ad78a5a Mon Sep 17 00:00:00 2001
From: Michael Catanzaro <mcatanzaro@gnome.org>
Date: Fri, 22 Nov 2013 22:44:47 -0600
Subject: [PATCH] Fix SSH key generation

Here, i used to be a guint, but was recently changed into a gint to
silence a compiler warning. This caused the for loop to terminate
without ever iterating.

https://bugzilla.gnome.org/show_bug.cgi?id=715053
---
 ssh/seahorse-ssh-source.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/ssh/seahorse-ssh-source.c b/ssh/seahorse-ssh-source.c
index 1f015f0..8cc233e 100644
--- a/ssh/seahorse-ssh-source.c
+++ b/ssh/seahorse-ssh-source.c
@@ -917,7 +917,7 @@ seahorse_ssh_source_file_for_algorithm (SeahorseSSHSource *ssrc, guint algo)
         break;
     }
     
-    for (i = 0; i < ~0; i++) {
+    for (i = 0; i < G_MAXINT; i++) {
         t = (i == 0) ? g_strdup (pref) : g_strdup_printf ("%s.%d", pref, i);
         filename = g_build_filename (ssrc->priv->ssh_homedir, t, NULL);
         g_free (t);
-- 
1.8.3.1

From b8efbb1b8f253d39449184e42904c97372c11066 Mon Sep 17 00:00:00 2001
From: Sebastian Keller <sebastian-keller@gmx.de>
Date: Thu, 07 Nov 2013 02:05:32 +0000
Subject: ui: fix pgp/ssh key export

The vala code is expecting the directory parameter to be a reference
so when checking "directory != null" it dereferences directory first.

https://bugzilla.gnome.org/show_bug.cgi?id=707014
---
diff --git a/pgp/seahorse-pgp-key-properties.c b/pgp/seahorse-pgp-key-properties.c
index f8764f7..323bda5 100644
--- a/pgp/seahorse-pgp-key-properties.c
+++ b/pgp/seahorse-pgp-key-properties.c
@@ -1162,6 +1162,7 @@ on_pgp_details_export_button (GtkWidget *widget,
 	GList *exporters = NULL;
 	GtkWindow *window;
 	GObject *object;
+	gchar *directory = NULL;
 	GFile *file;
 
 	object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
@@ -1169,9 +1170,10 @@ on_pgp_details_export_button (GtkWidget *widget,
 	exporters = g_list_append (exporters, seahorse_gpgme_exporter_new (object, TRUE, TRUE));
 
 	window = GTK_WINDOW (seahorse_widget_get_toplevel (swidget));
-	if (seahorse_exportable_prompt (exporters, window, NULL, &file, &exporter)) {
+	if (seahorse_exportable_prompt (exporters, window, &directory, &file, &exporter)) {
 		seahorse_exporter_export_to_file (exporter, file, TRUE, NULL,
 		                                  on_export_complete, g_object_ref (window));
+		g_free (directory);
 		g_object_unref (file);
 		g_object_unref (exporter);
 	}
diff --git a/ssh/seahorse-ssh-key-properties.c b/ssh/seahorse-ssh-key-properties.c
index fade71e..d599357 100644
--- a/ssh/seahorse-ssh-key-properties.c
+++ b/ssh/seahorse-ssh-key-properties.c
@@ -215,6 +215,7 @@ on_ssh_export_button_clicked (GtkWidget *widget, SeahorseWidget *swidget)
 	GList *exporters = NULL;
 	GObject *object;
 	GtkWindow *window;
+	gchar *directory = NULL;
 	GFile *file;
 
 	object = SEAHORSE_OBJECT_WIDGET (swidget)->object;
@@ -222,9 +223,10 @@ on_ssh_export_button_clicked (GtkWidget *widget, SeahorseWidget *swidget)
 	exporters = g_list_append (exporters, seahorse_ssh_exporter_new (object, TRUE));
 
 	window = GTK_WINDOW (seahorse_widget_get_toplevel (swidget));
-	if (seahorse_exportable_prompt (exporters, window, NULL, &file, &exporter)) {
+	if (seahorse_exportable_prompt (exporters, window, &directory, &file, &exporter)) {
 		seahorse_exporter_export_to_file (exporter, file, TRUE, NULL,
 		                                  on_export_complete, g_object_ref (window));
+		g_free (directory);
 		g_object_unref (file);
 		g_object_unref (exporter);
 	}
--
cgit v0.9.2

openSUSE Build Service is sponsored by