diff options
author | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-09-15 15:07:26 +0000 |
---|---|---|
committer | Tomas Bzatek <tbzatek@src.gnome.org> | 2008-09-15 15:07:26 +0000 |
commit | f7779a3aba874b0bc63a9bdc95b915556476a118 (patch) | |
tree | afeebff06e4e7f13948e80c56adb520511628408 /client | |
parent | 1240d066b84d6cb1465aaac33e89b15908998158 (diff) | |
download | gvfs-f7779a3aba874b0bc63a9bdc95b915556476a118.tar.gz |
SMB: encode username and domain into the URI
svn path=/trunk/; revision=1983
Diffstat (limited to 'client')
-rw-r--r-- | client/smburi.c | 11 |
1 files changed, 11 insertions, 0 deletions
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); |