diff --git a/ftp/wzdftpd/Makefile b/ftp/wzdftpd/Makefile index 92e66fd04320..e4333430f59b 100644 --- a/ftp/wzdftpd/Makefile +++ b/ftp/wzdftpd/Makefile @@ -1,81 +1,81 @@ PORTNAME= wzdftpd PORTVERSION= 0.8.3 -PORTREVISION= 8 +PORTREVISION= 9 CATEGORIES= ftp MASTER_SITES= SF/${PORTNAME}/${PORTNAME}-sources/${PORTNAME}-${PORTVERSION:R} MAINTAINER= fuz@FreeBSD.org COMMENT= Modular FTP server configurable online using SITE commands WWW= https://sourceforge.net/projects/wzdftpd/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/COPYING USES= autoreconf:2.69 cpe gettext-tools libtool localbase pkgconfig GNU_CONFIGURE= yes CONFIGURE_ARGS= --sysconfdir=${ETCDIR} --datadir=${PREFIX}/lib \ --disable-bonjour --disable-static INSTALL_TARGET= install-strip USE_LDCONFIG= yes USE_RC_SUBR= wzdftpd OPTIONS_DEFINE= AVAHI DOCS ICONV IPV6 MYSQL PAM PERL PGSQL SQLITE TCL OPTIONS_RADIO= TLS OPTIONS_RADIO_TLS= GNUTLS OPENSSL OPTIONS_DEFAULT= AVAHI GNUTLS ICONV PAM PERL SQLITE OPTIONS_SUB= yes ICONV_CONFIGURE_ON= ${ICONV_CONFIGURE_ARG} ICONV_CONFIGURE_OFF= --disable-utf8 ICONV_USES= iconv TCL_CONFIGURE_ON= --with-tcl=${TCL_LIBDIR} TCL_CONFIGURE_OFF= --without-tcl TCL_USES= tcl OPENSSL_CONFIGURE_ENABLE= openssl OPENSSL_USES= ssl GNUTLS_CONFIGURE_ENABLE= gnutls GNUTLS_LIB_DEPENDS= libgnutls.so:security/gnutls IPV6_CONFIGURE_ENABLE= ipv6 PERL_CONFIGURE_ENABLE= perl PERL_USES= perl5 MYSQL_CONFIGURE_ENABLE= mysql MYSQL_USES= mysql PAM_CONFIGURE_WITH= pam PGSQL_CONFIGURE_ON= --with-pgsql=${LOCALBASE} PGSQL_CONFIGURE_OFF= --disable-pgsql PGSQL_USES= pgsql SQLITE_CONFIGURE_ENABLE= sqlite3 SQLITE_USES= sqlite:3 AVAHI_CONFIGURE_ON= --with-zeroconf --enable-avahi AVAHI_LIB_DEPENDS= libdbus-1.so:devel/dbus \ libavahi-core.so:net/avahi-app post-patch: @${TOUCH} ${WRKSRC}/config.rpath # wzd.m4 gets installed into the wrong spot due to our --datadir hack post-install: ${MKDIR} ${STAGEDIR}${PREFIX}/share/aclocal ${MV} ${STAGEDIR}${PREFIX}/lib/aclocal/wzd.m4 ${STAGEDIR}${PREFIX}/share/aclocal ${RMDIR} ${STAGEDIR}${PREFIX}/lib/aclocal ${INSTALL_DATA} ${WRKSRC}/*.pc ${STAGEDIR}${PREFIX}/libdata/pkgconfig post-install-DOCS-on: @${MKDIR} ${STAGEDIR}${DOCSDIR} .for i in AUTHORS ChangeLog NEWS Permissions.ReadMeFirst README \ TLS.ReadMeFirst UPGRADING wzd_tls.cnf ${INSTALL_DATA} ${WRKSRC}/${i} ${STAGEDIR}${DOCSDIR} .endfor .include diff --git a/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c b/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c new file mode 100644 index 000000000000..361ceb1e3b49 --- /dev/null +++ b/ftp/wzdftpd/files/patch-backends_pam_libpam__main.c @@ -0,0 +1,10 @@ +--- backends/pam/libpam_main.c.orig 2023-06-26 15:12:29 UTC ++++ backends/pam/libpam_main.c +@@ -47,6 +47,7 @@ + #include + #include + #include ++#include + #include + + #include diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c new file mode 100644 index 000000000000..879c3ed9799b --- /dev/null +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__data.c @@ -0,0 +1,20 @@ +--- libwzd-core/wzd_data.c.orig 2023-06-26 15:01:55 UTC ++++ libwzd-core/wzd_data.c +@@ -529,7 +529,7 @@ int data_start_thread_retr(wzd_context_t * context) + int ret; + + thread = malloc(sizeof(wzd_thread_t)); +- ret = wzd_thread_create(thread, NULL, do_local_retr, context); ++ ret = wzd_thread_create(thread, NULL, (void *(*)(void *))do_local_retr, context); + + context->transfer_thread = thread; + +@@ -544,7 +544,7 @@ int data_start_thread_stor(wzd_context_t * context) + int ret; + + thread = malloc(sizeof(wzd_thread_t)); +- ret = wzd_thread_create(thread, NULL, do_local_stor, context); ++ ret = wzd_thread_create(thread, NULL, (void *(*)(void *))do_local_stor, context); + + context->transfer_thread = thread; + diff --git a/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c index ef82b2db639b..83ef3b62b204 100644 --- a/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c +++ b/ftp/wzdftpd/files/patch-libwzd-core_wzd__tls.c @@ -1,77 +1,83 @@ --- libwzd-core/wzd_tls.c.orig 2007-10-25 17:25:33 UTC +++ libwzd-core/wzd_tls.c @@ -297,7 +297,7 @@ int tls_init(void) return 1; } - SSL_CTX_set_client_CA_list(tls_ctx, (STACK *)ca_list); + SSL_CTX_set_client_CA_list(tls_ctx, ca_list); } SSL_CTX_set_session_cache_mode(tls_ctx, SSL_SESS_CACHE_CLIENT); -@@ -779,7 +779,6 @@ void * ssl_get_obj(wzd_context_t * context) +@@ -777,12 +777,11 @@ void * ssl_get_obj(wzd_context_t * context) + + #include #include ++#include #include -#include #include #include - GCRY_THREAD_OPTION_PTHREAD_IMPL; +-GCRY_THREAD_OPTION_PTHREAD_IMPL; + + #include + @@ -892,7 +891,6 @@ int tls_init(void) /* The order matters. */ - gcry_control (GCRYCTL_SET_THREAD_CBS, &gcry_threads_pthread); gnutls_global_init(); /** \todo TODO XXX move this code to global init ? */ @@ -946,19 +944,13 @@ int tls_exit(void) static gnutls_session initialize_tls_session(gnutls_connection_end con_end) { - /* Allow connections to servers that have OpenPGP keys as well. - */ - const int cert_type_priority[3] = { GNUTLS_CRT_X509, GNUTLS_CRT_OPENPGP, 0 }; - gnutls_session session; gnutls_init(&session, con_end); - /* avoid calling all the priority functions, since the defaults - * are adequate. + /* Allow connections to servers that have OpenPGP keys as well. */ - gnutls_set_default_priority(session); - gnutls_certificate_type_set_priority(session, cert_type_priority); + gnutls_priority_set_direct(session, "NORMAL:+CTYPE-OPENPGP", NULL); gnutls_credentials_set(session, GNUTLS_CRD_CERTIFICATE, x509_cred); @@ -1001,27 +993,6 @@ int tls_auth (const char *type, wzd_context_t * contex } /** \todo XXX parse TLS cipher names */ - { - /** Note that the priority is set on the client. The server does not use - * the algorithm's priority except for disabling algorithms that were not - * specified. - */ - const int cipherPriority[] = - { - GNUTLS_CIPHER_ARCFOUR_128, - GNUTLS_CIPHER_3DES_CBC, - GNUTLS_CIPHER_AES_128_CBC, - GNUTLS_CIPHER_AES_256_CBC, - GNUTLS_CIPHER_ARCFOUR_40, -#if ( (LIBGNUTLS_VERSION_MAJOR > 1) || (LIBGNUTLS_VERSION_MINOR >= 3) ) - GNUTLS_CIPHER_RC2_40_CBC, - GNUTLS_CIPHER_DES_CBC, -#endif - 0 - }; - - gnutls_cipher_set_priority(session, cipherPriority); - } /* ensure socket is non-blocking */ #if defined(_MSC_VER) || (defined(__CYGWIN__) && defined(WINSOCK_SUPPORT)) diff --git a/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am b/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am new file mode 100644 index 000000000000..33ce38c3c874 --- /dev/null +++ b/ftp/wzdftpd/files/patch-wzdftpd_Makefile.am @@ -0,0 +1,13 @@ +--- wzdftpd/Makefile.am.orig 2023-06-26 15:25:11 UTC ++++ wzdftpd/Makefile.am +@@ -22,10 +22,8 @@ dist_sysconf_DATA = wzd.cfg.sample wzd.pem \ + users.sample + + install-data-hook: +- ${INSTALL_PROGRAM} -m 775 -d $(localstatedir)/log/wzdftpd || true + + uninstall-hook: +- rmdir --ignore-fail-on-non-empty $(localstatedir)/log/wzdftpd || true + + EXTRA_DIST = KNOWN_BUGS TODO wzd.cfg.sample.in +