From f2f57c2a4496a0b82825dbcc235eef5275bc2868 Mon Sep 17 00:00:00 2001 From: deraadt Date: Wed, 28 Oct 2015 12:03:39 +0000 Subject: [PATCH] The short-lived dnssocket/dnsconnect calls are being required because we suspect everyone has upgraded through the approx week-long window since SOCK_DNS became available and the libc resolver started using them. --- sys/kern/kern_pledge.c | 6 +----- sys/kern/syscalls.master | 7 +++---- sys/kern/uipc_syscalls.c | 23 +---------------------- 3 files changed, 5 insertions(+), 31 deletions(-) diff --git a/sys/kern/kern_pledge.c b/sys/kern/kern_pledge.c index b21300158c4..122ddd2fb0d 100644 --- a/sys/kern/kern_pledge.c +++ b/sys/kern/kern_pledge.c @@ -1,4 +1,4 @@ -/* $OpenBSD: kern_pledge.c,v 1.82 2015/10/28 09:35:03 deraadt Exp $ */ +/* $OpenBSD: kern_pledge.c,v 1.83 2015/10/28 12:03:39 deraadt Exp $ */ /* * Copyright (c) 2015 Nicholas Marriott @@ -246,10 +246,6 @@ const u_int pledge_syscalls[SYS_MAXSYSCALL] = { [SYS_bind] = PLEDGE_INET | PLEDGE_UNIX | PLEDGE_DNS, [SYS_getsockname] = PLEDGE_INET | PLEDGE_UNIX | PLEDGE_DNS, - /* XXX remove this, and the code in uipc_syscalls.c */ - [SYS_dnssocket] = PLEDGE_DNS, - [SYS_dnsconnect] = PLEDGE_DNS, - [SYS_listen] = PLEDGE_INET | PLEDGE_UNIX, [SYS_accept4] = PLEDGE_INET | PLEDGE_UNIX, [SYS_accept] = PLEDGE_INET | PLEDGE_UNIX, diff --git a/sys/kern/syscalls.master b/sys/kern/syscalls.master index 5dfb3d5a563..b34435f75ad 100644 --- a/sys/kern/syscalls.master +++ b/sys/kern/syscalls.master @@ -1,4 +1,4 @@ -; $OpenBSD: syscalls.master,v 1.163 2015/10/18 00:04:43 deraadt Exp $ +; $OpenBSD: syscalls.master,v 1.164 2015/10/28 12:03:39 deraadt Exp $ ; $NetBSD: syscalls.master,v 1.32 1996/04/23 10:24:21 mycroft Exp $ ; @(#)syscalls.master 8.2 (Berkeley) 1/13/94 @@ -297,9 +297,8 @@ 156 OBSOL ogetdirentries 157 OBSOL statfs25 158 OBSOL fstatfs25 -159 STD { int sys_dnsconnect(int s, const struct sockaddr *name, \ - socklen_t namelen); } -160 STD { int sys_dnssocket(int domain, int type, int protocol); } +159 UNIMPL +160 UNIMPL 161 STD { int sys_getfh(const char *fname, fhandle_t *fhp); } 162 OBSOL ogetdomainname 163 OBSOL osetdomainname diff --git a/sys/kern/uipc_syscalls.c b/sys/kern/uipc_syscalls.c index efdbd450262..76dbe1cc568 100644 --- a/sys/kern/uipc_syscalls.c +++ b/sys/kern/uipc_syscalls.c @@ -1,4 +1,4 @@ -/* $OpenBSD: uipc_syscalls.c,v 1.120 2015/10/26 12:17:03 tedu Exp $ */ +/* $OpenBSD: uipc_syscalls.c,v 1.121 2015/10/28 12:03:39 deraadt Exp $ */ /* $NetBSD: uipc_syscalls.c,v 1.19 1996/02/09 19:00:48 christos Exp $ */ /* @@ -67,20 +67,6 @@ extern struct fileops socketops; int copyaddrout(struct proc *, struct mbuf *, struct sockaddr *, socklen_t, socklen_t *); -/* XXX dnssocket() - temporary backwards compat */ -int -sys_dnssocket(struct proc *p, void *v, register_t *retval) -{ - struct sys_socket_args /* { - syscallarg(int) domain; - syscallarg(int) type; - syscallarg(int) protocol; - } */ *uap = v; - - SCARG(uap, type) |= SOCK_DNS; - return sys_socket(p, v, retval); -} - int sys_socket(struct proc *p, void *v, register_t *retval) { @@ -359,13 +345,6 @@ bad: return (error); } -/* XXX dnsconnect() - temporary backwards compat */ -int -sys_dnsconnect(struct proc *p, void *v, register_t *retval) -{ - return sys_connect(p, v, retval); -} - /* ARGSUSED */ int sys_connect(struct proc *p, void *v, register_t *retval) -- 2.20.1