mirror of
https://codeberg.org/libreboot/lbmk.git
synced 2026-07-11 14:02:52 +02:00
util/spkmodem_recv: Use pledge but only on OpenBSD
It will only be used on OpenBSD. Other operating systems will behave in the same way. Pledge is feature specific to OpenBSD that restricts system operations, for security: https://man.openbsd.org/pledge.2 Signed-off-by: Leah Rowe <leah@libreboot.org>
This commit is contained in:
@@ -36,6 +36,11 @@ main(int argc, char *argv[])
|
||||
{
|
||||
int c;
|
||||
|
||||
#ifdef HAVE_PLEDGE
|
||||
if (pledge("stdio", NULL) == -1)
|
||||
err(errno, "pledge");
|
||||
#endif
|
||||
|
||||
while ((c = getopt(argc, argv, "u")) != -1) {
|
||||
switch (c) {
|
||||
case 'u':
|
||||
|
||||
Reference in New Issue
Block a user