From nobody Thu Dec 23 22:35:59 2021 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 CE005190A139; Thu, 23 Dec 2021 22:35:59 +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 4JKlQl41WDz4tl2; Thu, 23 Dec 2021 22:35:59 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 5F2FD18F8F; Thu, 23 Dec 2021 22:35:59 +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 1BNMZxiU018164; Thu, 23 Dec 2021 22:35:59 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1BNMZxeK018163; Thu, 23 Dec 2021 22:35:59 GMT (envelope-from git) Date: Thu, 23 Dec 2021 22:35:59 GMT Message-Id: <202112232235.1BNMZxeK018163@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Rick Macklem Subject: git: 744c2dc7dde4 - main - rpc: Delete AUTH_NEEDS_TLS(_MUTUAL_HOST) auth_stat values 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: rmacklem X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 744c2dc7dde4ee1e1efc9630439682ea0dc338db Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1640298959; 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=xxI0HkaCq4fek1YfKvfiD72vQ380hs0E20ojH3Mh/mU=; b=oNTFaobrVnREPneeW+ko1is5hYIbEOBSqsF/NpsrbmM7VQoYSm5ep8BJ/uqtPAF90j0Gz2 1GGpQKw8ZMyXcANInGFUL+GxStPXXN7b1dHpNLuxXf7j9A5OCOs01KeN/8dTsXeY0qPVRz GCLKzKqeYyndxKxWyb+bNBcYfV8oSm3W7SUmUCvbCOSCdzGCwkaVcAGVw4kKdZpw6iMpCj MrWO/pau8plRQRbUU2/mSWDYMJsQBwcmBrWrJU83xrEjQXMwhy47ceXpgSM8KG7IVIOl0b Xmq8hOTcjd7Y7xAjOy2uZ3Yzw554p+hw2jJE/6uuIYH0lUD1VUFwYdZRM1bKfA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1640298959; a=rsa-sha256; cv=none; b=BVpNzpSBKRUQldoCjm8GDGiqLbahRDwaxekkKNiMe39ZUAFmW3hR1ZWDc6B2l0ptGeakz1 LamY5Z11NN739dygYQeuFkG2CCL9KnSUDGuujeFUT56jQwoxOg0FutUVvb1qWqF8ZCZ8Qj yPXvvAqNplndwQs2OpucY31rWZS3SHL0eC/hezXImYlLBU5Z/IsydNXL3y8lWC5qVjjACt Dh5Oyix4cu6JD1IgyUcq5eNfKkjOvMknw831DkAdMyiOw+vN3+kKlRL4W8kiIXoFLC485I hAH8F0bspiJF2PPdUbhWwgoqt0eNK5Mx2znBsrKwUatNPoOnEWbWVRds69DgIg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by rmacklem: URL: https://cgit.FreeBSD.org/src/commit/?id=744c2dc7dde4ee1e1efc9630439682ea0dc338db commit 744c2dc7dde4ee1e1efc9630439682ea0dc338db Author: Rick Macklem AuthorDate: 2021-12-23 22:31:53 +0000 Commit: Rick Macklem CommitDate: 2021-12-23 22:31:53 +0000 rpc: Delete AUTH_NEEDS_TLS(_MUTUAL_HOST) auth_stat values I thought that these new auth_stat values had been agreed upon by the IETF NFSv4 working group, but that no longer is the case. As such, delete them and use AUTH_TOOWEAK instead. Leave the code that uses these new auth_stat values in the sources #ifdef notnow, in case they are defined in the future. MFC after: 1 week --- sys/fs/nfsserver/nfs_nfsdport.c | 5 +++++ sys/fs/nfsserver/nfs_nfsdsubs.c | 4 ++++ sys/rpc/auth.h | 6 ------ 3 files changed, 9 insertions(+), 6 deletions(-) diff --git a/sys/fs/nfsserver/nfs_nfsdport.c b/sys/fs/nfsserver/nfs_nfsdport.c index 5c3280b55d7a..943523d2da14 100644 --- a/sys/fs/nfsserver/nfs_nfsdport.c +++ b/sys/fs/nfsserver/nfs_nfsdport.c @@ -4053,10 +4053,15 @@ nfsvno_testexp(struct nfsrv_descript *nd, struct nfsexstuff *exp) (nd->nd_flag & ND_TLSCERTUSER) == 0))) { if ((nd->nd_flag & ND_NFSV4) != 0) return (NFSERR_WRONGSEC); +#ifdef notnow + /* There is currently no auth_stat for this. */ else if ((nd->nd_flag & ND_TLS) == 0) return (NFSERR_AUTHERR | AUTH_NEEDS_TLS); else return (NFSERR_AUTHERR | AUTH_NEEDS_TLS_MUTUAL_HOST); +#endif + else + return (NFSERR_AUTHERR | AUTH_TOOWEAK); } /* diff --git a/sys/fs/nfsserver/nfs_nfsdsubs.c b/sys/fs/nfsserver/nfs_nfsdsubs.c index 8dc193a314e5..ca691941ed0d 100644 --- a/sys/fs/nfsserver/nfs_nfsdsubs.c +++ b/sys/fs/nfsserver/nfs_nfsdsubs.c @@ -2145,9 +2145,13 @@ checktls: if ((nd->nd_flag & (ND_TLS | ND_EXTLSCERTUSER | ND_EXTLSCERT)) == ND_TLS) return (0); +#ifdef notnow + /* There is currently no auth_stat for this. */ if ((nd->nd_flag & ND_TLS) == 0) return (NFSERR_AUTHERR | AUTH_NEEDS_TLS); return (NFSERR_AUTHERR | AUTH_NEEDS_TLS_MUTUAL_HOST); +#endif + return (NFSERR_AUTHERR | AUTH_TOOWEAK); } /* diff --git a/sys/rpc/auth.h b/sys/rpc/auth.h index 5444f6180c5e..0752e72de95e 100644 --- a/sys/rpc/auth.h +++ b/sys/rpc/auth.h @@ -138,7 +138,6 @@ enum auth_stat { /* * kerberos errors */ - , AUTH_KERB_GENERIC = 8, /* kerberos generic error */ AUTH_TIMEEXPIRE = 9, /* time of credential expired */ AUTH_TKT_FILE = 10, /* something wrong with ticket file */ @@ -150,11 +149,6 @@ enum auth_stat { */ RPCSEC_GSS_CREDPROBLEM = 13, RPCSEC_GSS_CTXPROBLEM = 14, - /* - * RPC-over-TLS errors - */ - AUTH_NEEDS_TLS = 15, - AUTH_NEEDS_TLS_MUTUAL_HOST = 16, /* Also used by RPCSEC_TLS for the same purpose */ RPCSEC_GSS_NODISPATCH = 0x8000000 };