mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-21 10:12:04 +02:00
util/nvmutil: don't allow symlinks
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -226,8 +226,8 @@ typedef char static_assert_off_t_is_32[(sizeof(off_t) >= 4) ? 1 : -1];
|
|||||||
#define O_BINARY 0
|
#define O_BINARY 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifndef O_NONBLOCK
|
#ifndef O_NOFOLLOW
|
||||||
#define O_NONBLOCK 0
|
#define O_NOFOLLOW 0
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
@@ -865,7 +865,8 @@ open_gbe_file(void)
|
|||||||
{
|
{
|
||||||
struct stat gbe_st;
|
struct stat gbe_st;
|
||||||
|
|
||||||
xopen(&gbe_fd, fname, command[cmd_index].flags | O_BINARY, &gbe_st);
|
xopen(&gbe_fd, fname,
|
||||||
|
command[cmd_index].flags | O_BINARY | O_NOFOLLOW, &gbe_st);
|
||||||
|
|
||||||
gbe_file_size = gbe_st.st_size;
|
gbe_file_size = gbe_st.st_size;
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user