From nobody Tue May 17 21:15:54 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 80D511AEB239; Tue, 17 May 2022 21:15:54 +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 4L2pnQ37gYz4fLF; Tue, 17 May 2022 21:15:54 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652822154; 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=9SnFB4UqY27aQzLKVXOkIMG0wvhadgdpts5nlzcUXUc=; b=oRFtKpSu9aHrCha0YoE3BAiaKgJ4Vf8+IQctsXG7R7IlCsCXB/X9X4dn24TztAPLs47Toq CIk75lxwPb+LDgmINAmwxugw9ts/lJBb5I6Q5OgHj3ULmK99mVtbcfH/BN2fMYQloCSJ/f wMDiymwUDdwS4qGf4lni5aFsHaWBqKa47ycIowPmohRiIP+QJIBKvTCPe7H06vEp/gYn8+ hZaLUxgiW4Adr//lJxbAQkn4I771yW5yiLHLtm/rHuSfK88qyX2lPLiNcraqsVJsh6Mu2R vx+3qrXlYNNqtKTFEh3C+LMihj2tCdjDulCDl6P1DQXVUc+JUeEmMvz7aSKynA== 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 4BCA91BE76; Tue, 17 May 2022 21:15:54 +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 24HLFsvp021929; Tue, 17 May 2022 21:15:54 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 24HLFs3q021928; Tue, 17 May 2022 21:15:54 GMT (envelope-from git) Date: Tue, 17 May 2022 21:15:54 GMT Message-Id: <202205172115.24HLFs3q021928@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: John Baldwin Subject: git: 263efa6c4a7b - stable/13 - 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/stable/13 X-Git-Reftype: branch X-Git-Commit: 263efa6c4a7bcd5d0faeee9413a8e10d12c07981 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1652822154; 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=9SnFB4UqY27aQzLKVXOkIMG0wvhadgdpts5nlzcUXUc=; b=JfzhEn2Z0qQmHsx3W1a/lSprnxWDRoNBFseI+dVF7ySAtxu7n+aBK7qXGGCK0J9Y2QG0NL uZZMTybmB9KCUpYBrpjLUjFkXTcX3SihK0mlMKUb/uxl3K4XUxHKVKxxxJ5RyiLVNfaTdp opRggPvar/MXNep9KbzcQPBJM80Sg17UTQcfPfpAu6l8ybTrCmsF+dAxkfkoOF3a+m7WEP nPSA4VAqSt0q4lOxuUdtYKuLn9rRxcWr/JRyEzboamqfzEHR0OKbmACp8LaElMXfCdOoRj cgGRM2d8fUtcNDLH7DLcKA4RUe9R+1qcKQWtxC3PRLqAuxNIPj/u3X03wpGW6A== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1652822154; a=rsa-sha256; cv=none; b=Rl2tyvqvezwq7pCu4QSFLeTaZNm/AQWJ5gDP7FEkOnAmLjBDY/MIaTM35OddZin8m6Z2gS A8e8ruRPeEmemrEsEnDSU2n9rT+RFtxEc+OjnLorCms20+Y5tdmAHkJRhho+XRa2l0VZOU Sc8LaEC+mHdMJPURXz8IMZroFeR6h0Lcp8T8Qjp+Do60Jg9Wo0m0fhmiBVtK3f3GPtSz1G nY3BV4QAiLTt8iebSMW96R9IcvDif4bTc/3jLd9krNChFfOvbp6I6tTvTmu4OXD67kEGzS 0E1u9fG4P4gsotnKblxSbMx9w3PXjSYdEyFzzMXXRyB5rKRePxnhlBmzxdePnQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by jhb: URL: https://cgit.FreeBSD.org/src/commit/?id=263efa6c4a7bcd5d0faeee9413a8e10d12c07981 commit 263efa6c4a7bcd5d0faeee9413a8e10d12c07981 Author: John Baldwin AuthorDate: 2022-04-18 19:44:36 +0000 Commit: John Baldwin CommitDate: 2022-05-17 21:15:13 +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 (cherry picked from commit f0df72273377daf5e1e97b80a4e542362b261a1d) --- 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 2689c4a2b455..4204ac495181 100644 --- a/usr.sbin/iscsid/iscsid.c +++ b/usr.sbin/iscsid/iscsid.c @@ -466,13 +466,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)