rpms/gvfs/F-10 gvfs-1.1.8-sftp-dont-specify-user.patch, NONE, 1.1 gvfs-1.1.8-sftp-eating-cpu.patch, NONE, 1.1 gvfs-1.1.8-sftp-handle-keys.patch, NONE, 1.1 gvfs.spec, 1.97, 1.98

Tomas Bzatek tbzatek at fedoraproject.org
Wed Mar 11 14:26:08 UTC 2009


Author: tbzatek

Update of /cvs/extras/rpms/gvfs/F-10
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv747

Modified Files:
	gvfs.spec 
Added Files:
	gvfs-1.1.8-sftp-dont-specify-user.patch 
	gvfs-1.1.8-sftp-eating-cpu.patch 
	gvfs-1.1.8-sftp-handle-keys.patch 
Log Message:
* Wed Mar 11 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-7
- SFTP: Don't specify user unless requested explicitly by the uri
- SFTP: Don't ask for username when getting ssh key passphrase
- SFTP: 100% cpu usage when connecting to a ssh key and denying key access


gvfs-1.1.8-sftp-dont-specify-user.patch:

--- NEW FILE gvfs-1.1.8-sftp-dont-specify-user.patch ---
Index: daemon/gvfsbackendsftp.c
===================================================================
--- daemon/gvfsbackendsftp.c	(revision 2271)
+++ daemon/gvfsbackendsftp.c	(revision 2272)
@@ -365,8 +365,11 @@
     }
     
 
-  args[last_arg++] = g_strdup ("-l");
-  args[last_arg++] = g_strdup (op_backend->user);
+  if (op_backend->user_specified)
+    {
+      args[last_arg++] = g_strdup ("-l");
+      args[last_arg++] = g_strdup (op_backend->user);
+    }
 
   args[last_arg++] = g_strdup ("-s");
 
@@ -885,10 +888,14 @@
           else
             password_in_keyring = TRUE;
 
-	  if (new_user && strcmp (new_user, op_backend->user) != 0)
+	  if (new_user &&
+	      (op_backend->user == NULL ||
+	       strcmp (new_user, op_backend->user) != 0))
 	    {
 	      g_free (op_backend->user);
 	      op_backend->user = new_user;
+
+	      op_backend->user_specified = TRUE;
 	      
 	      g_free (op_backend->tmp_password);
 	      op_backend->tmp_password = new_password;
@@ -1584,8 +1591,6 @@
   op_backend->user = g_strdup (user);
   if (op_backend->user)
     op_backend->user_specified = TRUE;
-  else
-    op_backend->user = g_strdup (g_get_user_name ());
 
   return FALSE;
 }

gvfs-1.1.8-sftp-eating-cpu.patch:

--- NEW FILE gvfs-1.1.8-sftp-eating-cpu.patch ---
Index: daemon/gvfsbackendsftp.c
===================================================================
--- daemon/gvfsbackendsftp.c	(revision 2315)
+++ daemon/gvfsbackendsftp.c	(revision 2316)
@@ -560,6 +560,15 @@
 				&bytes_read, NULL, error))
     return NULL;
 
+  /* Make sure we handle ssh exiting early, e.g. if no further
+     authentication methods */
+  if (bytes_read == 0)
+    {
+      g_set_error_literal (error,
+			   G_IO_ERROR, G_IO_ERROR_FAILED,
+			   _("ssh program unexpectedly exited"));
+      return NULL;
+    }
   
   len = GUINT32_FROM_BE (len);
   

gvfs-1.1.8-sftp-handle-keys.patch:

--- NEW FILE gvfs-1.1.8-sftp-handle-keys.patch ---
Index: daemon/gvfsbackendsftp.c
===================================================================
--- daemon/gvfsbackendsftp.c	(revision 2311)
+++ daemon/gvfsbackendsftp.c	(revision 2312)
@@ -851,13 +851,14 @@
               
               if (g_vfs_keyring_is_available ())
                 flags |= G_ASK_PASSWORD_SAVING_SUPPORTED;
-	      if (!op_backend->user_specified)
+	      if (strcmp (authtype, "password") == 0 &&
+		  !op_backend->user_specified)
 	        flags |= G_ASK_PASSWORD_NEED_USERNAME;
 
               g_free (new_password);
               
               if (!g_mount_source_ask_password (mount_source,
-                                                g_str_has_prefix (buffer, "Enter passphrase for key") ?
+                                                strcmp (authtype, "publickey") == 0 ?
                                                 _("Enter passphrase for key")
                                                 :
                                                 _("Enter password"),


Index: gvfs.spec
===================================================================
RCS file: /cvs/extras/rpms/gvfs/F-10/gvfs.spec,v
retrieving revision 1.97
retrieving revision 1.98
diff -u -r1.97 -r1.98
--- gvfs.spec	2 Mar 2009 14:45:48 -0000	1.97
+++ gvfs.spec	11 Mar 2009 14:25:37 -0000	1.98
@@ -1,7 +1,7 @@
 Summary: Backends for the gio framework in GLib
 Name: gvfs
 Version: 1.0.3
-Release: 6%{?dist}
+Release: 7%{?dist}
 License: LGPLv2+
 Group: System Environment/Libraries
 URL: http://www.gtk.org
@@ -56,6 +56,16 @@
 # Immediately close the stream we get from g_file_replace(), so truncation becomes visible.
 Patch11: gvfs-1.0.4-fuse-truncate-immediately.patch
 
+# http://bugzilla.gnome.org/show_bug.cgi?id=550929
+# SFTP: Don't specify user unless requested explicitly by the uri.
+Patch12: gvfs-1.1.8-sftp-dont-specify-user.patch
+
+# SFTP: Don't ask for username when getting ssh key passphrase
+Patch13: gvfs-1.1.8-sftp-handle-keys.patch
+
+# http://bugzilla.gnome.org/show_bug.cgi?id=574754
+# SFTP: 100% cpu usage when connecting to a ssh key and denying key access
+Patch14: gvfs-1.1.8-sftp-eating-cpu.patch
 
 %description
 The gvfs package provides backend implementations for the gio 
@@ -148,6 +158,9 @@
 %patch10 -p0 -b .obexftp-write
 popd
 %patch11 -p0 -b .fuse-trunc
+%patch12 -p0 -b .sftp-user
+%patch13 -p0 -b .sftp-keys
+%patch14 -p0 -b .sftp-cpu
 
 
 %build
@@ -286,6 +299,11 @@
 
 
 %changelog
+* Wed Mar 11 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-7
+- SFTP: Don't specify user unless requested explicitly by the uri
+- SFTP: Don't ask for username when getting ssh key passphrase
+- SFTP: 100% cpu usage when connecting to a ssh key and denying key access
+
 * Mon Mar  2 2009 Tomas Bzatek <tbzatek at redhat.com> - 1.0.3-6
 - FUSE: truncate files immediately (#479199)
 




More information about the fedora-extras-commits mailing list