mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-17 18:34:57 +02:00
nvmutil: harden against hardlink attacks
Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -991,8 +991,8 @@ open_gbe_file(void)
|
|||||||
gbe_ino = gbe_st.st_ino;
|
gbe_ino = gbe_st.st_ino;
|
||||||
|
|
||||||
if (gbe_st.st_nlink > 1)
|
if (gbe_st.st_nlink > 1)
|
||||||
fprintf(stderr,
|
err(EINVAL,
|
||||||
"%s: warning: file has %lu hard links\n",
|
"%s: warning: file has multiple (%lu) hard links\n",
|
||||||
fname, (unsigned long)gbe_st.st_nlink);
|
fname, (unsigned long)gbe_st.st_nlink);
|
||||||
|
|
||||||
if (gbe_st.st_nlink == 0)
|
if (gbe_st.st_nlink == 0)
|
||||||
|
|||||||
Reference in New Issue
Block a user