From nobody Mon Apr 18 19:53:44 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 73C5011E513A; Mon, 18 Apr 2022 19:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KhyL02pFjz4jrg; Mon, 18 Apr 2022 19:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650311624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/l9nMC09z6mmQO3mrHpHWGxM57JnNBv7gLEggNMnDIQ=; b=x5N8hWy8IiFkiKTuTyGiKTqElQ1uCcGnnHNeDNUaBchh+vTOWr9gRujbGgABKKTOzLocyY Cx8sRzZ6mskE0C6+jNrGoVG68jmVrbWxnjasFjcKiNyW3xLYCvq+3UsYLVyYl6NDlGf8Vh Lfvh1leI38PW33tMbbtXrmyqWas7zHVlH6hD7MGP4Sz/t0HVuAQPj6DWauPX1bptJ/W9H1 EYYwlkZxQnecDNAJEb+MS+dmUIrRGaflitWEy+VhTdWRHgHVbhzWFx3MarHUnBvdUFCmJm OdYGYYKzFgcXyA+7VYNjgOlms3qsulwNfk/4Vd2f77XSn1qIoR2VCMdR3nUKeg== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 3FDE219588; Mon, 18 Apr 2022 19:53:44 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 23IJriig056127; Mon, 18 Apr 2022 19:53:44 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 23IJriQj056126; Mon, 18 Apr 2022 19:53:44 GMT (envelope-from git) Date: Mon, 18 Apr 2022 19:53:44 GMT Message-Id: <202204181953.23IJriQj056126@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: John Baldwin Subject: git: f0df72273377 - main - iscsid: Push #ifdef ICL_KERNEL_PROXY into cap_ioctl_limits list. List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: jhb X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f0df72273377daf5e1e97b80a4e542362b261a1d Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1650311624; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=/l9nMC09z6mmQO3mrHpHWGxM57JnNBv7gLEggNMnDIQ=; b=rTgk4MKlnrKsFrzhEr8bs3RXz5T7pOvSG3OSAz8Ckz/7FmsEipBn1hGAKS82FuQnWAQxtJ pEUc3wqQnlzlVbzgcq0pVfIIjo5zGcZuWEBnn7Ddq3L1271TIQnBSgraME1tQ4UJyHL/va k/yJQcRdBTUa8nsGIhRxtFhWzkphpWkKNBgaxfXyRpbokGZ/AbNdqoS8QfJgzLd8e+DcIj yucykc7Hk3ibhYr0+j58cvHwNOMm9P/+KVgQt4IWfdnZnaA8qvKAmSvabv+ADAA4/RrcYD u+F/yvPmkrh3ipeO+wJicDdixGj3/nSocK1P1drxk3UUv//15KImUX3YAU+Mjw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1650311624; a=rsa-sha256; cv=none; b=vpjV50Zxsda2TERhlsc4Rve43RJdPtSMsvyhZ46V8rIcpNMluUdnPZOAAzAg1QDEe433p1 5WsGoCkMSoMTD8Rg+uA6PT8jIuMA6uJaqoD72qTd8bWinjmqm2TqvvVqEAWYhJSTaVYKfW 4+0MbrjNjLpkvVUeC3ylJh8wJeniuF9zxLTukZqe52ICUv3GNcy4/Ln+GvHwBx1zdEQbYW 9y08gwnzJ19rAyfDHSt7X1joNHuYtBZdkGQ4+k4+MAv/39hpohiCLQ4iz4wKumbNP76hHG lX3tvHTDCcfIKHhKi5esEBVbKIoi3LFo86orJ4umRLV2JK663GkMxZIbYRWC8g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=f0df72273377daf5e1e97b80a4e542362b261a1d commit f0df72273377daf5e1e97b80a4e542362b261a1d Author: John Baldwin AuthorDate: 2022-04-18 19:44:36 +0000 Commit: John Baldwin CommitDate: 2022-04-18 19:53:15 +0000 iscsid: Push #ifdef ICL_KERNEL_PROXY into cap_ioctl_limits list. This reduces duplication in the two lists and makes it clearer which ioctls are needed in the ICL_KERNEL_PROXY case. Reviewed by: mav Sponsored by: Chelsio Communications Differential Revision: https://reviews.freebsd.org/D34927 --- usr.sbin/iscsid/iscsid.c | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/usr.sbin/iscsid/iscsid.c b/usr.sbin/iscsid/iscsid.c index d08a11c90eeb..5555ffccbf7c 100644 --- a/usr.sbin/iscsid/iscsid.c +++ b/usr.sbin/iscsid/iscsid.c @@ -496,13 +496,18 @@ static void capsicate(struct iscsid_connection *conn) { cap_rights_t rights; + const unsigned long cmds[] = { #ifdef ICL_KERNEL_PROXY - const unsigned long cmds[] = { ISCSIDCONNECT, ISCSIDSEND, ISCSIDRECEIVE, - ISCSIDHANDOFF, ISCSIDFAIL, ISCSISADD, ISCSISREMOVE, ISCSISMODIFY }; -#else - const unsigned long cmds[] = { ISCSIDHANDOFF, ISCSIDFAIL, ISCSISADD, - ISCSISREMOVE, ISCSISMODIFY }; + ISCSIDCONNECT, + ISCSIDSEND, + ISCSIDRECEIVE, #endif + ISCSIDHANDOFF, + ISCSIDFAIL, + ISCSISADD, + ISCSISREMOVE, + ISCSISMODIFY + }; cap_rights_init(&rights, CAP_IOCTL); if (caph_rights_limit(conn->conn_iscsi_fd, &rights) < 0)