From d47e324371fff31ee91ede64a66cac79bc12e72f Mon Sep 17 00:00:00 2001 From: bluhm Date: Wed, 12 Apr 2017 13:14:08 +0000 Subject: [PATCH] The pledge sigkill test is an outdated copy of sigabrt. Remove the former and activate the latter. OK semarie@ --- regress/sys/kern/pledge/Makefile | 4 +- regress/sys/kern/pledge/sigkill/Makefile | 11 ----- regress/sys/kern/pledge/sigkill/sigkill.c | 50 --------------------- regress/sys/kern/pledge/sigkill/sigkill.out | 2 - 4 files changed, 2 insertions(+), 65 deletions(-) delete mode 100644 regress/sys/kern/pledge/sigkill/Makefile delete mode 100644 regress/sys/kern/pledge/sigkill/sigkill.c delete mode 100644 regress/sys/kern/pledge/sigkill/sigkill.out diff --git a/regress/sys/kern/pledge/Makefile b/regress/sys/kern/pledge/Makefile index d30dc386ab6..322c3e41910 100644 --- a/regress/sys/kern/pledge/Makefile +++ b/regress/sys/kern/pledge/Makefile @@ -1,6 +1,6 @@ -# $OpenBSD: Makefile,v 1.6 2017/03/28 16:16:30 bluhm Exp $ +# $OpenBSD: Makefile,v 1.7 2017/04/12 13:14:08 bluhm Exp $ -#SUBDIR += sigabrt +SUBDIR += sigabrt SUBDIR += generic SUBDIR += ioctl SUBDIR += sendrecvfd diff --git a/regress/sys/kern/pledge/sigkill/Makefile b/regress/sys/kern/pledge/sigkill/Makefile deleted file mode 100644 index 3aeca2487cf..00000000000 --- a/regress/sys/kern/pledge/sigkill/Makefile +++ /dev/null @@ -1,11 +0,0 @@ -# $OpenBSD: Makefile,v 1.1 2015/10/09 06:44:13 semarie Exp $ -PROG= sigkill -NOMAN= yes - -run-regress-${PROG}: ${PROG} - rm -f ./${PROG}.core - if ./${PROG}; then false; else true; fi - if [ -e ./${PROG}.core ]; then echo "Unexpected coredump"; false; fi - ./${PROG} | diff -I OpenBSD -u ${.CURDIR}/${PROG}.out - - -.include diff --git a/regress/sys/kern/pledge/sigkill/sigkill.c b/regress/sys/kern/pledge/sigkill/sigkill.c deleted file mode 100644 index fcabcd0b1cb..00000000000 --- a/regress/sys/kern/pledge/sigkill/sigkill.c +++ /dev/null @@ -1,50 +0,0 @@ -/* $OpenBSD: sigkill.c,v 1.1 2015/10/09 06:44:13 semarie Exp $ */ -/* - * Copyright (c) 2015 Sebastien Marie - * - * Permission to use, copy, modify, and distribute this software for any - * purpose with or without fee is hereby granted, provided that the above - * copyright notice and this permission notice appear in all copies. - * - * THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF - * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. - */ - -#include -#include -#include -#include -#include - -void -handler(int sigraised) -{ - /* the handler shouldn't not be called */ - printf("forbidden STDIO in %d handler\n", sigraised); -} - -int -main(int argc, char *argv[]) -{ - /* install some handlers */ - signal(SIGHUP, &handler); - signal(SIGABRT, &handler); - - printf("permitted STDIO\n"); - fflush(stdout); - - if (pledge("", NULL) == -1) - err(EXIT_FAILURE, "pledge"); - - /* this will triggered pledge_fail() */ - printf("forbidden STDIO 1\n"); - - /* shouldn't continue */ - printf("forbidden STDIO 2\n"); - return (EXIT_SUCCESS); -} diff --git a/regress/sys/kern/pledge/sigkill/sigkill.out b/regress/sys/kern/pledge/sigkill/sigkill.out deleted file mode 100644 index 936362eab98..00000000000 --- a/regress/sys/kern/pledge/sigkill/sigkill.out +++ /dev/null @@ -1,2 +0,0 @@ -$OpenBSD: sigkill.out,v 1.1 2015/10/09 06:44:13 semarie Exp $ -permitted STDIO -- 2.20.1