summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomas Bzatek <tbzatek@src.gnome.org>2008-09-15 15:04:27 +0000
committerTomas Bzatek <tbzatek@src.gnome.org>2008-09-15 15:04:27 +0000
commit194fd6b109ea885852711bca477427b883d0a95a (patch)
tree24a5a23cf1b48129e70f43047de83a6ec9d2457b
parent77e270ed06726e115faf80243fc5c0e2fa00e165 (diff)
downloadgvfs-194fd6b109ea885852711bca477427b883d0a95a.tar.gz
SMB: encode username and domain into the URI
svn path=/branches/gnome-2-24/; revision=1982
-rw-r--r--ChangeLog5
-rw-r--r--client/smburi.c11
2 files changed, 16 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index 664f319b..550fe6d1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,10 @@
2008-09-15 Tomas Bzatek <tbzatek@redhat.com>
+ * client/smburi.c:
+ Encode username and domain into the URI
+
+2008-09-15 Tomas Bzatek <tbzatek@redhat.com>
+
* daemon/gvfsbackendsmb.c:
Revert commit #1772.
Set the information on the mount spec from the original URI
diff --git a/client/smburi.c b/client/smburi.c
index c1a10c8a..d3804cf4 100644
--- a/client/smburi.c
+++ b/client/smburi.c
@@ -206,6 +206,8 @@ smb_to_uri (GVfsUriMapper *mapper,
const char *type;
const char *server;
const char *share;
+ const char *user;
+ const char *domain;
char *s;
GDecodedUri *uri;
@@ -240,6 +242,15 @@ smb_to_uri (GVfsUriMapper *mapper,
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);