# Buildsheet autogenerated by ravenadm tool -- Do not edit. NAMEBASE= libfilezilla VERSION= 0.47.0 KEYWORDS= ftp VARIANTS= standard SDESC[standard]= C++ lib for building platform-independent programs HOMEPAGE= https://lib.filezilla-project.org CONTACT= Michael_Reim[kraileth@elderlinux.org] DOWNLOAD_GROUPS= main SITES[main]= https://download.filezilla-project.org/libfilezilla/ DISTFILE[1]= libfilezilla-0.47.0.tar.xz:main DF_INDEX= 1 SPKGS[standard]= complete primary dev nls OPTIONS_AVAILABLE= none OPTIONS_STANDARD= none BUILD_DEPENDS= gmp:static:standard gnutls:dev:standard nettle:dev:standard BUILDRUN_DEPENDS= gnutls:primary:standard nettle:primary:standard USES= gettext:build gmake iconv:wchar_t libtool pkgconfig zlib:build mbsdfix c++:primary LICENSE= GPLv2+:complete LICENSE_TERMS= complete:{{WRKDIR}}/TERMS LICENSE_FILE= GPLv2+:{{WRKSRC}}/COPYING LICENSE_AWK= TERMS:"^Documentation" LICENSE_SOURCE= TERMS:{{WRKSRC}}/README LICENSE_SCHEME= solo FPC_EQUIVALENT= ftp/libfilezilla MUST_CONFIGURE= gnu INSTALL_TARGET= install-strip SOVERSION= 43.0.0 [FILE:673:descriptions/desc.primary] libfilezilla is a small and modern C++ library, offering some basic functionality to build high-performing, platform-independent programs. Some of the highlights include: - A typesafe, multi-threaded event system that's very simple to use yet extremely efficient - Timers for periodic events - A datetime class that not only tracks timestamp but also their accuracy, which simplifies dealing with timestamps originating from different sources - Simple process handling for spawning child processes with redirected I/O libfilezilla is a cross-platform library for all major operating systems, including but not limited to Linux, *BSD, OS X and Windows. [FILE:105:distinfo] 618a586b613bef710a633c42bfdda61666cbb0fc8a92ad490361d0bc91c58341 551484 libfilezilla-0.47.0.tar.xz [FILE:65:manifests/plist.primary] lib/ libfilezilla.so.%%SOMAJOR%% libfilezilla.so.%%SOVERSION%% [FILE:1099:manifests/plist.dev] include/libfilezilla/ apply.hpp ascii_layer.hpp basic_tls_params.hpp buffer.hpp encode.hpp encryption.hpp event.hpp event_handler.hpp event_loop.hpp file.hpp format.hpp forward_like.hpp fsresult.hpp hash.hpp hostname_lookup.hpp impersonation.hpp invoker.hpp iputils.hpp json.hpp jws.hpp libfilezilla.hpp local_filesys.hpp logger.hpp mutex.hpp nonowning_buffer.hpp optional.hpp process.hpp rate_limited_layer.hpp rate_limiter.hpp recursive_remove.hpp rwmutex.hpp shared.hpp signature.hpp socket.hpp string.hpp thread.hpp thread_pool.hpp time.hpp tls_info.hpp tls_layer.hpp tls_params.hpp tls_system_trust_store.hpp translate.hpp uri.hpp util.hpp version.hpp visibility_helper.hpp xml.hpp include/libfilezilla/aio/ aio.hpp reader.hpp writer.hpp xml_writer.hpp include/libfilezilla/glue/ unix.hpp wx.hpp wxinvoker.hpp include/libfilezilla/http/ client.hpp client_request.hpp client_response.hpp digest.hpp headers.hpp include/libfilezilla/private/ defs.hpp visibility.hpp lib/ libfilezilla.a libfilezilla.so lib/pkgconfig/libfilezilla.pc [FILE:2470:manifests/plist.nls] share/locale/an/LC_MESSAGES/libfilezilla.mo share/locale/ar/LC_MESSAGES/libfilezilla.mo share/locale/az/LC_MESSAGES/libfilezilla.mo share/locale/bg_BG/LC_MESSAGES/libfilezilla.mo share/locale/ca/LC_MESSAGES/libfilezilla.mo share/locale/ca_ES@valencia/LC_MESSAGES/libfilezilla.mo share/locale/co/LC_MESSAGES/libfilezilla.mo share/locale/cs_CZ/LC_MESSAGES/libfilezilla.mo share/locale/cy/LC_MESSAGES/libfilezilla.mo share/locale/da/LC_MESSAGES/libfilezilla.mo share/locale/de/LC_MESSAGES/libfilezilla.mo share/locale/el/LC_MESSAGES/libfilezilla.mo share/locale/es/LC_MESSAGES/libfilezilla.mo share/locale/et/LC_MESSAGES/libfilezilla.mo share/locale/eu/LC_MESSAGES/libfilezilla.mo share/locale/fa_IR/LC_MESSAGES/libfilezilla.mo share/locale/fi_FI/LC_MESSAGES/libfilezilla.mo share/locale/fr/LC_MESSAGES/libfilezilla.mo share/locale/gl_ES/LC_MESSAGES/libfilezilla.mo share/locale/he_IL/LC_MESSAGES/libfilezilla.mo share/locale/hr/LC_MESSAGES/libfilezilla.mo share/locale/hu_HU/LC_MESSAGES/libfilezilla.mo share/locale/hy/LC_MESSAGES/libfilezilla.mo share/locale/id_ID/LC_MESSAGES/libfilezilla.mo share/locale/is/LC_MESSAGES/libfilezilla.mo share/locale/it/LC_MESSAGES/libfilezilla.mo share/locale/ja_JP/LC_MESSAGES/libfilezilla.mo share/locale/kab/LC_MESSAGES/libfilezilla.mo share/locale/ko_KR/LC_MESSAGES/libfilezilla.mo share/locale/ky/LC_MESSAGES/libfilezilla.mo share/locale/lo_LA/LC_MESSAGES/libfilezilla.mo share/locale/lt_LT/LC_MESSAGES/libfilezilla.mo share/locale/lv_LV/LC_MESSAGES/libfilezilla.mo share/locale/mk_MK/LC_MESSAGES/libfilezilla.mo share/locale/nb_NO/LC_MESSAGES/libfilezilla.mo share/locale/ne/LC_MESSAGES/libfilezilla.mo share/locale/nl/LC_MESSAGES/libfilezilla.mo share/locale/nn_NO/LC_MESSAGES/libfilezilla.mo share/locale/oc/LC_MESSAGES/libfilezilla.mo share/locale/pl_PL/LC_MESSAGES/libfilezilla.mo share/locale/pt_BR/LC_MESSAGES/libfilezilla.mo share/locale/pt_PT/LC_MESSAGES/libfilezilla.mo share/locale/ro_RO/LC_MESSAGES/libfilezilla.mo share/locale/ru/LC_MESSAGES/libfilezilla.mo share/locale/sk_SK/LC_MESSAGES/libfilezilla.mo share/locale/sl_SI/LC_MESSAGES/libfilezilla.mo share/locale/sr/LC_MESSAGES/libfilezilla.mo share/locale/sv/LC_MESSAGES/libfilezilla.mo share/locale/th_TH/LC_MESSAGES/libfilezilla.mo share/locale/tr/LC_MESSAGES/libfilezilla.mo share/locale/uk_UA/LC_MESSAGES/libfilezilla.mo share/locale/vi_VN/LC_MESSAGES/libfilezilla.mo share/locale/zh_CN/LC_MESSAGES/libfilezilla.mo share/locale/zh_TW/LC_MESSAGES/libfilezilla.mo [FILE:1894:patches/patch-lib_impersonation.cpp] --- lib/impersonation.cpp.orig 2023-06-28 13:00:47 UTC +++ lib/impersonation.cpp @@ -7,7 +7,11 @@ #include #include -#if FZ_UNIX +#if defined(__linux__) +#define SHADOW_SUPPORTED +#endif + +#ifdef SHADOW_SUPPORTED #include #include #endif @@ -98,7 +102,7 @@ std::optional get_group(native_st return {}; } -#if FZ_UNIX +#ifdef SHADOW_SUPPORTED struct shadow_holder { shadow_holder() = default; shadow_holder(shadow_holder const&) = delete; @@ -190,7 +194,7 @@ std::vector get_supplementary(std bool check_auth(native_string const& username, native_string const& password) { -#if FZ_UNIX +#ifdef SHADOW_SUPPORTED auto shadow = get_shadow(username); if (shadow.shadow_) { struct crypt_data data{}; @@ -236,6 +240,7 @@ bool check_auth(native_string const& use impersonation_token::impersonation_token(native_string const& username, native_string const& password) { auto pwd = get_passwd(username); +#ifdef SHADOW_SUPPORTED if (pwd.pwd_) { if (check_auth(username, password)) { impl_ = std::make_unique(); @@ -248,6 +253,22 @@ impersonation_token::impersonation_token impl_->sup_groups_ = get_supplementary(username, pwd.pwd_->pw_gid); } } +#else + char *c; + if (pwd.pwd_) { + c = crypt(password.c_str(), pwd.pwd_->pw_passwd); + if ((c != NULL) && (strcmp(c, pwd.pwd_->pw_passwd) == 0)) { + impl_ = std::make_unique(); + impl_->name_ = username; + if (pwd.pwd_->pw_dir) { + impl_->home_ = pwd.pwd_->pw_dir; + } + impl_->uid_ = pwd.pwd_->pw_uid; + impl_->gid_ = pwd.pwd_->pw_gid; + impl_->sup_groups_ = get_supplementary(username, pwd.pwd_->pw_gid); + } + } +#endif /* SHADOW_SUPPORTED */ } impersonation_token::impersonation_token(native_string const& username, impersonation_flag flag, native_string const& group) [FILE:256:files/special.mk] # Strip -ldl from all platforms except linux .if "${OPSYS}" != "Linux" _USES_configure+= 452:remove_libdl .endif remove_libdl: @echo "BSD: Remove -ldl linkage" ${REINPLACE_CMD} -e 's| -ldl||' \ ${WRKSRC}/lib/Makefile.am \ ${WRKSRC}/lib/Makefile.in