From: rob Date: Tue, 22 Feb 2022 16:14:38 +0000 (+0000) Subject: Pledge stdio. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=78fd53900a0c6dce7ee1e6bba0bdd3c226cbdea6;p=openbsd Pledge stdio. Ok millert@ --- diff --git a/usr.bin/seq/seq.c b/usr.bin/seq/seq.c index 873f7267674..99068291609 100644 --- a/usr.bin/seq/seq.c +++ b/usr.bin/seq/seq.c @@ -1,4 +1,4 @@ -/* $OpenBSD: seq.c,v 1.2 2022/02/22 16:08:59 rob Exp $ */ +/* $OpenBSD: seq.c,v 1.3 2022/02/22 16:14:38 rob Exp $ */ /*- * Copyright (c) 2005 The NetBSD Foundation, Inc. @@ -99,6 +99,9 @@ main(int argc, char *argv[]) char *cur_print, *last_print; char pad = ZERO; + if (pledge("stdio", NULL) == -1) + err(1, "pledge"); + /* Determine the locale's decimal point. */ locale = localeconv(); if (locale && locale->decimal_point && locale->decimal_point[0] != '\0')