From nobody Thu Jan 18 21:08:47 2024 X-Original-To: dev-commits-src-branches@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 4TGFjC4Sd8z570bP; Thu, 18 Jan 2024 21:08:47 +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 4TGFjC3LFJz4hbD; Thu, 18 Jan 2024 21:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705612127; 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=fHT3cZlkBjU/0nSVobdIsI16EWu/PQ+6I3bu8ayfc0c=; b=plrfzgTfaXJEn4UDUiuclrYxf9iQRt5kOH8zEWJahC1KXbwlbNkwRrlP8PXYuN6AKPXN/N pwyuC1fSk3ewmTO7AG55OaLH3dv26vt+D9XUkIrGITHsSf0ozqi9pkkvusHY4xlU5pNyUj DKvMT0YsY9W0pfRfcSKP7Tnnuoznd6W2gupn9dJaQCD0k9STo+srHBLnP5MAYnhZwqqCxp dw/A12vjXtRg+MtRxXODgyP3+NWHVeX9KOY0FfMPATKr+pccPOddtfVtHgBt4mpZ8m92Dg eqkF4a4TvgbUzwRSzePVkff8dlPAI1rNn+rPqjGwV1whINoqyZH2GmVK05TvtQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1705612127; 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=fHT3cZlkBjU/0nSVobdIsI16EWu/PQ+6I3bu8ayfc0c=; b=UxKTWiI1qCMQIZdOToDMjwF4Zi/DjohL7b1Hwgc4YHdH6J5lSAK7qR8oxQknMxbu63CTnB TU/68hKclP/NFfmQITSZpFCbYzce6oP2xweXMyMAnlBdGzF5mbQr4s0AHT8s3c5lMbRiip Rf+UhwVirw2sEVA6As0hM1pcMuXEdL/G9mPaNJXbGJPZCtvhhZxtpkjQn8mQDcWXxVKZJG lrvHw/gZ7tQgXOte2CJ2NOENyhCE6Oa9tskuW5HHKtLsRDqtQNSi/pYoIPsghdJh/ITrOw DhWS+xyZCXZnkQIKNF9STu+/PEYRsE1vr4T8T3EWYgc8bv6XbyJxVjmrhmn3nQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1705612127; a=rsa-sha256; cv=none; b=EsjF3K+vg+FIf9rnPy2qy4d9ckuXkx68kP9Pz7Kf1/4g92GdCPgB2iaengEsD7koskCE4j sPTcHGTDlzrWKblmCSPz7k/IWcmkkTnaiR5c1Bh6iRZI4PHvX8HDM5voOPf22CWdFudGuZ dlERQ7hm+C54IIJzjDYSHTK+oTbsq0iywDd9+JagSBfLwbhjfrxXj2NXVOrNn8sibDo0P4 x4M+8nXt7E5J0oDAPs+fRRt1h4ajVuH1ZZRW+GCxTjOXiNI8RYl0BK9eVO8vwe7n64//n6 +cp7gDLLidfK+yc302yNrDY1i52uxy5ysbiolCRp46MIwWkS7ZLq3sSUX85mgQ== 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 4TGFjC26FVzNKY; Thu, 18 Jan 2024 21:08:47 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 40IL8lOW053193; Thu, 18 Jan 2024 21:08:47 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 40IL8lmB053190; Thu, 18 Jan 2024 21:08:47 GMT (envelope-from git) Date: Thu, 18 Jan 2024 21:08:47 GMT Message-Id: <202401182108.40IL8lmB053190@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Olivier Certner Subject: git: 17244789c2fd - stable/14 - cr_bsd_visible(): Style fixes List-Id: Commits to the stable branches of the FreeBSD src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-branches@freebsd.org X-BeenThere: dev-commits-src-branches@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: olce X-Git-Repository: src X-Git-Refname: refs/heads/stable/14 X-Git-Reftype: branch X-Git-Commit: 17244789c2fd5d3d758a524d98c2b6f887af7905 Auto-Submitted: auto-generated The branch stable/14 has been updated by olce: URL: https://cgit.FreeBSD.org/src/commit/?id=17244789c2fd5d3d758a524d98c2b6f887af7905 commit 17244789c2fd5d3d758a524d98c2b6f887af7905 Author: Olivier Certner AuthorDate: 2024-01-05 15:23:19 +0000 Commit: Olivier Certner CommitDate: 2024-01-18 21:07:53 +0000 cr_bsd_visible(): Style fixes Explicitly test for non-zero return codes. Separate assignment and testing of 'error' in distinct lines. Reviewed by: emaste, kib Approved by: emaste (mentor) MFC after: 1 week Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D43335 (cherry picked from commit a1e37beb45d270ae9926eff3b93e9398d08c94e5) --- sys/kern/kern_prot.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/sys/kern/kern_prot.c b/sys/kern/kern_prot.c index 00eb2fccdeef..7d28475b5db8 100644 --- a/sys/kern/kern_prot.c +++ b/sys/kern/kern_prot.c @@ -1465,11 +1465,14 @@ cr_bsd_visible(struct ucred *u1, struct ucred *u2) { int error; - if ((error = cr_canseeotheruids(u1, u2))) + error = cr_canseeotheruids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseeothergids(u1, u2))) + error = cr_canseeothergids(u1, u2); + if (error != 0) return (error); - if ((error = cr_canseejailproc(u1, u2))) + error = cr_canseejailproc(u1, u2); + if (error != 0) return (error); return (0); }