diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2018-04-27 12:07:37 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2018-04-27 12:07:37 +0000 |
commit | 24a204bc15f9b7914ddbd804204f6378275ddccb (patch) | |
tree | 590c3d1f8ea961d1c467631606ff680d8598de1a /regress/sys | |
parent | 75946ba00d700a6d212f646285fe34218a673478 (diff) |
test with pledgepath(NULL,NULL) instead of pledge activating things
Diffstat (limited to 'regress/sys')
-rw-r--r-- | regress/sys/kern/pledge/pledgepath/syscalls.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/regress/sys/kern/pledge/pledgepath/syscalls.c b/regress/sys/kern/pledge/pledgepath/syscalls.c index 3a8731d3f0a..8fdc69fa703 100644 --- a/regress/sys/kern/pledge/pledgepath/syscalls.c +++ b/regress/sys/kern/pledge/pledgepath/syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: syscalls.c,v 1.19 2018/04/27 10:47:58 beck Exp $ */ +/* $OpenBSD: syscalls.c,v 1.20 2018/04/27 12:07:36 beck Exp $ */ /* * Copyright (c) 2017 Bob Beck <beck@openbsd.org> @@ -216,7 +216,7 @@ test_r(int do_pp) if (pledgepath(pp_file1, "r") == -1) err(1, "%s:%d - pledgepath", __FILE__, __LINE__); } - PP_SHOULD_SUCCEED((pledge("stdio rpath cpath wpath exec", NULL) == -1), "pledge"); + PP_SHOULD_SUCCEED((pledgepath(NULL, NULL) == -1), "pledgepath"); PP_SHOULD_SUCCEED((open(pp_file1, O_RDONLY) == -1), "open"); PP_SHOULD_FAIL((open(pp_file1, O_RDWR) == -1), "open"); return 0; @@ -230,7 +230,7 @@ test_rw(int do_pp) if (pledgepath(pp_file1, "rw") == -1) err(1, "%s:%d - pledgepath", __FILE__, __LINE__); } - PP_SHOULD_SUCCEED((pledge("stdio rpath cpath wpath exec", NULL) == -1), "pledge"); + PP_SHOULD_SUCCEED((pledgepath(NULL, NULL) == -1), "pledgepath"); PP_SHOULD_SUCCEED((open(pp_file1, O_RDWR) == -1), "open"); PP_SHOULD_SUCCEED((open(pp_file1, O_RDONLY) == -1), "open"); return 0; @@ -244,7 +244,7 @@ test_x(int do_pp) if (pledgepath(pp_file1, "x") == -1) err(1, "%s:%d - pledgepath", __FILE__, __LINE__); } - PP_SHOULD_SUCCEED((pledge("stdio rpath cpath wpath exec", NULL) == -1), "pledge"); + PP_SHOULD_SUCCEED((pledgepath(NULL, NULL) == -1), "pledgepath"); PP_SHOULD_FAIL((open(pp_file1, O_RDONLY) == -1), "open"); PP_SHOULD_FAIL((open(pp_file2, O_RDWR) == -1), "open"); return 0; |