]> git.proxmox.com Git - grub2.git/commitdiff
2010-02-06 Vladimir Serbinenko <phcoder@gmail.com>
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 6 Feb 2010 14:25:59 +0000 (15:25 +0100)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sat, 6 Feb 2010 14:25:59 +0000 (15:25 +0100)
* fs/i386/pc/pxe.c (grub_pxefs_dir): Return with failure on
non-pxe disk.
(grub_pxefs_open): Likewise.

ChangeLog
fs/i386/pc/pxe.c

index 117933d07288465cbadd3b324a82715b878706b5..eed0f93bc5e2fbab5d71f16942ecd11f507ad6cd 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2010-02-06  Vladimir Serbinenko  <phcoder@gmail.com>
+
+       * fs/i386/pc/pxe.c (grub_pxefs_dir): Return with failure on
+       non-pxe disk.
+       (grub_pxefs_open): Likewise.
+
 2010-02-06  Colin D Bennett  <colin@gibibit.com>
 
        * conf/common.rmk (pkglib_MODULES): Add gfxmenu.mod.
index 8bfe17594801d45c212ef96d34a9acaf53a1b706..92529883e4e7e60cc0123161d73b07c634a51429 100644 (file)
@@ -173,12 +173,15 @@ static struct grub_disk_dev grub_pxe_dev =
   };
 
 static grub_err_t
-grub_pxefs_dir (grub_device_t device __attribute__ ((unused)),
+grub_pxefs_dir (grub_device_t device,
                const char *path  __attribute__ ((unused)),
                int (*hook) (const char *filename,
                             const struct grub_dirhook_info *info)
                __attribute__ ((unused)))
 {
+  if (device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+    return grub_error (GRUB_ERR_IO, "not a pxe disk");
+
   return GRUB_ERR_NONE;
 }
 
@@ -194,6 +197,9 @@ grub_pxefs_open (struct grub_file *file, const char *name)
   struct grub_pxe_disk_data *disk_data = file->device->disk->data;
   grub_file_t file_int, bufio;
 
+  if (file->device->disk->dev->id != GRUB_DISK_DEVICE_PXE_ID)
+    return grub_error (GRUB_ERR_IO, "not a pxe disk");
+
   if (curr_file != 0)
     {
       grub_pxe_call (GRUB_PXENV_TFTP_CLOSE, &c.c2);