Security: Mitigate possible privilege escalation via SG_IO ioctl (CVE-2011-4127,...
[libguestfs.git] / daemon / debug.c
index cd3e8a5..f80a1ca 100644 (file)
@@ -88,7 +88,7 @@ do_debug (const char *subcmd, char *const *argv)
       return cmds[i].f (subcmd, argc, argv);
   }
 
-  reply_with_error ("use 'debug help' to list the supported commands");
+  reply_with_error ("use 'debug help 0' to list the supported commands");
   return NULL;
 }
 
@@ -549,10 +549,6 @@ do_debug_upload (const char *filename, int mode)
   }
 
   if (close (fd) == -1) {
-    int err = errno;
-    if (r == -1)                /* if r == 0, file transfer ended already */
-      cancel_receive ();
-    errno = err;
     reply_with_perror ("close: %s", filename);
     return -1;
   }