summaryrefslogtreecommitdiff
path: root/common/gmountsource.c
diff options
context:
space:
mode:
authorAlexander Larsson <alexl@redhat.com>2008-03-05 12:37:34 +0000
committerAlexander Larsson <alexl@src.gnome.org>2008-03-05 12:37:34 +0000
commit0b9b55d5939029800db8d90f258cb1bb4b3a838e (patch)
treefada3973986b67da2b447de67fca0a50e2fb8a2f /common/gmountsource.c
parent648181f299d282855456752ea328a1e5e01881b6 (diff)
downloadgvfs-0b9b55d5939029800db8d90f258cb1bb4b3a838e.tar.gz
Always set password to non-NULL, but keep user/domain as NULL if not
2008-03-05 Alexander Larsson <alexl@redhat.com> * common/gmountsource.c: (ask_password_reply): Always set password to non-NULL, but keep user/domain as NULL if not specified by user. Fixes #520317 (smb auth crash) svn path=/trunk/; revision=1550
Diffstat (limited to 'common/gmountsource.c')
-rw-r--r--common/gmountsource.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/gmountsource.c b/common/gmountsource.c
index 8445def9..bbf6d73f 100644
--- a/common/gmountsource.c
+++ b/common/gmountsource.c
@@ -221,7 +221,7 @@ ask_password_reply (DBusMessage *reply,
if (!anonymous)
{
- data->password = *password == 0 ? NULL : g_strdup (password);
+ data->password = g_strdup (password);
data->username = *username == 0 ? NULL : g_strdup (username);
data->domain = *domain == 0 ? NULL : g_strdup (domain);
}
@@ -311,8 +311,9 @@ g_mount_source_ask_password_async (GMountSource *source,
*
* Requests the reply parameters from a g_mount_source_ask_password_async()
* request. All out parameters can be set to %NULL to ignore them.
- * <note><para>Please be aware that all string parameters can be set to %NULL,
- * so make sure to check them.</para></note>
+ * <note><para>Please be aware that out parameters other than the password
+ * are set to %NULL if the user don't specify them so make sure to
+ * check them.</para></note>
*
* Returns: %FALSE if the async reply contained an error.
**/