-/* $OpenBSD: kern_pledge.c,v 1.35 2015/10/16 14:00:37 deraadt Exp $ */
+/* $OpenBSD: kern_pledge.c,v 1.36 2015/10/16 14:04:11 semarie Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
return (EPERM);
}
-int
-pledge_bind_check(struct proc *p, const void *v)
-{
-
- if ((p->p_p->ps_flags & PS_PLEDGE) == 0)
- return (0);
- if ((p->p_p->ps_pledge & PLEDGE_INET))
- return (0);
- return (EPERM);
-}
-
int
pledge_ioctl_check(struct proc *p, long com, void *v)
{
-/* $OpenBSD: uipc_syscalls.c,v 1.112 2015/10/09 01:10:27 deraadt Exp $ */
+/* $OpenBSD: uipc_syscalls.c,v 1.113 2015/10/16 14:04:11 semarie Exp $ */
/* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */
/*
struct mbuf *nam;
int error;
- if (pledge_bind_check(p, SCARG(uap, name)))
- return (pledge_fail(p, EPERM, PLEDGE_UNIX));
-
if ((error = getsock(p, SCARG(uap, s), &fp)) != 0)
return (error);
error = sockargs(&nam, SCARG(uap, name), SCARG(uap, namelen),
-/* $OpenBSD: pledge.h,v 1.3 2015/10/16 13:37:44 millert Exp $ */
+/* $OpenBSD: pledge.h,v 1.4 2015/10/16 14:04:11 semarie Exp $ */
/*
* Copyright (c) 2015 Nicholas Marriott <nicm@openbsd.org>
int pledge_adjtime_check(struct proc *p, const void *v);
int pledge_recvfrom_check(struct proc *p, void *from);
int pledge_sendto_check(struct proc *p, const void *to);
-int pledge_bind_check(struct proc *p, const void *v);
int pledge_connect_check(struct proc *p);
int pledge_socket_check(struct proc *p, int domain);
int pledge_setsockopt_check(struct proc *p, int level, int optname);