When unveil(2) was introduced one break from SYS_access case was removed
authormestre <mestre@openbsd.org>
Thu, 13 Sep 2018 07:49:33 +0000 (07:49 +0000)
committermestre <mestre@openbsd.org>
Thu, 13 Sep 2018 07:49:33 +0000 (07:49 +0000)
here, this adds it back. Noticed by Coverity 1471854.

feedback from semarie@ OK deraadt@

sys/kern/kern_pledge.c

index be0e313..00ed0b3 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: kern_pledge.c,v 1.242 2018/08/20 10:00:04 kettenis Exp $      */
+/*     $OpenBSD: kern_pledge.c,v 1.243 2018/09/13 07:49:33 mestre Exp $        */
 
 /*
  * Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
@@ -623,6 +623,7 @@ pledge_namei(struct proc *p, struct nameidata *ni, char *origpath)
                        } else
                                return (pledge_fail(p, error, PLEDGE_GETPW));
                }
+               break;
        case SYS_open:
                /* daemon(3) or other such functions */
                if ((ni->ni_pledge & ~(PLEDGE_RPATH | PLEDGE_WPATH)) == 0 &&