From 2cb42ef8d59d0313a9c9199adec197d25d664495 Mon Sep 17 00:00:00 2001 From: semarie Date: Sun, 18 Oct 2015 12:53:32 +0000 Subject: [PATCH] regress pledge: cpath test you need to read the directory before creating something in. add rpath --- regress/sys/kern/pledge/generic/main.c | 4 ++-- regress/sys/kern/pledge/generic/tests.out | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/regress/sys/kern/pledge/generic/main.c b/regress/sys/kern/pledge/generic/main.c index d9285d8c702..89375f11b37 100644 --- a/regress/sys/kern/pledge/generic/main.c +++ b/regress/sys/kern/pledge/generic/main.c @@ -1,4 +1,4 @@ -/* $OpenBSD: main.c,v 1.2 2015/10/09 11:38:05 semarie Exp $ */ +/* $OpenBSD: main.c,v 1.3 2015/10/18 12:53:32 semarie Exp $ */ /* * Copyright (c) 2015 Sebastien Marie * @@ -295,7 +295,7 @@ main(int argc, char *argv[]) start_test(&ret, "rpath", NULL, test_rpath); start_test(&ret, "wpath", NULL, test_wpath); - start_test(&ret, "cpath", NULL, test_cpath); + start_test(&ret, "rpath cpath", NULL, test_cpath); /* * test whitelist path diff --git a/regress/sys/kern/pledge/generic/tests.out b/regress/sys/kern/pledge/generic/tests.out index f8f253287d5..c586d72c5fd 100644 --- a/regress/sys/kern/pledge/generic/tests.out +++ b/regress/sys/kern/pledge/generic/tests.out @@ -1,4 +1,4 @@ -# $OpenBSD: tests.out,v 1.3 2015/10/18 12:26:21 semarie Exp $ +# $OpenBSD: tests.out,v 1.4 2015/10/18 12:53:32 semarie Exp $ test(test_nop): pledge=("",NULL) status=0 exit=0 test(test_inet): pledge=("",NULL) status=9 signal=9 pledged_syscall=97 test(test_inet): pledge=("abort",NULL) status=134 signal=6 coredump=present pledged_syscall=97 @@ -23,7 +23,7 @@ test(test_allowed_syscalls): pledge=("abort",NULL) status=134 signal=6 coredump= test(test_allowed_syscalls): pledge=("fattr",NULL) status=9 signal=9 pledged_syscall=89 test(test_rpath): pledge=("rpath",NULL) status=0 exit=0 test(test_wpath): pledge=("wpath",NULL) status=0 exit=0 -test(test_cpath): pledge=("cpath",NULL) status=0 exit=0 +test(test_cpath): pledge=("rpath cpath",NULL) status=0 exit=0 test(test_wpaths): pledge=("stdio rpath",NULL) open_close("/etc/passwd") fd=3 errno=0 open_close("generic") fd=3 errno=0 -- 2.20.1