From ebe0f9117bac1becf4e8e70bb231168ee80d247c Mon Sep 17 00:00:00 2001 From: deraadt Date: Mon, 11 Jul 2016 19:11:34 +0000 Subject: [PATCH] be less noisy on console in case of "recvfd" refusal ok semarie --- sys/kern/kern_pledge.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index 45ce0bc1c35..6dc9ab64979 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.176 2016/07/10 14:21:24 semarie Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.177 2016/07/11 19:11:34 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -840,10 +840,8 @@ pledge_recvfd(struct proc *p, struct file *fp) if ((p->p_p->ps_flags & PS_PLEDGE) == 0) return (0); - if ((p->p_p->ps_pledge & PLEDGE_RECVFD) == 0) { - printf("recvmsg not allowed\n"); + if ((p->p_p->ps_pledge & PLEDGE_RECVFD) == 0) return pledge_fail(p, EPERM, PLEDGE_RECVFD); - } switch (fp->f_type) { case DTYPE_SOCKET: -- 2.20.1