[gvfs] Handle the case where gnome-keyring has no password or no username



commit 9fc5ee1a8b0d6719ebc8f7e35687636ac4bb032c
Author: Benjamin Otte <otte gnome org>
Date:   Sun Dec 20 23:14:09 2009 +0100

    Handle the case where gnome-keyring has no password or no username
    
    Just ignore the keyring then.

 daemon/gvfsbackendftp.c |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)
---
diff --git a/daemon/gvfsbackendftp.c b/daemon/gvfsbackendftp.c
index 1b48fb0..cf33d10 100644
--- a/daemon/gvfsbackendftp.c
+++ b/daemon/gvfsbackendftp.c
@@ -365,11 +365,17 @@ do_mount (GVfsBackend *backend,
                 		     port == 21 ? 0 : port,
                 		     &username,
                 		     NULL,
-                		     &password))
+                		     &password) &&
+      username != NULL &&
+      password != NULL)
     {
       anonymous = FALSE;
       goto try_login;
     }
+  g_free (username);
+  g_free (password);
+  username = NULL;
+  password = NULL;
 
   while (TRUE)
     {



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]