Make the default failure for unveil while disabled return success
authorbeck <beck@openbsd.org>
Fri, 13 Jul 2018 09:36:00 +0000 (09:36 +0000)
committerbeck <beck@openbsd.org>
Fri, 13 Jul 2018 09:36:00 +0000 (09:36 +0000)
so that people don't get screwed when playing with it on their
machines

sys/kern/vfs_syscalls.c

index 4a66952..bb3a3e5 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: vfs_syscalls.c,v 1.293 2018/07/13 09:25:23 beck Exp $ */
+/*     $OpenBSD: vfs_syscalls.c,v 1.294 2018/07/13 09:36:00 beck Exp $ */
 /*     $NetBSD: vfs_syscalls.c,v 1.71 1996/04/23 10:29:02 mycroft Exp $        */
 
 /*
@@ -913,8 +913,8 @@ sys_unveil(struct proc *p, void *v, register_t *retval)
        if (pathlen < 2)
                return EINVAL;
 
-       /* XXX unveil is disabled for now */
-       return EPERM;
+       /* XXX unveil is disabled but returns sucess for now */
+       return 0;
 
        if (pathlen == 2 && pathname[0] == '/')
                NDINIT(&nd, LOOKUP, FOLLOW | LOCKLEAF | SAVENAME,