diff options
author | Bob Beck <beck@cvs.openbsd.org> | 2019-01-17 03:26:20 +0000 |
---|---|---|
committer | Bob Beck <beck@cvs.openbsd.org> | 2019-01-17 03:26:20 +0000 |
commit | acc50ab8b898b2f268764c351ffd3abbd43fb09b (patch) | |
tree | d660ebd658b59b5ace98ec8ccf79982ff8fe7940 /regress | |
parent | 61bbdea32163ff82c9b274e52da6e7a8703824a1 (diff) |
Unveil fixes:
1) Correctly notice covering unveil when using .. - fix crash noticed by visa@
2) Notice when v_mount is NULL to not crash when unveil vnodes are on a
forcibly unmounted filesystem, noticed by yasuoka@
3) Add a flag to ni_data so that failures from unveil flag mismatches in covering
unveils return the correct EACCESS instead of ENOENT (noticed by brynet@)
ok deraadt@
Diffstat (limited to 'regress')
-rw-r--r-- | regress/sys/kern/unveil/syscalls.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/regress/sys/kern/unveil/syscalls.c b/regress/sys/kern/unveil/syscalls.c index d08fd05dd4d..81caa286406 100644 --- a/regress/sys/kern/unveil/syscalls.c +++ b/regress/sys/kern/unveil/syscalls.c @@ -1,7 +1,7 @@ -/* $OpenBSD: syscalls.c,v 1.19 2019/01/14 04:02:39 beck Exp $ */ +/* $OpenBSD: syscalls.c,v 1.20 2019/01/17 03:26:19 beck Exp $ */ /* - * Copyright (c) 2017-2018 Bob Beck <beck@openbsd.org> + * Copyright (c) 2017-2019 Bob Beck <beck@openbsd.org> * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above @@ -847,7 +847,7 @@ test_kn(int do_uv) } UV_SHOULD_SUCCEED((open("/dev/null", O_RDWR) == -1), "open"); UV_SHOULD_SUCCEED((open("/dev/zero", O_RDONLY) == -1), "open"); - UV_SHOULD_ENOENT((open("/dev/zero", O_RDWR) == -1), "open"); /* XXX */ + UV_SHOULD_EACCES((open("/dev/zero", O_RDWR) == -1), "open"); return 0; } |