Index: client/gdaemonfileinputstream.c
===================================================================
--- client/gdaemonfileinputstream.c	(revision 1513)
+++ client/gdaemonfileinputstream.c	(working copy)
@@ -1,3 +1,5 @@
+/* -*- mode: C; c-file-style: "gnu"; indent-tabs-mode: nil; -*- */
+
 /* GIO - GLib Input, Output and Streaming Library
  * 
  * Copyright (C) 2006-2007 Red Hat, Inc.
@@ -183,6 +185,8 @@
   GString *input_buffer;
   
   GString *output_buffer;
+
+  GDaemonFile *daemon_file;
 };
 
 static gssize     g_daemon_file_input_stream_read          (GInputStream         *stream,
@@ -252,6 +256,8 @@
   if (file->data_stream)
     g_object_unref (file->data_stream);
 
+  g_object_unref (file->daemon_file);
+
   g_string_free (file->input_buffer, TRUE);
   g_string_free (file->output_buffer, TRUE);
   
@@ -298,7 +304,8 @@
 }
 
 GFileInputStream *
-g_daemon_file_input_stream_new (int fd,
+g_daemon_file_input_stream_new (GDaemonFile *daemon_file,
+                                int fd,
 				gboolean can_seek)
 {
   GDaemonFileInputStream *stream;
@@ -308,6 +315,7 @@
   stream->command_stream = g_unix_output_stream_new (fd, FALSE);
   stream->data_stream = g_unix_input_stream_new (fd, TRUE);
   stream->can_seek = can_seek;
+  stream->daemon_file = g_object_ref (daemon_file);
   
   return G_FILE_INPUT_STREAM (stream);
 }
@@ -1238,9 +1246,8 @@
 				       GCancellable         *cancellable,
 				       GError              **error)
 {
-  g_set_error (error, G_IO_ERROR, G_IO_ERROR_NOT_SUPPORTED, "%s", _("The query info operation is not supported"));
-  
-  return NULL;
+  GDaemonFileInputStream *daemon_stream = G_DAEMON_FILE_INPUT_STREAM (stream);
+  return g_file_query_info (G_FILE (daemon_stream->daemon_file), attributes, G_FILE_QUERY_INFO_NONE, cancellable, error);
 }
 
 /************************************************************************
Index: client/gdaemonfileinputstream.h
===================================================================
--- client/gdaemonfileinputstream.h	(revision 1513)
+++ client/gdaemonfileinputstream.h	(working copy)
@@ -24,6 +24,7 @@
 #define __G_DAEMON_FILE_INPUT_STREAM_H__
 
 #include <gio/gio.h>
+#include "gdaemonfile.h"
 
 G_BEGIN_DECLS
 
@@ -44,7 +45,8 @@
 
 GType g_daemon_file_input_stream_get_type (void) G_GNUC_CONST;
 
-GFileInputStream *g_daemon_file_input_stream_new (int fd,
+GFileInputStream *g_daemon_file_input_stream_new (GDaemonFile *file,
+                                                  int fd,
 						  gboolean can_seek);
 
 G_END_DECLS
Index: client/gdaemonfile.c
===================================================================
--- client/gdaemonfile.c	(revision 1513)
+++ client/gdaemonfile.c	(working copy)
@@ -866,7 +866,8 @@
     }
   else
     {
-      stream = g_daemon_file_input_stream_new (fd, data->can_seek);
+      GDaemonFile *daemon_file = G_DAEMON_FILE (g_async_result_get_source_object (G_ASYNC_RESULT (data->result)));
+      stream = g_daemon_file_input_stream_new (daemon_file, fd, data->can_seek);
       g_simple_async_result_set_op_res_gpointer (data->result, stream, g_object_unref);
     }
 
@@ -978,7 +979,7 @@
       return NULL;
     }
   
-  return g_daemon_file_input_stream_new (fd, can_seek);
+  return g_daemon_file_input_stream_new (G_DAEMON_FILE (file), fd, can_seek);
 }
 
 static GFileOutputStream *
