View | Details | Raw Unified | Return to bug 278463 | Differences between
and this patch

Collapse All | Expand All

(-)b/ftp/libfilezilla/Makefile (-3 / +4 lines)
Lines 1-5 Link Here
1
PORTNAME=	libfilezilla
1
PORTNAME=	libfilezilla
2
PORTVERSION=	0.31.1
2
PORTVERSION=	0.47.0
3
CATEGORIES=	ftp
3
CATEGORIES=	ftp
4
MASTER_SITES=	https://download.filezilla-project.org/${PORTNAME}/
4
MASTER_SITES=	https://download.filezilla-project.org/${PORTNAME}/
5
5
Lines 10-20 WWW= https://lib.filezilla-project.org/ Link Here
10
LICENSE=	GPLv2+
10
LICENSE=	GPLv2+
11
LICENSE_FILE=	${WRKSRC}/COPYING
11
LICENSE_FILE=	${WRKSRC}/COPYING
12
12
13
LIB_DEPENDS=	libgnutls.so:security/gnutls \
13
LIB_DEPENDS=	libgmp.so:math/gmp \
14
		libgnutls.so:security/gnutls \
14
		libnettle.so:security/nettle
15
		libnettle.so:security/nettle
15
16
16
USES=		compiler:c++17-lang gettext gmake iconv:wchar_t libtool \
17
USES=		compiler:c++17-lang gettext gmake iconv:wchar_t libtool \
17
		localbase pathfix pkgconfig tar:bzip2
18
		localbase pathfix pkgconfig tar:xz
18
USE_LDCONFIG=	yes
19
USE_LDCONFIG=	yes
19
GNU_CONFIGURE=	yes
20
GNU_CONFIGURE=	yes
20
INSTALL_TARGET=	install-strip
21
INSTALL_TARGET=	install-strip
(-)b/ftp/libfilezilla/distinfo (-3 / +3 lines)
Lines 1-3 Link Here
1
TIMESTAMP = 1631623924
1
TIMESTAMP = 1713540004
2
SHA256 (libfilezilla-0.31.1.tar.bz2) = 997d5887b6015f3869d375b0cbc4b4942fcb24dbe4b4346885c946cfe733166f
2
SHA256 (libfilezilla-0.47.0.tar.xz) = 618a586b613bef710a633c42bfdda61666cbb0fc8a92ad490361d0bc91c58341
3
SIZE (libfilezilla-0.31.1.tar.bz2) = 585070
3
SIZE (libfilezilla-0.47.0.tar.xz) = 551484
(-)b/ftp/libfilezilla/files/patch-lib_impersonation.cpp (-1 / +73 lines)
Added Link Here
0
- 
1
FreeBSD defines crypt_r() via <unistd.h>.
2
3
--- lib/impersonation.cpp.orig	2023-06-28 13:00:47 UTC
4
+++ lib/impersonation.cpp
5
@@ -8,8 +8,6 @@
6
 #include <tuple>
7
 
8
 #if FZ_UNIX
9
-#include <crypt.h>
10
-#include <shadow.h>
11
 #endif
12
 #include <grp.h>
13
 #include <limits.h>
14
@@ -98,43 +96,7 @@ std::optional<gid_t> get_group(native_string const& gn
15
 	return {};
16
 }
17
 
18
-#if FZ_UNIX
19
-struct shadow_holder {
20
-	shadow_holder() = default;
21
-	shadow_holder(shadow_holder const&) = delete;
22
-	shadow_holder(shadow_holder &&) = default;
23
-
24
-	shadow_holder& operator=(shadow_holder const&) = delete;
25
-	shadow_holder& operator=(shadow_holder &&) = default;
26
-
27
-	~shadow_holder() noexcept = default;
28
-
29
-	struct spwd* shadow_{};
30
-
31
-	struct spwd shadow_buffer_;
32
-	buffer buf_{};
33
-};
34
-
35
-shadow_holder get_shadow(native_string const& username)
36
-{
37
-	shadow_holder ret;
38
-
39
-	size_t s = 1024;
40
-	int res{};
41
-	do {
42
-		s *= 2;
43
-		ret.buf_.get(s);
44
-		res = getspnam_r(username.c_str(), &ret.shadow_buffer_, reinterpret_cast<char*>(ret.buf_.get(s)), s, &ret.shadow_);
45
-	} while (res == ERANGE);
46
-
47
-	if (res) {
48
-		ret.shadow_ = nullptr;
49
-	}
50
-
51
-	return ret;
52
 }
53
-#endif
54
-}
55
 
56
 class impersonation_token_impl final
57
 {
58
@@ -191,14 +153,7 @@ bool check_auth(native_string const& username, native_
59
 bool check_auth(native_string const& username, native_string const& password)
60
 {
61
 #if FZ_UNIX
62
-	auto shadow = get_shadow(username);
63
-	if (shadow.shadow_) {
64
-		struct crypt_data data{};
65
-		char* encrypted = crypt_r(password.c_str(), shadow.shadow_->sp_pwdp, &data);
66
-		if (encrypted && !strcmp(encrypted, shadow.shadow_->sp_pwdp)) {
67
-			return true;
68
-		}
69
-	}
70
+	return false; // FreeBSD does not have shadow.h support
71
 #elif FZ_MAC
72
 	bool ret{};
73
 

Return to bug 278463