From nobody Wed Jul 31 19:32:35 2024 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 4WZ2LC2dBwz5RCmq; Wed, 31 Jul 2024 19:32:35 +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 4WZ2LC1VQtz4YcL; Wed, 31 Jul 2024 19:32:35 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1722454355; 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=x5i8KBncIEmE/l90EXR+BxvKKHwR959hLVdDbCw8vMk=; b=DZ78Luz4XPghRkBNORm70TE6FRL5m7/ed23V24BPGgZb9MaANNFcGLVyhqYqrGXqJCG2KQ vLKewVadE6ooBJb8UtGGR8/Jc3euypgP95yyj+zFUJA+2FUG3J1YDryFk/h26AXvnFdJPv dZYtR2akfdg2fWm6RcW6XGRmFanosmMMnyIis5J0RNG7E3qLOkt4qymc3QVHH3/z4g0ZvD aeXvVrA/1+TCTo7yAOQGC5xEa4TIza+7DsOYBIUh9drkOdY2YxT+EUV6JL6c9hM9p7aRVQ M+FXwPFrJNOz5NCSSWSBa+jTWv2EvVwmarFSS95HNE5a20gaRZn+AM6iLRWldw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1722454355; a=rsa-sha256; cv=none; b=jOs/xcAaPZDZ1Kc7qaNuwyKc5w4mYUdSCEgrexxiU3QsgnCOXBw7itEfzMfUC17dLFZZZo fu2Au0QLZGSwTErxgt+6xr20Qn+1zqDffyNsODXG3hSnHgoIuAoAh7q0Z5ZS8ldejrz2F+ l5q5bXd5Vdpx8l/svCO9n2GhGh5q6wg3YNp0h1k0/Nrvi68174424w1l2oVeszBAfOjjC5 kxnJI+CaWB8VcQ+gGaQ0R7kudmxP00V4FVcXX2qCS08joXuaZhCqbPNOPzIRt06ntISaQH RPLKphujeF96a+8eZxmmG6mdwazKMO+Yu1prejeHBFvyFetEbxOnGP4ZMwPs/g== 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=1722454355; 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=x5i8KBncIEmE/l90EXR+BxvKKHwR959hLVdDbCw8vMk=; b=MF8dXQoN9WdN+q1OXNPNXXcloUjff6qySy7iQL8h/dftvWlpq+XmkmlwMWX8sn1jxDVIcS 2RfQpyGgOSaBWHp8FxiXYA96/1NsUH7WmrHSLQIZ2aCB8ukTSrdQbwPPwiZHdlQUXGgl1J XU/Nd8Bz1KUJZvlK7En+IWy9ExdFAUr0mkWxXrWtHqq8CCeSEc/Ru81TymeEzyZg6+sALm UDC3si/+t0OWTttfI/2oi+YgwJlizP3gky4P9SDpiK/cQjFULDbyiMxyxBfobA+kRRH+PR H+Enu7mYlM8vm733z/u9lEZ5kA3Zgqw6wjSX6ZiuV48GDSRhHguWFGOPjoviaw== 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 4WZ2LC16MpzDss; Wed, 31 Jul 2024 19:32:35 +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 46VJWZ5X094473; Wed, 31 Jul 2024 19:32:35 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 46VJWZxj094470; Wed, 31 Jul 2024 19:32:35 GMT (envelope-from git) Date: Wed, 31 Jul 2024 19:32:35 GMT Message-Id: <202407311932.46VJWZxj094470@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Dimitry Andric Subject: git: 1d5a5500ad4b - main - Fix enum warning in keyserv 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: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@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/main X-Git-Reftype: branch X-Git-Commit: 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 Auto-Submitted: auto-generated The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 commit 1d5a5500ad4b1f5187f40baaf58ab6868b18fc08 Author: Dimitry Andric AuthorDate: 2024-07-30 22:35:03 +0000 Commit: Dimitry Andric CommitDate: 2024-07-31 19:28:42 +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 --- 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 99ce8b8bf1af..28e60b31c5c1 100644 --- a/usr.sbin/keyserv/crypt_server.c +++ b/usr.sbin/keyserv/crypt_server.c @@ -234,9 +234,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;