summaryrefslogtreecommitdiff
path: root/sys/kern
diff options
context:
space:
mode:
authorTheo de Raadt <deraadt@cvs.openbsd.org>2016-07-11 19:11:35 +0000
committerTheo de Raadt <deraadt@cvs.openbsd.org>2016-07-11 19:11:35 +0000
commitf147215f650fb37e070b4f8760f3f4b00ce969a7 (patch)
treecec4cbea4787859d28e17c0de3ffd86476fcac16 /sys/kern
parente6de3cdaa20df9e19764e0434022dca15211d8e3 (diff)
be less noisy on console in case of "recvfd" refusal
ok semarie
Diffstat (limited to 'sys/kern')
-rw-r--r--sys/kern/kern_pledge.c6
1 files 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 <nicm@openbsd.org>
@@ -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: