grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Ignore symlink traversal failures in grub-mount readdir


From: Dave Vasilevsky
Subject: Re: [PATCH] Ignore symlink traversal failures in grub-mount readdir
Date: Mon, 15 Oct 2012 11:08:12 -0400

> call_fill will then try to open them with
> grub_file_open, and get GRUB_ERR_BAD_FILE_TYPE because it's ultimately a
> directory not a regular file.  It then causes the whole readdir call to
> fail.  The net effect is that if you, for example, have a symlink
> anywhere in the top level of a filesystem, then the entire filesystem
> appears empty in grub-mount.

I used this extremely kludgy fix:
http://bazaar.launchpad.net/~djvasi/grub/mac-grub-mount/revision/4246#util/grub-mount.c
. It just assumes that if we get GRUB_ERR_BAD_FILE_TYPE, it must have
been a symlink to a directory, and presents it as such. Obviously this
is also a temporary hack, not sure if it's any better or worse than
yours.

Cheers,
Dave Vasilevsky



reply via email to

[Prev in Thread] Current Thread [Next in Thread]