diff options
| author | Leah Rowe <leah@libreboot.org> | 2026-03-13 15:42:00 +0000 |
|---|---|---|
| committer | Leah Rowe <leah@libreboot.org> | 2026-03-13 15:42:00 +0000 |
| commit | 8ca953ec79a80fe7c3a853aff65c4f4cc822bb9d (patch) | |
| tree | 2ee1a3cab2dba6ed215e3be486403417c892d322 /util/nvmutil/nvmutil.c | |
| parent | c2c483dcbe95b399daab1e98678a7f2dfb52418e (diff) | |
util/nvmutil: don't allow symlinks
Signed-off-by: Leah Rowe <leah@libreboot.org>
Diffstat (limited to 'util/nvmutil/nvmutil.c')
| -rw-r--r-- | util/nvmutil/nvmutil.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/util/nvmutil/nvmutil.c b/util/nvmutil/nvmutil.c index 6b7be3df..b6a8b600 100644 --- a/util/nvmutil/nvmutil.c +++ b/util/nvmutil/nvmutil.c @@ -226,8 +226,8 @@ typedef char static_assert_off_t_is_32[(sizeof(off_t) >= 4) ? 1 : -1]; #define O_BINARY 0 #endif -#ifndef O_NONBLOCK -#define O_NONBLOCK 0 +#ifndef O_NOFOLLOW +#define O_NOFOLLOW 0 #endif /* @@ -865,7 +865,8 @@ open_gbe_file(void) { 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; |
