diff options
author | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-09-10 11:16:09 +0000 |
---|---|---|
committer | Sebastien Marie <semarie@cvs.openbsd.org> | 2015-09-10 11:16:09 +0000 |
commit | 4e86692b81e67787d91f4ea7cd52963b6e03d331 (patch) | |
tree | 62ef9f5dbbbef54093cb2950e8e4c713a9a718ac /regress | |
parent | d0809154e77b015d3295608629f3bba3b9847028 (diff) |
convert tame(2) regress to new API
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/tame/sigabrt/sigabrt.c | 7 | ||||
-rw-r--r-- | regress/sys/kern/tame/sigkill/sigkill.c | 7 |
2 files changed, 6 insertions, 8 deletions
diff --git a/regress/sys/kern/tame/sigabrt/sigabrt.c b/regress/sys/kern/tame/sigabrt/sigabrt.c index 4b6ec4aba56..890f862acd2 100644 --- a/regress/sys/kern/tame/sigabrt/sigabrt.c +++ b/regress/sys/kern/tame/sigabrt/sigabrt.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sigabrt.c,v 1.2 2015/08/23 04:59:31 semarie Exp $ */ +/* $OpenBSD: sigabrt.c,v 1.3 2015/09/10 11:16:08 semarie Exp $ */ /* * Copyright (c) 2015 Sebastien Marie <semarie@openbsd.org> * @@ -15,11 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/tame.h> - #include <stdio.h> #include <stdlib.h> #include <signal.h> +#include <unistd.h> void handler(int sigraised) @@ -37,7 +36,7 @@ main(int argc, char *argv[]) printf("permitted STDIO\n"); fflush(stdout); - tame(TAME_ABORT, NULL); + tame("abort", NULL); /* this will triggered tame_fail() */ printf("forbidden STDIO 1\n"); diff --git a/regress/sys/kern/tame/sigkill/sigkill.c b/regress/sys/kern/tame/sigkill/sigkill.c index 198f056081c..cdc6e3be159 100644 --- a/regress/sys/kern/tame/sigkill/sigkill.c +++ b/regress/sys/kern/tame/sigkill/sigkill.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sigkill.c,v 1.2 2015/08/23 04:59:31 semarie Exp $ */ +/* $OpenBSD: sigkill.c,v 1.3 2015/09/10 11:16:08 semarie Exp $ */ /* * Copyright (c) 2015 Sebastien Marie <semarie@openbsd.org> * @@ -15,11 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ -#include <sys/tame.h> - #include <stdio.h> #include <stdlib.h> #include <signal.h> +#include <unistd.h> void handler(int sigraised) @@ -38,7 +37,7 @@ main(int argc, char *argv[]) printf("permitted STDIO\n"); fflush(stdout); - tame(0, NULL); + tame("", NULL); /* this will triggered tame_fail() */ printf("forbidden STDIO 1\n"); |