gvfs r1983 - in trunk: . client



Author: tbzatek
Date: Mon Sep 15 15:07:26 2008
New Revision: 1983
URL: http://svn.gnome.org/viewvc/gvfs?rev=1983&view=rev

Log:
SMB: encode username and domain into the URI


Modified:
   trunk/ChangeLog
   trunk/client/smburi.c

Modified: trunk/client/smburi.c
==============================================================================
--- trunk/client/smburi.c	(original)
+++ trunk/client/smburi.c	Mon Sep 15 15:07:26 2008
@@ -206,6 +206,8 @@
   const char *type;
   const char *server;
   const char *share;
+  const char *user;
+  const char *domain;
   char *s;
   GDecodedUri *uri;
 
@@ -240,6 +242,15 @@
 	uri->path = g_strconcat ("/", share, info->path, NULL);
       else
 	uri->path = g_strconcat ("/", share, "/", info->path, NULL);
+	
+      user = g_vfs_uri_mount_info_get (info, "user");
+      domain = g_vfs_uri_mount_info_get (info, "domain");
+      if (user) {
+        if (domain)
+          uri->userinfo = g_strconcat (domain, ";", user, NULL);
+        else
+          uri->userinfo = g_strdup (user);
+      }
     }
 
   s = g_vfs_encode_uri (uri, allow_utf8);



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