diff options
author | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-09-15 15:04:27 +0000 |
---|---|---|
committer | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-09-15 15:04:27 +0000 |
commit | 194fd6b109ea885852711bca477427b883d0a95a (patch) | |
tree | 24a5a23cf1b48129e70f43047de83a6ec9d2457b | |
parent | 77e270ed06726e115faf80243fc5c0e2fa00e165 (diff) | |
download | gvfs-194fd6b109ea885852711bca477427b883d0a95a.tar.gz |
SMB: encode username and domain into the URI
svn path=/branches/gnome-2-24/; revision=1982
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | client/smburi.c | 11 |
2 files changed, 16 insertions, 0 deletions
@@ -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); |