From nobody Fri Aug 04 16:08:53 2023 X-Original-To: dev-commits-src-main@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 4RHVyF5wqHz4Tpj1; Fri, 4 Aug 2023 16:08:53 +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 4RHVyF5KCNz3YVf; Fri, 4 Aug 2023 16:08:53 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165333; 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=31lW/J+xUmpOGahz+vV27xfacGmmY7QpArfsOpWqZRE=; b=Gsf2PEhAR6kk/IRCeZEL+uy9CG2f4ASBW9G/hHAXVO/pxswBHJ0cpdInqDqn0ZHATjyA7V Mfc6EaJLccxS1FHixXv/Va59IBgB5Cxrlt8ZncLn/KovLX0h99U9x5SNcY70Ts6/LIu8DW a2eeTSapCJjymk7UwPie8Orm+9lSfbxCet/QSworPBMSFLTORQZxmg7DwnDG3I1eeNzP7P 8ZwLILHAzqL9Uo+Z+QIKgS/RII499E3udSeuXiodAYhin76WOh/WP01AXyZfd1E5HOlUKH v7ek2JRpIoy4kdKMvy9OC7yboQxJFwHIJHrr0I763FZexzKRxdm+6rUUX42lsQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1691165333; 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=31lW/J+xUmpOGahz+vV27xfacGmmY7QpArfsOpWqZRE=; b=M42amH7iKFp5xMWUZP2GGGiBS+1N0vX4IwlUZJcyYcT6M78yIJGIZDAdhzP2NPxj6aAFSu Nj4zR0I5mjsvzMoUjvMHtPDFupgom8CmBiJMT01HcTsnKHJ4Zit5QO5wQwmXh2mv36VICH HH0PthTUXh1anKh5ihDtaL6JqbFb3wyKz2Nidl3Gx1iWEgRQU+NaTcVNA51G9mQC1xbEfB U8SjPruzZbNTkZldivpCldFBldSWjF1OkKhD+ufiL+kGS6HPVWj/gcOgOzjPlOCnQNeCip +NAz3qsImx0y+Cr6wgw6sST0gK3b81klopCdxeO+o25ZOGwVKNy2/l7SAjdyhQ== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1691165333; a=rsa-sha256; cv=none; b=ZtHZGZX1pooot3E6rASIFmE5Svn+/EP1IV4w2KEZyRDwGWYapxs7JbXv9upvvZ/PN7Fyib sLw2yljw7MgMHXm+dd5HFrzMUt6YXKH1MDR4OMe0JKeXg3Xzc3Zkfy5ratcQGh2ga2Mzt9 vk08nSh1/339uDgllNTE4QbN3TC3EuPoSbbrEi1stDM/gf0uEVHAUgpMDfnHPBagEeIyrz LlE5qhfDJSIkMuGWIV2cE/Kcz/R2UXchzgDumaXtcAVqw5gCQrUOMe/IY4cS99HgNjTenn JLW1QSv1HlTudRT6VLBPZ6QJBgylpIZVIgMgOitGw12ZEAIUjCLDfW8UMlCCdQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4RHVyF4LXkz17gg; Fri, 4 Aug 2023 16:08:53 +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 374G8rpT093962; Fri, 4 Aug 2023 16:08:53 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 374G8rfc093961; Fri, 4 Aug 2023 16:08:53 GMT (envelope-from git) Date: Fri, 4 Aug 2023 16:08:53 GMT Message-Id: <202308041608.374G8rfc093961@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: =?utf-8?Q?Dag-Erling=20Sm=C3=B8rgrav?= Subject: git: acc7cf8641dc - main - pam_krb5: Clarify a loop condition. List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: des X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: acc7cf8641dcedad295ff0e569c3f3a28939ada0 Auto-Submitted: auto-generated The branch main has been updated by des: URL: https://cgit.FreeBSD.org/src/commit/?id=acc7cf8641dcedad295ff0e569c3f3a28939ada0 commit acc7cf8641dcedad295ff0e569c3f3a28939ada0 Author: Dag-Erling Smørgrav AuthorDate: 2023-08-04 16:08:21 +0000 Commit: Dag-Erling Smørgrav CommitDate: 2023-08-04 16:08:37 +0000 pam_krb5: Clarify a loop condition. The closing parenthesis was in the wrong location, so instead of assigning the return value to krbret and then comparing it to zero, we were assigning the result of the comparison to krbret and then comparing that to zero. This has no practical significance since the value is not used after the loop terminates. PR: 229719 Reviewed by: cy Differential Revision: https://reviews.freebsd.org/D41299 --- lib/libpam/modules/pam_krb5/pam_krb5.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/libpam/modules/pam_krb5/pam_krb5.c b/lib/libpam/modules/pam_krb5/pam_krb5.c index 3c7976297ed2..378de46d769f 100644 --- a/lib/libpam/modules/pam_krb5/pam_krb5.c +++ b/lib/libpam/modules/pam_krb5/pam_krb5.c @@ -576,8 +576,7 @@ pam_sm_setcred(pam_handle_t *pamh, int flags, PAM_LOG("Prepared for iteration"); /* Copy the creds (should be two of them) */ - while ((krbret = krb5_cc_next_cred(pam_context, ccache_temp, - &cursor, &creds) == 0)) { + while (krb5_cc_next_cred(pam_context, ccache_temp, &cursor, &creds) == 0) { krbret = krb5_cc_store_cred(pam_context, ccache_perm, &creds); if (krbret != 0) { PAM_LOG_KRB5_ERR(pam_context, krbret,