Implement upload and download commands.
[libguestfs.git] / daemon / file.c
index 16dfb00..2439833 100644 (file)
@@ -323,7 +323,7 @@ do_file (const char *path)
   int r, len, freeit = 0;
   char *buf;
 
   int r, len, freeit = 0;
   char *buf;
 
-  /*NEED_ROOT (NULL); - no: we allow people to run this on /dev devices. */
+  NEED_ROOT_OR_IS_DEVICE (path, NULL);
   ABS_PATH (path, NULL);
 
   if (strncmp (path, "/dev/", 5) == 0)
   ABS_PATH (path, NULL);
 
   if (strncmp (path, "/dev/", 5) == 0)