From nobody Sun Aug 04 10:24:09 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 4WcFzZ2F5Rz5SY8c; Sun, 04 Aug 2024 10:24:10 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WcFzZ16NDz4DmW; Sun, 4 Aug 2024 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767050; 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=H63CVMUsJbK5uQXxaNvsVOCZFZ13tR0GRx4C/41TXfg=; b=kx2C/DkSAyAvwTeoj7um0pnCBC7v7Mf+6Scz7MLV5TKM4FY5DHA8vatBBVCcsZVM0OKjvs JD7xNATDCVtmakjK1DmdKjl/jf6J1doyr5Lcz/Le/pt9FCASydFYTdMlcjDTVBw5Pmflk0 fTlFKjHXn/C+N0HARHl/+kIP/na6L6q820ZHzru4AKgmfL6QqBrGtM+A5kn4+yee/fXLoY pVow9hP0P1Tot9smGfuvbfQVKLKG1GI5nShOjaS0yKRxN6eRK492UFp6qudclyMDYDmWHW ORYmDRe4EtIYHNgfAr0EPEgFWmk6Bd/Dant7nLEFd9cO6+2DqhZiIaQcLUZZCA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722767050; a=rsa-sha256; cv=none; b=qKJiiFFcWgBFByZzi14V8BPXRTuyfeyVtQlarnJpIvFSPAkvjxRQ2cm+ko+HDc37YDWXDB yq1+UGDURBgDS34MvFK3afjdYuLztLOewABQ7/ITZaxjyZU5Z2GD7NJoi7cDhnH8jQUeeY MDm9D92AizxevWlMOzJPTF72XQv2nmwNMxM3PC1u/d6+nFH74NEyT1iGv/Iop8IqClrONC q0TjrUlcMCwOVm2wRYEcH/Low8PgbB2PdjxHKYAxJqFLevHUBKrIRDxDLmjyiZjdFrnuN4 KJIG3dVsdvcQ87/skOeyWgq46aH8TPeYnElr+rqqQx8ltonnXAsalcK10/jINw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722767050; 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=H63CVMUsJbK5uQXxaNvsVOCZFZ13tR0GRx4C/41TXfg=; b=nTE/LwPxT86C1nh0HKf3wMHUgxaQRHkItoOXFNDaY5bzMtpTdIk4knYrZBkYJrYAsrHSq0 +f4EWKPu2Mk7EqE6Fgz1DDXZK0RJw/bdpfEdcKKHFk4vDwNU2mp+FQra1+qOl1b7Wu9OWC U4p3bcMh6ebmSLgZqg6wirOWnxZVZUHo8dg8lXhCqa/3AAkESpJ1XQxRNcP5Qd6/3E2kJE vAEfwO16+CRhIumxHif/0WlMJ8dQQ0VL61XmSJ20ZK0GPK7UgaLEJXbZc8Bzr2sgcRaBuA kMYf6a51ith3yx28e2cJ4pSbwo42b48uSag6+AxBGoK7QcgMNxVc+0F2s+trxQ== 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 4WcFzZ0kbTzrhk; Sun, 4 Aug 2024 10:24:10 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 474AOADS046175; Sun, 4 Aug 2024 10:24:10 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 474AO9PE046172; Sun, 4 Aug 2024 10:24:09 GMT (envelope-from git) Date: Sun, 4 Aug 2024 10:24:09 GMT Message-Id: <202408041024.474AO9PE046172@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 2b740ae7dad0 - stable/13 - Fix enum warning in keyserv 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: X-BeenThere: dev-commits-src-branches@freebsd.org Sender: owner-dev-commits-src-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 2b740ae7dad00a1118542f5cc617e22f1e65b645 Auto-Submitted: auto-generated The branch stable/13 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=2b740ae7dad00a1118542f5cc617e22f1e65b645 commit 2b740ae7dad00a1118542f5cc617e22f1e65b645 Author: Dimitry Andric AuthorDate: 2024-07-30 22:35:03 +0000 Commit: Dimitry Andric CommitDate: 2024-08-04 10:22:45 +0000 Fix enum warning in keyserv This fixes a clang 19 warning: usr.sbin/keyserv/crypt_server.c:237:53: error: comparison of different enumeration types ('des_mode' (aka 'enum des_mode') and 'enum desmode') [-Werror,-Wenum-compare] 237 | if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { | ~~~~~~~~~~~~~~ ^ ~~~ The type of `argp->des_mode` (aka `desargs::des_mode`) is `enum des_mode` from `/usr/include/rpcsvc/crypt.h`, not `enum desmode` from `/usr/include/rpc/des.h` (which is used in `struct desparams`). Luckily the integer values of `enum desmode`'s `CBC` and `ECB` are identical to those of `enum des_mode`'s `CBC_DES` and `ECB_DES`, so replace both values. MFC after: 3 days (cherry picked from commit 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08) --- usr.sbin/keyserv/crypt_server.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/usr.sbin/keyserv/crypt_server.c b/usr.sbin/keyserv/crypt_server.c index 34ca454d42a6..ac14c90642ba 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -241,9 +241,9 @@ des_crypt_1_svc(desargs *argp, struct svc_req *rqstp) * getting ECB mode. */ #ifdef BROKEN_DES - if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == CBC_DES) { #else - if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB) { + if (_my_crypt != &_arcfour_crypt && argp->des_mode == ECB_DES) { #endif int i; char *dptr;