From owner-svn-src-head@freebsd.org Wed Feb 24 10:54:27 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 77F26AB3393; Wed, 24 Feb 2016 10:54:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 488DC1752; Wed, 24 Feb 2016 10:54:27 +0000 (UTC) (envelope-from ed@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u1OAsQMK077957; Wed, 24 Feb 2016 10:54:26 GMT (envelope-from ed@FreeBSD.org) Received: (from ed@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u1OAsQOk077956; Wed, 24 Feb 2016 10:54:26 GMT (envelope-from ed@FreeBSD.org) Message-Id: <201602241054.u1OAsQOk077956@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: ed set sender to ed@FreeBSD.org using -f From: Ed Schouten Date: Wed, 24 Feb 2016 10:54:26 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r295965 - head/sys/compat/cloudabi X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 24 Feb 2016 10:54:27 -0000 Author: ed Date: Wed Feb 24 10:54:26 2016 New Revision: 295965 URL: https://svnweb.freebsd.org/changeset/base/295965 Log: Call cap_rights_init() properly. Even though or'ing the individual rights works in this specific case, it may not work in general. Pass them in as varargs. Modified: head/sys/compat/cloudabi/cloudabi_sock.c Modified: head/sys/compat/cloudabi/cloudabi_sock.c ============================================================================== --- head/sys/compat/cloudabi/cloudabi_sock.c Wed Feb 24 08:54:50 2016 (r295964) +++ head/sys/compat/cloudabi/cloudabi_sock.c Wed Feb 24 10:54:26 2016 (r295965) @@ -208,7 +208,7 @@ cloudabi_sys_sock_stat_get(struct thread int error; error = getsock_cap(td, uap->fd, cap_rights_init(&rights, - CAP_GETSOCKOPT | CAP_GETPEERNAME | CAP_GETSOCKNAME), &fp, NULL); + CAP_GETSOCKOPT, CAP_GETPEERNAME, CAP_GETSOCKNAME), &fp, NULL); if (error != 0) return (error); so = fp->f_data;