do this using ktrace step by step. not the method i recommend, because
it requires 100% coverage via feature tests. better to read the code and
understand everything being called, then make decisions.
-/* $OpenBSD: tty.c,v 1.7 2013/11/27 13:32:02 okan Exp $ */
+/* $OpenBSD: tty.c,v 1.8 2015/10/07 18:00:06 deraadt Exp $ */
/* $NetBSD: tty.c,v 1.4 1994/12/07 00:46:57 jtc Exp $ */
/*
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
+#include <err.h>
static void usage(void);
int ch, sflag;
char *t;
+ if (tame("stdio rpath tty", NULL) == -1)
+ err(1, "tame");
+
sflag = 0;
while ((ch = getopt(argc, argv, "s")) != -1) {
switch(ch) {
exit(t ? 0 : 1);
}
-
static void
usage(void)
{