mirror of
https://github.com/openbsd/src.git
synced 2025-01-10 06:47:55 -08:00
pledge the wyrms
This commit is contained in:
parent
2acf255547
commit
db911c4702
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: worm.c,v 1.33 2015/11/04 21:22:10 tedu Exp $ */
|
||||
/* $OpenBSD: worm.c,v 1.34 2015/11/21 05:29:42 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -92,6 +92,9 @@ main(int argc, char **argv)
|
||||
const char *errstr;
|
||||
struct timespec t, tn, tdiff;
|
||||
|
||||
if (pledge("stdio rpath tty", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
timespecclear(&t);
|
||||
|
||||
setvbuf(stdout, outbuf, _IOFBF, sizeof outbuf);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $OpenBSD: worms.c,v 1.22 2015/02/18 23:16:08 tedu Exp $ */
|
||||
/* $OpenBSD: worms.c,v 1.23 2015/11/21 05:29:42 deraadt Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1980, 1993
|
||||
@ -183,6 +183,9 @@ main(int argc, char *argv[])
|
||||
speed_t speed;
|
||||
time_t delay = 0;
|
||||
|
||||
if (pledge("stdio rpath tty", NULL) == -1)
|
||||
err(1, "pledge");
|
||||
|
||||
/* set default delay based on terminal baud rate */
|
||||
if (tcgetattr(STDOUT_FILENO, &term) == 0 &&
|
||||
(speed = cfgetospeed(&term)) > B9600)
|
||||
|
Loading…
Reference in New Issue
Block a user