mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-03-25 13:29:03 +02:00
Compare commits
4 Commits
a3cd10be4a
...
e2d8734150
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
e2d8734150 | ||
|
|
a74f184437 | ||
|
|
975aefeb80 | ||
|
|
68b6851075 |
@@ -4,10 +4,10 @@
|
||||
|
||||
CC?=cc
|
||||
CSTD?=-std=c90
|
||||
WERROR?=
|
||||
CWARN?=-Wall -pedantic
|
||||
WERROR?=-Werror
|
||||
CWARN?=-Wall -Wextra -pedantic
|
||||
COPT?=-Os
|
||||
CFLAGS?=$(COPT) $(CWARN) $(CSTD)
|
||||
CFLAGS?=-I. $(COPT) $(CWARN) $(CSTD)
|
||||
LDFLAGS?=
|
||||
DESTDIR?=
|
||||
PREFIX?=/usr/local
|
||||
|
||||
@@ -704,7 +704,17 @@ main(int argc, char *argv[])
|
||||
|
||||
fname = argv[1];
|
||||
|
||||
#ifdef NVMUTIL_UNVEIL
|
||||
/*
|
||||
* if global tmp is a different filesystem,
|
||||
* unveil would trap on final file rename
|
||||
* and we can't know the path in advance
|
||||
*/
|
||||
tname = new_tmpfile(&tmp_fd, 1, NULL);
|
||||
#else
|
||||
tname = new_tmpfile(&tmp_fd, 0, NULL);
|
||||
#endif
|
||||
|
||||
if (tname == NULL)
|
||||
err(errno, "Can't create tmpfile");
|
||||
|
||||
@@ -1373,6 +1383,8 @@ read_urandom(void)
|
||||
if (fd < 0) {
|
||||
|
||||
fd = open("/dev/urandom", O_RDONLY);
|
||||
if (fd < 0)
|
||||
fd = open("/dev/random", O_RDONLY);
|
||||
|
||||
if (fd < 0)
|
||||
return 16;
|
||||
|
||||
Reference in New Issue
Block a user