Commit Graph

19 Commits

Author SHA1 Message Date
Vladimir Serbinenko ad4bfeec5c Change fs functions to add fs_ prefix
This avoid conflict with gnulib

Signed-off-by: Vladimir Serbinenko <phcoder@google.com>
Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
2019-04-09 10:03:29 +10:00
Vladimir Serbinenko ca0a4f689a verifiers: File type for fine-grained signature-verification controlling
Let's provide file type info to the I/O layer. This way verifiers
framework and its users will be able to differentiate files and verify
only required ones.

This is preparatory patch.

Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com>
Signed-off-by: Daniel Kiper <daniel.kiper@oracle.com>
Reviewed-by: Ross Philipson <ross.philipson@oracle.com>
2018-11-09 13:25:31 +01:00
Andrei Borzenkov c1fbc26203 Add comments to code for commit d313218 2015-11-07 13:01:23 +03:00
Andrei Borzenkov d31321835e file: ignore host disk in blocklist check
It cannot work anyway because host disk cannot be read. This fixes hostfs access
on native Windows build where filenames start with '\' or do not have initial
separator at all (d:\foo).

Issue was observed when running grub-fstest on Windows. On UNIX image name is
canonicalized to always start with `/' so this was not noticed.

This has side effect of allowing relative path names on host, but this already
was the case with `ls' command, so it just extends it to all commands.

Reported-By: Arch Stack <archstacker@gmail.com>
Also-By: Arch Stack <archstacker@gmail.com>
2015-10-10 10:02:20 +03:00
Vladimir Serbinenko 33d02a42d6 * grub-core/kern/file.c (grub_file_open): Free file->name on failure.
(grub_file_close): Free file->name.
2013-11-18 02:41:42 +01:00
Paulo Flabiano Smorigo 84a0e9699f Add progress module to display load progress of files.
* grub-core/lib/progress.c: New file.
	* grub-core/Makefile.core.def (progress): New module.
	* grub-core/kern/file.c (grub_file_open): File name added.
	* (grub_file_read): Progress hook added.
	* grub-core/fs/cbfs.c (grub_cbfs_read): Likewise.
	* grub-core/fs/cpio_common.c (grub_cpio_read): Likewise.
	* grub-core/net/net.c (grub_net_fs_read_real): Likewise.
	* include/grub/file.h (struct grub_file): Add progress module
	* members.
	* include/grub/term.h (struct grub_term_output): Likewise.
	* grub-core/osdep/unix/emuconsole.c (grub_console_term_output):
	Terminal velocity added.
	* grub-core/osdep/windows/emuconsole.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/arc/console.c (grub_console_term_output): Likewise.
	* grub-core/term/efi/console.c (grub_console_term_output): Likewise.
	* grub-core/term/gfxterm.c (grub_video_term): Likewise.
	* grub-core/term/i386/coreboot/cbmemc.c (grub_cbmemc_term_output):
	* Likewise.
	* grub-core/term/i386/pc/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/i386/pc/vga_text.c (grub_vga_text_term): Likewise.
	* grub-core/term/ieee1275/console.c (grub_console_term_output):
	* Likewise.
	* grub-core/term/morse.c (grub_audio_term_output): Likewise.
	* grub-core/term/serial.c (grub_serial_term_output): Likewise.
	* grub-core/term/spkmodem.c (grub_spkmodem_term_output): Likewise.
	* grub-core/term/uboot/console.c (uboot_console_term_output):
	* Likewise.
2013-10-22 16:42:20 -02:00
Vladimir 'phcoder' Serbinenko 178c276419 * grub-core/kern/file.c: Use const char * rather than casting to
non-const.
2013-04-28 14:06:57 +02:00
Vladimir 'phcoder' Serbinenko 5e3b8dcbb5 Import gcrypt public-key cryptography and implement signature checking. 2013-01-11 21:32:42 +01:00
Vladimir 'phcoder' Serbinenko a188012e6c * grub-core/kern/file.c (grub_file_read): Read nothing if len = 0.
Special behaviour for len = 0 to read whole file isn't used anywhere and
	can cause buffer ovewrflows in several places.
2012-05-01 15:08:29 +02:00
Vladimir 'phcoder' Serbinenko 9c4b5c13e6 Improve gettext support. Stylistic fixes and error handling fixes while
on it.
2012-02-08 19:26:01 +01:00
Vladimir 'phcoder' Serbinenko 6708faafde Fix broken blksize negotiation, fix broken seek and change a way net device is filled n i386-pc 2011-07-02 17:58:23 +02:00
Vladimir 'phcoder' Serbinenko a057797f18 merge mine and abranches' branches. Fix several issues 2011-06-24 21:51:57 +02:00
Manoel R. Abranches 7dd64f1236 Use a net fs struct to handle open, reand and close in file. 2011-05-27 00:22:35 -03:00
Manoel Rebelo Abranches 4d6374ba78 Implement file close in network tranference.
Stop receiving packets from card on error.
2011-05-10 09:32:38 -03:00
Manoel Rebelo Abranches 90eb90e24c Merge mainline. 2011-05-05 12:12:22 -03:00
Vladimir 'phcoder' Serbinenko 9ee8d94faa * grub-core/kern/file.c (grub_file_open): Don't take into account the
parenthesis in the middle of the filename.
2011-04-11 07:38:42 +02:00
Manoel Rebelo Abranches 25f1579b43 Adapt protocols to new network struct. 2011-04-01 05:42:34 -03:00
Vladimir 'phcoder' Serbinenko fc2ef1172c * grub-core/io/gzio.c (grub_gzio_open): Removed "transparent" parameter.
Made static.
	(grub_gzfile_open): Removed. All users updated.
	(GRUB_MOD_INIT): New function.
	(GRUB_MOD_FINI): Likewise.
	* grub-core/kern/file.c (grub_file_filters_all): New variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_open): Handle filters.
	* grub-core/loader/i386/bsd.c (GRUB_MOD_INIT): Load gzio.
	* grub-core/normal/main.c (GRUB_MOD_INIT): Likewise.
	* include/grub/file.h (grub_file_filter_id_t): New type.
	(grub_file_filter_t): Likewise.
	(grub_file_filters_all): New extern variable.
	(grub_file_filters_enabled): Likewise.
	(grub_file_filter_register): New inline function.
	(grub_file_filter_unregister): Likewise.
	(grub_file_filter_disable): Likewise.
	(grub_file_filter_disable_compression): Likewise.
	* include/grub/gzio.h: Removed.
2010-09-05 13:05:36 +02:00
BVK Chaitanya 8c41176882 automake commit without merge history 2010-05-06 11:34:04 +05:30