[gvfs] Correctly report -ENOSYS for readline in FUSE
- From: Christian Kellner <gicmo src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gvfs] Correctly report -ENOSYS for readline in FUSE
- Date: Thu, 19 Nov 2009 14:14:04 +0000 (UTC)
commit ea4a116ca8d6c3b9fb0ffe90a7069687973aeeaf
Author: Matt McCutchen <matt mattmccutchen net>
Date: Thu Nov 19 15:09:26 2009 +0100
Correctly report -ENOSYS for readline in FUSE
The readlink vfunc is not implemented in the FUSE module so we should
not report success but an error (-ENOSYS). We also don't implement the
vfunc for now since that might lead to a security issue (see the
added comment). This fixes bug #601361.
Signed-off-by: Christian Kellner <gicmo gnome org>
client/gvfsfusedaemon.c | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
---
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c
index 68e4ca0..6e82e15 100644
--- a/client/gvfsfusedaemon.c
+++ b/client/gvfsfusedaemon.c
@@ -892,7 +892,12 @@ vfs_readlink (const gchar *path, gchar *target, size_t size)
{
debug_print ("vfs_readlink: %s\n", path);
- return 0;
+ /* This is not implemented because it would allow remote servers to launch
+ * symlink attacks on the local machine. There's not much of a use for
+ * "readlink" anyway since we don't pass G_FILE_QUERY_INFO_NOFOLLOW_SYMLINKS,
+ * so non-broken symlinks will be followed transparently. */
+
+ return -ENOSYS;
}
static gint
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]