From nobody Sun Nov 28 04:24:42 2021 X-Original-To: dev-commits-ports-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 4BB7D18B98E9; Sun, 28 Nov 2021 04:24:43 +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 4J1wP705ZGz4j22; Sun, 28 Nov 2021 04:24:43 +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 D70426F1; Sun, 28 Nov 2021 04:24:42 +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 1AS4Ogap041555; Sun, 28 Nov 2021 04:24:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 1AS4OgOp041554; Sun, 28 Nov 2021 04:24:42 GMT (envelope-from git) Date: Sun, 28 Nov 2021 04:24:42 GMT Message-Id: <202111280424.1AS4OgOp041554@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Hajimu UMEMOTO Subject: git: a8442f059c6b - 2021Q4 - security/cyrus-sasl2-gssapi: remove patch-plugins_gssapi.c List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: ume X-Git-Repository: ports X-Git-Refname: refs/heads/2021Q4 X-Git-Reftype: branch X-Git-Commit: a8442f059c6bbdfaf43aa0f5f7f229393e49bc7c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1638073483; 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=jcVEqdTKAHfLCO27ZoP+3r/23+qm7kNK7rV0wGF97pw=; b=rTXv+bDWDH0TOx85NUqOUpIMQVNAofYkNuUj1Zt+f7lVTnrJR58BT80CpE06Ev5j/woaRw DDnqvH5EkHZfV3BJhjbKicslh4S0kqs2s5rDBgDAEkRjN8YEOqiZP31XK0S7WJSIfsZA77 dqcmc8e3P9S0qDczXB3c+xEM6e8//la5sPHPtfeZMlAUx1luTtB/M4aBcO1rzs6yeUcXIx luWdZmvQrIVxdSpV6wY/b2RSdmZdjyTjYr1y2Rcviw0NocSeQQvpqQlBpSAXEyKTo2wz/l mujPmtYMZTfBFAwX9F7YaCU0Ouh6KPqrNPnmM4dIqmyzqNNzXrmUPACPJtmV1g== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1638073483; a=rsa-sha256; cv=none; b=QXbZIQ+9cW66+qpVaSbtRqnSLqbrQgOfayeER28Sx+Q6fGD9Q4OLAb9EeUF6bx8Z0qVuQv amxt72plbCk8cjPKdzFPybDmGuvkDKFUeEqLyvfEChmTmyJmivNufOge6UPIztmjlaGeys ZK6chRpElGbs5bu08ycy9rrrcbmjvnsod/kRuusj9xPesIIZ4/UyVNLseZ447XquRLehT5 dZpYnjbCtoYAtOwTr6FiEkyVT6kCmmKEmUoiQ/FUeE+H2AcJcr+Hr/KrtWOiN4F36Fp/NE ewP5uKS1/lXPbEDNWYSUUsNNfCyM9ern3aFV79R5ixn5bDjmnrfpAjy1KPwK+Q== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2021Q4 has been updated by ume: URL: https://cgit.FreeBSD.org/ports/commit/?id=a8442f059c6bbdfaf43aa0f5f7f229393e49bc7c commit a8442f059c6bbdfaf43aa0f5f7f229393e49bc7c Author: Hajimu UMEMOTO AuthorDate: 2021-11-28 04:08:48 +0000 Commit: Hajimu UMEMOTO CommitDate: 2021-11-28 04:24:23 +0000 security/cyrus-sasl2-gssapi: remove patch-plugins_gssapi.c PR: 260017 Reported by: Michael Osipov Discussed with: hrs MFH: 2021Q4 (cherry picked from commit 17b54ce763286be358fae69961f5fb1a670c614c) --- security/cyrus-sasl2-gssapi/Makefile | 2 +- security/cyrus-sasl2/files/patch-plugins_gssapi.c | 117 ---------------------- 2 files changed, 1 insertion(+), 118 deletions(-) diff --git a/security/cyrus-sasl2-gssapi/Makefile b/security/cyrus-sasl2-gssapi/Makefile index af03d777244d..e8432d9db8da 100644 --- a/security/cyrus-sasl2-gssapi/Makefile +++ b/security/cyrus-sasl2-gssapi/Makefile @@ -1,5 +1,5 @@ PKGNAMESUFFIX= -gssapi -PORTREVISION= 1 +PORTREVISION= 2 COMMENT= SASL GSSAPI authentication plugin diff --git a/security/cyrus-sasl2/files/patch-plugins_gssapi.c b/security/cyrus-sasl2/files/patch-plugins_gssapi.c deleted file mode 100644 index 39d43ab36790..000000000000 --- a/security/cyrus-sasl2/files/patch-plugins_gssapi.c +++ /dev/null @@ -1,117 +0,0 @@ -# -# Fixes of "keytab" keyword on the client side. -# -# https://github.com/cyrusimap/cyrus-sasl/commit/74faca7400f414784b5e2e136668e6f4ef0d6b96 -# https://github.com/cyrusimap/cyrus-sasl/commit/7a95382c68e7187fe7407b2a94036d9ca3246e34 -# https://github.com/cyrusimap/cyrus-sasl/commit/238380260fe623212c0f21d63e763b7a849540d1 -# ---- plugins/gssapi.c.orig 2018-11-08 17:29:57 UTC -+++ plugins/gssapi.c -@@ -1668,8 +1668,10 @@ static int gssapi_client_mech_step(void *conn_context, - if (clientoutlen) - *clientoutlen = 0; - -+#if 0 - params->utils->log(params->utils->conn, SASL_LOG_DEBUG, - "GSSAPI client step %d", text->state); -+#endif - - switch (text->state) { - -@@ -1777,6 +1779,39 @@ static int gssapi_client_mech_step(void *conn_context, - req_flags = req_flags | GSS_C_DELEG_FLAG; - } - -+ /* -+ * If caller didn't provide creds already. -+ * -+ * In the case of Kerberos, a client typically wants to use -+ * a credential in either a keytab file or the credentials cache -+ * of the current process context. This code path will try to -+ * find a credential in the specified keytab file, then the -+ * credentials cache. The keytab file can be specified by -+ * "keytab" option, and it is configured by using -+ * gsskrb5_register_acceptor_identity() API when available. -+ */ -+ if (client_creds == GSS_C_NO_CREDENTIAL) { -+ GSS_LOCK_MUTEX_CTX(params->utils, text); -+ maj_stat = gss_acquire_cred(&min_stat, -+ text->server_name, -+ GSS_C_INDEFINITE, -+ GSS_C_NO_OID_SET, -+ GSS_C_INITIATE, -+ &text->client_creds, -+ NULL, -+ NULL); -+ GSS_UNLOCK_MUTEX_CTX(params->utils, text); -+ -+ /* -+ * Ignore the error intentionally. The credential was -+ * not found in the specified keytab file. -+ */ -+ if (GSS_ERROR(maj_stat) == 0) { -+ client_creds = text->client_creds; -+ } -+ } -+ -+ /* Try the credentials cache. */ - GSS_LOCK_MUTEX_CTX(params->utils, text); - maj_stat = gss_init_sec_context(&min_stat, - client_creds, /* GSS_C_NO_CREDENTIAL */ -@@ -2227,16 +2262,55 @@ static sasl_client_plug_t gssapi_client_plugins[] = - #endif - }; - --int gssapiv2_client_plug_init(const sasl_utils_t *utils __attribute__((unused)), -+int gssapiv2_client_plug_init( -+#ifndef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY -+ const sasl_utils_t *utils __attribute__((unused)), -+#else -+ const sasl_utils_t *utils, -+#endif - int maxversion, - int *out_version, - sasl_client_plug_t **pluglist, - int *plugcount) - { -+#ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY -+ const char *keytab = NULL; -+ char keytab_path[1024]; -+ unsigned int rl; -+#endif -+ - if (maxversion < SASL_CLIENT_PLUG_VERSION) { - SETERROR(utils, "Version mismatch in GSSAPI"); - return SASL_BADVERS; - } -+ -+#ifdef HAVE_GSSKRB5_REGISTER_ACCEPTOR_IDENTITY -+ /* unfortunately, we don't check for readability of keytab if it's -+ the standard one, since we don't know where it is */ -+ -+ /* FIXME: This code is broken */ -+ -+ utils->getopt(utils->getopt_context, "GSSAPI", "keytab", &keytab, &rl); -+ if (keytab != NULL) { -+ if (access(keytab, R_OK) != 0) { -+ utils->log(NULL, SASL_LOG_ERR, -+ "Could not find keytab file: %s: %m", keytab); -+ return SASL_FAIL; -+ } -+ -+ if(strlen(keytab) > sizeof(keytab_path)) { -+ utils->log(NULL, SASL_LOG_ERR, -+ "path to keytab is > %zu characters", -+ sizeof(keytab_path)); -+ return SASL_BUFOVER; -+ } -+ -+ strncpy(keytab_path, keytab, sizeof(keytab_path)); -+ keytab_path[sizeof(keytab_path) - 1] = '\0'; -+ -+ gsskrb5_register_acceptor_identity(keytab_path); -+ } -+#endif - - *out_version = SASL_CLIENT_PLUG_VERSION; - *pluglist = gssapi_client_plugins;