From nobody Sun Apr 21 07:23:02 2024 X-Original-To: dev-commits-ports-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 4VMfx23m5wz5HgCp; Sun, 21 Apr 2024 07:23:02 +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 4VMfx236fMz4Yyd; Sun, 21 Apr 2024 07:23:02 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1713684182; 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=2n8snUpXl9DQOnbTGemAXlmdjv3u+ccqk5z0uAT0qqg=; b=Gv9wEYgVzzjVsZ4SnKaHtkequkCnYnJzih+3Pro60/CMxHCKdgLpQ4pXyC4eRSO2ZHjz4P BBDW75FHaDFbW51okC+axVRD18XlYzUZNy2UNOwvgrCyrDdAi9yOyHH2mo1uQZ8op74Dp9 JQsuubpxdwNAOl4Nj3DUYv5qolHn+pXxdqLXuGB9Q4JLdYMwQbCDN9oOBSf6Q4MPg7lWsL 2BjDF18lUGxktgLiPOHKlArOk2VMI0gHx8/nmc6aFB56cxnCo6AcbHDrZHLvH6tkBR7Had zh0qNk9Z+FQYdb60LlTFt7FVPrz7iDFDSTjZo4mANR/FSNmLb91Ci7x0do6dCw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1713684182; a=rsa-sha256; cv=none; b=K9DcKjVbm+A+IXQiI/aTuXCy8HH0fwCD8oEO9O4QXqODtUz2EskSpFuBwkO6jIanIEQfSg ICx0i3HZ9r4LHYlRoYCmRC8ZlgSCbF58WCTFV2HsSrf4prT8uZTZwjhq30LeKmekApYIVu GqTj+oGEIDlSD1kd4ZC4bRo3Q0zRLvP8Z1RwsJcnlt8PpU+Me1f/ZUBawoUbAY5IDO0NfJ fWg7fh9vT/WbGA98TQqqa3Ilk4HHs/QCeT/nb/DBZregBhaI/atUTcQWgmDX6VTlyQwNHS ycy+qRgzEQPzRuBnB+pyMzBGFiJW1YhSt6SjSjgUsPnLXPGssKDlejPwBYjJzg== 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=1713684182; 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=2n8snUpXl9DQOnbTGemAXlmdjv3u+ccqk5z0uAT0qqg=; b=vXxzxGmYpYVrYzgWVQa3rF70vtkICMdnPuWjEQgsLH7ZVDyEHIR9LDPPaYDEf8HhbrSDj1 T0zwheuFUx4Ia7KGUhUlkKQ/H2xjVcxaL9VGcTviFhN3DFdw9TX74JmbzX+L+B9/npeSGB ludTaA1INZuj8TTZ6Dj8R+kRjSMyWZnZHMEdTTLPOl1GknoNU13/XNO+f5SsocZGCSIoWH t3dxSjmgv4r+eU3r0FPiNEH81yFXvn2aHKj7xghKac/rH07ufwz0cGoLTiNyFp+VBLU8+p K+Q8OJ+UdF0yPHn5atioLgTPOWHgTO97PiEb2aC3m8cBupyXMhWORvz7zgmBfQ== 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 4VMfx22kBzz1BM0; Sun, 21 Apr 2024 07:23:02 +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 43L7N2bi037637; Sun, 21 Apr 2024 07:23:02 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 43L7N2Am037634; Sun, 21 Apr 2024 07:23:02 GMT (envelope-from git) Date: Sun, 21 Apr 2024 07:23:02 GMT Message-Id: <202404210723.43L7N2Am037634@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Kurt Jaeger Subject: git: 754e77708d67 - 2024Q2 - ftp/libfilezilla: fix build by adding missing patch List-Id: Commits to the quarterly branches of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-branches List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-branches@freebsd.org Sender: owner-dev-commits-ports-branches@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pi X-Git-Repository: ports X-Git-Refname: refs/heads/2024Q2 X-Git-Reftype: branch X-Git-Commit: 754e77708d675b79550a4c591314df5a60303a21 Auto-Submitted: auto-generated The branch 2024Q2 has been updated by pi: URL: https://cgit.FreeBSD.org/ports/commit/?id=754e77708d675b79550a4c591314df5a60303a21 commit 754e77708d675b79550a4c591314df5a60303a21 Author: Matthias Andree AuthorDate: 2024-04-21 07:21:14 +0000 Commit: Kurt Jaeger CommitDate: 2024-04-21 07:22:50 +0000 ftp/libfilezilla: fix build by adding missing patch PR: 278463 (cherry picked from commit c392b136785e44d496fb7dc744ee616a9374197e) --- ftp/libfilezilla/files/patch-lib_impersonation.cpp | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) diff --git a/ftp/libfilezilla/files/patch-lib_impersonation.cpp b/ftp/libfilezilla/files/patch-lib_impersonation.cpp new file mode 100644 index 000000000000..423e5bf90e44 --- /dev/null +++ b/ftp/libfilezilla/files/patch-lib_impersonation.cpp @@ -0,0 +1,73 @@ +FreeBSD defines crypt_r() via . + +--- lib/impersonation.cpp.orig 2023-06-28 13:00:47 UTC ++++ lib/impersonation.cpp +@@ -8,8 +8,6 @@ + #include + + #if FZ_UNIX +-#include +-#include + #endif + #include + #include +@@ -98,43 +96,7 @@ std::optional get_group(native_string const& gn + return {}; + } + +-#if FZ_UNIX +-struct shadow_holder { +- shadow_holder() = default; +- shadow_holder(shadow_holder const&) = delete; +- shadow_holder(shadow_holder &&) = default; +- +- shadow_holder& operator=(shadow_holder const&) = delete; +- shadow_holder& operator=(shadow_holder &&) = default; +- +- ~shadow_holder() noexcept = default; +- +- struct spwd* shadow_{}; +- +- struct spwd shadow_buffer_; +- buffer buf_{}; +-}; +- +-shadow_holder get_shadow(native_string const& username) +-{ +- shadow_holder ret; +- +- size_t s = 1024; +- int res{}; +- do { +- s *= 2; +- ret.buf_.get(s); +- res = getspnam_r(username.c_str(), &ret.shadow_buffer_, reinterpret_cast(ret.buf_.get(s)), s, &ret.shadow_); +- } while (res == ERANGE); +- +- if (res) { +- ret.shadow_ = nullptr; +- } +- +- return ret; + } +-#endif +-} + + class impersonation_token_impl final + { +@@ -191,14 +153,7 @@ bool check_auth(native_string const& username, native_ + bool check_auth(native_string const& username, native_string const& password) + { + #if FZ_UNIX +- auto shadow = get_shadow(username); +- if (shadow.shadow_) { +- struct crypt_data data{}; +- char* encrypted = crypt_r(password.c_str(), shadow.shadow_->sp_pwdp, &data); +- if (encrypted && !strcmp(encrypted, shadow.shadow_->sp_pwdp)) { +- return true; +- } +- } ++ return false; // FreeBSD does not have shadow.h support + #elif FZ_MAC + bool ret{}; +