diff options
author | Matt McCutchen <matt@mattmccutchen.net> | 2009-11-19 15:09:26 +0100 |
---|---|---|
committer | Christian Kellner <gicmo@gnome.org> | 2009-11-19 15:15:16 +0100 |
commit | 95711768d3e079952d4e127e3291caf8e9ef62f4 (patch) | |
tree | e576f6edab9b6d0a0f2bc5b614deb0982983995d | |
parent | ea829d236ca2702ff52048dec86dc96b403e66d9 (diff) | |
download | gvfs-95711768d3e079952d4e127e3291caf8e9ef62f4.tar.gz |
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>
-rw-r--r-- | client/gvfsfusedaemon.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/client/gvfsfusedaemon.c b/client/gvfsfusedaemon.c index 68e4ca0f..6e82e156 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 |