Hello community, here is the log from the commit of package netatalk for openSUSE:Factory checked in at 2017-07-05 23:57:39 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/netatalk (Old) and /work/SRC/openSUSE:Factory/.netatalk.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "netatalk" Wed Jul 5 23:57:39 2017 rev:46 rq:499902 version:3.1.11 Changes: -------- --- /work/SRC/openSUSE:Factory/netatalk/netatalk.changes 2017-02-13 07:48:38.310363357 +0100 +++ /work/SRC/openSUSE:Factory/.netatalk.new/netatalk.changes 2017-07-05 23:57:41.106599360 +0200 @@ -1,0 +2,12 @@ +Tue May 30 17:53:44 UTC 2017 - malcolmle...@opensuse.org + +- Update to version 3.1.11: + + NEW: Global option "zeroconf name", FR#99. + + NEW: Show Zeroconf support by "netatalk -V", FR#100. + + FIX: Log message: name of function doese not match, GH#78. + + FIX: dsi_stream_read: len:0, unexpected EOF, GH#82. + + UPD: Volume capacity reporting to match Samba behavior, GH#83. + + UPD: dhx uams: OpenSSL 1.1 support, GH#87. +- Drop Sysvinit conditionals, rpmlintrc and build for systemd only. + +------------------------------------------------------------------- Old: ---- netatalk-3.1.10.tar.bz2 netatalk-rpmlintrc New: ---- netatalk-3.1.11.tar.bz2 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ netatalk.spec ++++++ --- /var/tmp/diff_new_pack.gdjNjR/_old 2017-07-05 23:57:41.838496259 +0200 +++ /var/tmp/diff_new_pack.gdjNjR/_new 2017-07-05 23:57:41.842495696 +0200 @@ -20,7 +20,7 @@ %define with_tracker_spotlight 0 %define libmaj 18 Name: netatalk -Version: 3.1.10 +Version: 3.1.11 Release: 0 Summary: AFP Fileserver for Macintosh Clients License: GPL-2.0+ @@ -29,7 +29,6 @@ Source: http://downloads.sourceforge.net/project/netatalk/netatalk/%{version}/netatalk-%{version}.tar.bz2 Source1: netatalk-latinize.pl Source3: netatalk-upgrade_netatalk_AppleDB.sh -Source4: netatalk-rpmlintrc # see bnc#849598 and http://sourceforge.net/p/netatalk/bugs/538/ Patch0: %{name}-wrong-error-message.patch Patch2: netatalk-libc-xattr.patch @@ -48,12 +47,13 @@ BuildRequires: openssl-devel BuildRequires: pam-devel BuildRequires: pkg-config +BuildRequires: systemd BuildRequires: tcpd-devel BuildRequires: zlib-devel Requires: cyrus-sasl Requires: db-utils # FIXME: use proper Requires(pre/post/preun/...) -PreReq: %insserv_prereq %fillup_prereq +PreReq: %fillup_prereq BuildRoot: %{_tmppath}/%{name}-%{version}-build %if 0%{?with_afpstats}%{?with_tracker_spotlight} BuildRequires: dbus-1-devel @@ -62,10 +62,7 @@ BuildRequires: tracker-devel %endif %endif -%if 0%{?suse_version} > 1210 -BuildRequires: systemd %{?systemd_requires} -%endif %description Netatalk is an AFP fileserver. A system running Netatalk is capable @@ -134,17 +131,10 @@ make %{?_smp_mflags} mkdir examples cp netatalk-latinize.pl examples -sed -i '/\/var\/lock\/subsys/d' distrib/initscripts/rc.suse %install make DESTDIR=%{buildroot} install %{?_smp_mflags} -%if 0%{?suse_version} > 1140 ln -sf %{_sbindir}/service %{buildroot}%{_sbindir}/rc%{name} -%else -mkdir -p %{buildroot}%{_sysconfdir}/init.d/ -install -m 755 distrib/initscripts/rc.suse %{buildroot}%{_sysconfdir}/init.d/netatalk -ln -sf ../..%{_initddir}/netatalk %{buildroot}%{_sbindir}/rc%{name} -%endif install -m 755 %{SOURCE3} %{buildroot}%{_sbindir}/upgrade_netatalk_AppleDB.sh # # Conflicts with yudit @@ -167,32 +157,18 @@ echo "a backup can be found in %{_sysconfdir}/netatalk" echo "please compare them before restarting the netatalk server" } -%if 0%{?suse_version} > 1210 %service_add_pre netatalk.service -%endif exit 0 %preun -%stop_on_removal netatalk -%if 0%{?suse_version} > 1210 %service_del_preun netatalk.service -%endif %post -%restart_on_update netatalk -%if 0%{?suse_version} > 1210 %service_add_post netatalk.service %{fillup_only netatalk} -%else -%{fillup_and_insserv netatalk} -%endif %postun -%if 0%{?suse_version} > 1210 %service_del_postun netatalk.service -%else -%insserv_cleanup -%endif %post -n libatalk%{libmaj} -p /sbin/ldconfig @@ -217,11 +193,7 @@ %dir %{_sysconfdir}/pam.d %config %{_sysconfdir}/pam.d/* # -%if 0%{?suse_version} > 1210 %{_libexecdir}/systemd/system/netatalk.service -%else -%attr(755,root,root) %{_sysconfdir}/init.d/netatalk -%endif %{_localstatedir}/lib/%{name} %files -n libatalk%{libmaj} ++++++ netatalk-3.1.10.tar.bz2 -> netatalk-3.1.11.tar.bz2 ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/NEWS new/netatalk-3.1.11/NEWS --- old/netatalk-3.1.10/NEWS 2016-09-12 11:47:19.000000000 +0200 +++ new/netatalk-3.1.11/NEWS 2017-03-15 09:50:53.000000000 +0100 @@ -1,3 +1,14 @@ +Changes in 3.1.11 +================ +* NEW: Global option "zeroconf name", FR#99 +* NEW: show Zeroconf support by "netatalk -V", FR#100 +* UPD: gentoo: Switch openrc init script to openrc-run, GitHub#77 +* FIX: log message: name of function doese not match, GitHub#78 +* UPD: volume capacity reporting to match Samba behavior, GitHub#83 +* FIX: debian: sysv init status command exits with proper exit code, GitHub#84 +* FIX: dsi_stream_read: len:0, unexpected EOF, GitHub#82 +* UPD: dhx uams: OpenSSL 1.1 support, GitHub#87 + Changes in 3.1.10 ================ * FIX: cannot build when ldap is not defined, bug #630 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/VERSION new/netatalk-3.1.11/VERSION --- old/netatalk-3.1.10/VERSION 2016-09-12 11:50:33.000000000 +0200 +++ new/netatalk-3.1.11/VERSION 2017-03-15 09:55:42.000000000 +0100 @@ -1 +1 @@ -3.1.10 \ No newline at end of file +3.1.11 \ No newline at end of file diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/configure new/netatalk-3.1.11/configure --- old/netatalk-3.1.10/configure 2016-09-12 11:54:34.000000000 +0200 +++ new/netatalk-3.1.11/configure 2017-01-22 17:23:47.000000000 +0100 @@ -17178,6 +17178,9 @@ : else + if test x$libgcrypt_config_prefix != x"no" ; then + as_fn_error $? "Could not find libcgrypt development files needed for the DHX2 UAM, please install the libgcrypt devel package" "$LINENO" 5 + fi LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" : diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/distrib/initscripts/rc.debian.tmpl new/netatalk-3.1.11/distrib/initscripts/rc.debian.tmpl --- old/netatalk-3.1.10/distrib/initscripts/rc.debian.tmpl 2016-06-06 13:21:51.000000000 +0200 +++ new/netatalk-3.1.11/distrib/initscripts/rc.debian.tmpl 2017-03-09 10:56:46.000000000 +0100 @@ -70,6 +70,7 @@ else echo "Netatalk is not running." fi + exit $EXIT_CODE ;; *) echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/distrib/initscripts/rc.gentoo.tmpl new/netatalk-3.1.11/distrib/initscripts/rc.gentoo.tmpl --- old/netatalk-3.1.10/distrib/initscripts/rc.gentoo.tmpl 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/distrib/initscripts/rc.gentoo.tmpl 2017-01-05 15:21:09.000000000 +0100 @@ -1,4 +1,4 @@ -#!/sbin/runscript +#!/sbin/openrc-run # Copyright 1999-2012 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/doc/manpages/man5/afp.conf.5.xml new/netatalk-3.1.11/doc/manpages/man5/afp.conf.5.xml --- old/netatalk-3.1.10/doc/manpages/man5/afp.conf.5.xml 2016-07-19 10:36:56.000000000 +0200 +++ new/netatalk-3.1.11/doc/manpages/man5/afp.conf.5.xml 2017-03-15 09:50:53.000000000 +0100 @@ -5,7 +5,7 @@ <manvolnum>5</manvolnum> - <refmiscinfo class="date">04 Apr 2016</refmiscinfo> + <refmiscinfo class="date">27 Dec 2016</refmiscinfo> <refmiscinfo class="source">@NETATALK_VERSION@</refmiscinfo> </refmeta> @@ -1020,7 +1020,7 @@ <listitem> <para>Specifies the icon model that appears on clients. Defaults - to off. Note that afpd must support Zeroconf. + to off. Note that netatalk must support Zeroconf. Examples: RackMac (same as Xserve), PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort.</para> @@ -1188,6 +1188,18 @@ set in that volume's section).</para> </listitem> </varlistentry> + + <varlistentry> + <term>zeroconf name = <replaceable>name</replaceable> + <type>(G)</type></term> + + <listitem> + <para>Specifies a human-readable name that uniquely describes + registered services. The zeroconf name is advertised as UTF-8, + up to 63 octets (bytes) in length. Defaults to hostname. Note + that netatalk must support Zeroconf.</para> + </listitem> + </varlistentry> </variablelist> </refsect2> diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/afpd/unix.c new/netatalk-3.1.11/etc/afpd/unix.c --- old/netatalk-3.1.10/etc/afpd/unix.c 2016-06-06 13:21:51.000000000 +0200 +++ new/netatalk-3.1.11/etc/afpd/unix.c 2017-03-09 10:56:46.000000000 +0100 @@ -67,8 +67,7 @@ *btotal = (VolSpace) ( sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen )); #else /* !ultrix */ - *btotal = (VolSpace) - ( sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail )); + *btotal = (VolSpace) sfs.f_blocks; #endif /* ultrix */ /* see similar block above comments */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/netatalk/afp_avahi.c new/netatalk-3.1.11/etc/netatalk/afp_avahi.c --- old/netatalk-3.1.10/etc/netatalk/afp_avahi.c 2016-06-06 13:21:51.000000000 +0200 +++ new/netatalk-3.1.11/etc/netatalk/afp_avahi.c 2017-01-05 15:21:09.000000000 +0100 @@ -93,14 +93,26 @@ LOG(log_info, logtype_afpd, "hostname: %s", ctx->obj->options.hostname); - if (convert_string(ctx->obj->options.unixcharset, - CH_UTF8, - ctx->obj->options.hostname, - -1, - name, - MAXINSTANCENAMELEN) <= 0) { - LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.hostname); - goto fail; + if (ctx->obj->options.zeroconfname) { + if (convert_string(ctx->obj->options.unixcharset, + CH_UTF8, + ctx->obj->options.zeroconfname, + -1, + name, + MAXINSTANCENAMELEN) <= 0) { + LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.zeroconfname); + goto fail; + } + } else { + if (convert_string(ctx->obj->options.unixcharset, + CH_UTF8, + ctx->obj->options.hostname, + -1, + name, + MAXINSTANCENAMELEN) <= 0) { + LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.hostname); + goto fail; + } } LOG(log_info, logtype_afpd, "Registering server '%s' with Bonjour", name); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/netatalk/afp_mdns.c new/netatalk-3.1.11/etc/netatalk/afp_mdns.c --- old/netatalk-3.1.10/etc/netatalk/afp_mdns.c 2016-08-15 10:55:53.000000000 +0200 +++ new/netatalk-3.1.11/etc/netatalk/afp_mdns.c 2017-01-05 15:21:09.000000000 +0100 @@ -36,7 +36,7 @@ * Its easier to use asprintf to set the TXT record values */ -int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... ) +int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... ) { int ret = 0; char *str; @@ -45,7 +45,7 @@ if( 0 > vasprintf(&str, fmt, ap ) ) { va_end(ap); - return -1; + return -1; } va_end(ap); @@ -57,7 +57,7 @@ return ret; } -int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...) +int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...) { int ret = 0; char *key = NULL, *str = NULL; @@ -135,7 +135,7 @@ * registered and frees associated memory */ static void unregister_stuff() { - pthread_cancel(poller); + pthread_cancel(poller); for (int i = 0; i < svc_ref_count; i++) close(fds[i].fd); @@ -212,14 +212,26 @@ port = atoi(obj->options.port); - if (convert_string(obj->options.unixcharset, - CH_UTF8, - obj->options.hostname, - -1, - name, - MAXINSTANCENAMELEN) <= 0) { - LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name"); - goto fail; + if (obj->options.zeroconfname) { + if (convert_string(obj->options.unixcharset, + CH_UTF8, + obj->options.zeroconfname, + -1, + name, + MAXINSTANCENAMELEN) <= 0) { + LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", obj->options.zeroconfname); + goto fail; + } + } else { + if (convert_string(obj->options.unixcharset, + CH_UTF8, + obj->options.hostname, + -1, + name, + MAXINSTANCENAMELEN) <= 0) { + LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", obj->options.hostname); + goto fail; + } } error = DNSServiceRegister(&svc_refs[svc_ref_count++], diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/netatalk/netatalk.c new/netatalk-3.1.11/etc/netatalk/netatalk.c --- old/netatalk-3.1.10/etc/netatalk/netatalk.c 2016-09-12 11:46:25.000000000 +0200 +++ new/netatalk-3.1.11/etc/netatalk/netatalk.c 2017-01-05 15:21:09.000000000 +0100 @@ -348,6 +348,15 @@ puts( "netatalk has been compiled with support for these features:\n" ); + printf( " Zeroconf support:\t" ); +#if defined (HAVE_MDNS) + puts( "mDNSResponder" ); +#elif defined (HAVE_AVAHI) + puts( "Avahi" ); +#else + puts( "No" ); +#endif + printf( " Spotlight support:\t" ); #ifdef HAVE_TRACKER puts( "Yes" ); diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/uams/Makefile.am new/netatalk-3.1.11/etc/uams/Makefile.am --- old/netatalk-3.1.10/etc/uams/Makefile.am 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/etc/uams/Makefile.am 2017-03-15 10:10:53.000000000 +0100 @@ -83,6 +83,8 @@ uams_dhx2_pam_la_SOURCES = uams_dhx2_pam.c uams_gss_la_SOURCES = uams_gss.c +noinst_HEADERS = openssl_compat.h + # # flags # diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/uams/Makefile.in new/netatalk-3.1.11/etc/uams/Makefile.in --- old/netatalk-3.1.10/etc/uams/Makefile.in 2016-09-12 11:54:35.000000000 +0200 +++ new/netatalk-3.1.11/etc/uams/Makefile.in 2017-03-15 10:11:16.000000000 +0100 @@ -20,6 +20,7 @@ # conditionally build some modules # + VPATH = @srcdir@ am__is_gnu_make = { \ if test -z '$(MAKELEVEL)'; then \ @@ -132,7 +133,8 @@ $(top_srcdir)/configure.ac am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \ $(ACLOCAL_M4) -DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON) +DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \ + $(am__DIST_COMMON) mkinstalldirs = $(install_sh) -d CONFIG_HEADER = $(top_builddir)/config.h CONFIG_CLEAN_FILES = @@ -300,6 +302,7 @@ n|no|NO) false;; \ *) (install-info --version) >/dev/null 2>&1;; \ esac +HEADERS = $(noinst_HEADERS) am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP) # Read a list of newline-separated strings from the standard input, # and print each of them once, without duplicates. Input order is @@ -570,6 +573,7 @@ uams_dhx2_passwd_la_SOURCES = uams_dhx2_passwd.c uams_dhx2_pam_la_SOURCES = uams_dhx2_pam.c uams_gss_la_SOURCES = uams_gss.c +noinst_HEADERS = openssl_compat.h # # flags @@ -862,7 +866,7 @@ done check-am: all-am check: check-am -all-am: Makefile $(LTLIBRARIES) +all-am: Makefile $(LTLIBRARIES) $(HEADERS) installdirs: for dir in "$(DESTDIR)$(uamsdir)"; do \ test -z "$$dir" || $(MKDIR_P) "$$dir"; \ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/uams/openssl_compat.h new/netatalk-3.1.11/etc/uams/openssl_compat.h --- old/netatalk-3.1.10/etc/uams/openssl_compat.h 1970-01-01 01:00:00.000000000 +0100 +++ new/netatalk-3.1.11/etc/uams/openssl_compat.h 2017-03-15 09:50:53.000000000 +0100 @@ -0,0 +1,45 @@ +/* + +Copyright (c) 2017 Denis Bychkov (mano...@gmail.com) + +This file is released under the GNU General Public License (GPLv2). +The full license text is available at: + +http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt +*/ + +#ifndef OPENSSL_COMPAT_H +#define OPENSSL_COMPAT_H + +#if OPENSSL_VERSION_NUMBER < 0x10100000L +inline static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g) +{ + /* If the fields p and g in d are NULL, the corresponding input + * parameters MUST be non-NULL. q may remain NULL. + */ + if ((dh->p == NULL && p == NULL) || (dh->g == NULL && g == NULL)) + return 0; + + if (p != NULL) + dh->p = p; + if (q != NULL) + dh->q = q; + if (g != NULL) + dh->g = g; + + if (q != NULL) + dh->length = BN_num_bits(q); + + return 1; +} + +inline static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key) +{ + if (pub_key != NULL) + *pub_key = dh->pub_key; + if (priv_key != NULL) + *priv_key = dh->priv_key; +} +#endif /* OPENSSL_VERSION_NUMBER */ + +#endif /* OPENSSL_COMPAT_H */ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/uams/uams_dhx_pam.c new/netatalk-3.1.11/etc/uams/uams_dhx_pam.c --- old/netatalk-3.1.10/etc/uams/uams_dhx_pam.c 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/etc/uams/uams_dhx_pam.c 2017-03-15 09:50:53.000000000 +0100 @@ -34,6 +34,7 @@ #include <openssl/dh.h> #include <openssl/cast.h> #include <openssl/err.h> +#include "openssl_compat.h" #else /* OPENSSL_DHX */ #include <bn.h> #include <dh.h> @@ -193,6 +194,7 @@ uint16_t sessid; size_t i; BIGNUM *bn, *gbn, *pbn; + const BIGNUM *pub_key; DH *dh; /* get the client's public key */ @@ -236,9 +238,16 @@ return AFPERR_PARAM; } + if (!DH_set0_pqg(dh, pbn, NULL, gbn)) { + BN_free(pbn); + BN_free(gbn); + /* Log Entry */ + LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DH_set0_pqg() mysteriously failed -- %s", strerror(errno)); + /* Log Entry */ + goto pam_fail; + } + /* generate key and make sure that we have enough space */ - dh->p = pbn; - dh->g = gbn; if (DH_generate_key(dh) == 0) { unsigned long dherror; char errbuf[256]; @@ -252,9 +261,10 @@ ERR_free_strings(); goto pam_fail; } - if (BN_num_bytes(dh->pub_key) > KEYSIZE) { - LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s", strerror(errno)); - goto pam_fail; + DH_get0_key(dh, &pub_key, NULL); + if (BN_num_bytes(pub_key) > KEYSIZE) { + LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s", strerror(errno)); + goto pam_fail; } /* figure out the key. store the key in rbuf for now. */ @@ -270,7 +280,7 @@ *rbuflen += sizeof(sessid); /* public key */ - BN_bn2bin(dh->pub_key, (unsigned char *)rbuf); + BN_bn2bin(pub_key, (unsigned char *)rbuf); rbuf += KEYSIZE; *rbuflen += KEYSIZE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/etc/uams/uams_dhx_passwd.c new/netatalk-3.1.11/etc/uams/uams_dhx_passwd.c --- old/netatalk-3.1.10/etc/uams/uams_dhx_passwd.c 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/etc/uams/uams_dhx_passwd.c 2017-03-15 09:50:53.000000000 +0100 @@ -32,6 +32,7 @@ #include <openssl/bn.h> #include <openssl/dh.h> #include <openssl/cast.h> +#include "openssl_compat.h" #else /* OPENSSL_DHX */ #include <bn.h> #include <dh.h> @@ -76,6 +77,7 @@ struct spwd *sp; #endif /* SHADOWPW */ BIGNUM *bn, *gbn, *pbn; + const BIGNUM *pub_key; uint16_t sessid; size_t i; DH *dh; @@ -139,10 +141,18 @@ return AFPERR_PARAM; } + if (!DH_set0_pqg(dh, pbn, NULL, gbn)) { + BN_free(pbn); + BN_free(gbn); + goto passwd_fail; + } + /* generate key and make sure we have enough space */ - dh->p = pbn; - dh->g = gbn; - if (!DH_generate_key(dh) || (BN_num_bytes(dh->pub_key) > KEYSIZE)) { + if (!DH_generate_key(dh)) { + goto passwd_fail; + } + DH_get0_key(dh, &pub_key, NULL); + if (BN_num_bytes(pub_key) > KEYSIZE) { goto passwd_fail; } @@ -159,7 +169,7 @@ *rbuflen += sizeof(sessid); /* send our public key */ - BN_bn2bin(dh->pub_key, (unsigned char *)rbuf); + BN_bn2bin(pub_key, (unsigned char *)rbuf); rbuf += KEYSIZE; *rbuflen += KEYSIZE; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/include/atalk/ea.h new/netatalk-3.1.11/include/atalk/ea.h --- old/netatalk-3.1.10/include/atalk/ea.h 2016-06-22 10:57:37.000000000 +0200 +++ new/netatalk-3.1.11/include/atalk/ea.h 2017-03-09 10:56:46.000000000 +0100 @@ -58,10 +58,10 @@ #define MAX_EA_SIZE 3802 /* - * At time of writing the 10.5.6 client adds 8 bytes to the - * length of the EA that we send him -*/ -#define MAX_REPLY_EXTRA_BYTES 8 + * req_count has space for AFP response bitmap and length as well, so + * 6 bytes + */ +#define MAX_REPLY_EXTRA_BYTES 6 /* * Library user must provide a static buffer of size ATTRNAMEBUFSIZ. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/include/atalk/globals.h new/netatalk-3.1.11/include/atalk/globals.h --- old/netatalk-3.1.10/include/atalk/globals.h 2016-06-06 13:21:51.000000000 +0200 +++ new/netatalk-3.1.11/include/atalk/globals.h 2017-01-05 15:21:09.000000000 +0100 @@ -127,6 +127,7 @@ char *logconfig; char *logfile; char *mimicmodel; + char *zeroconfname; char *adminauthuser; char *ignored_attr; int splice_size; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/Makefile.am new/netatalk-3.1.11/libatalk/Makefile.am --- old/netatalk-3.1.10/libatalk/Makefile.am 2016-09-12 11:59:00.000000000 +0200 +++ new/netatalk-3.1.11/libatalk/Makefile.am 2017-03-15 09:54:23.000000000 +0100 @@ -46,6 +46,7 @@ # 3.1.8 17:0:0 # 3.1.9 17:0:0 # 3.1.10 18:0:0 +# 3.1.11 18:0:0 SUBDIRS = acl adouble bstring compat cnid dsi iniparser talloc util unicode vfs diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/Makefile.in new/netatalk-3.1.11/libatalk/Makefile.in --- old/netatalk-3.1.10/libatalk/Makefile.in 2016-09-12 11:59:12.000000000 +0200 +++ new/netatalk-3.1.11/libatalk/Makefile.in 2017-03-15 09:55:30.000000000 +0100 @@ -534,6 +534,7 @@ # 3.1.8 17:0:0 # 3.1.9 17:0:0 # 3.1.10 18:0:0 +# 3.1.11 18:0:0 SUBDIRS = acl adouble bstring compat cnid dsi iniparser talloc util \ unicode vfs $(am__append_1) lib_LTLIBRARIES = libatalk.la diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/acl/ldap.c new/netatalk-3.1.11/libatalk/acl/ldap.c --- old/netatalk-3.1.10/libatalk/acl/ldap.c 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/libatalk/acl/ldap.c 2017-01-05 15:21:09.000000000 +0100 @@ -357,7 +357,7 @@ ldap_attr = ldap_name_attr; len = snprintf( filter, 256, "%s=%s", ldap_attr, name); if (len >= 256 || len == -1) { - LOG(log_error, logtype_default, "ldap_getnamefromuuid: filter error:%d, \"%s\"", len, filter); + LOG(log_error, logtype_default, "ldap_getuuidfromname: filter error:%d, \"%s\"", len, filter); return -1; } @@ -383,7 +383,7 @@ uuid_bytes[10], uuid_bytes[11], uuid_bytes[12], /* Data4 - Low Bytes */ uuid_bytes[13], uuid_bytes[14], uuid_bytes[15]); free(uuid_bytes); - LOG(log_error, logtype_default, "ldap_getnamefromuuid: uuid_string: %s", *uuid_string); + LOG(log_error, logtype_default, "ldap_getuuidfromname: uuid_string: %s", *uuid_string); } return 0; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/util/netatalk_conf.c new/netatalk-3.1.11/libatalk/util/netatalk_conf.c --- old/netatalk-3.1.10/libatalk/util/netatalk_conf.c 2016-06-22 10:57:54.000000000 +0200 +++ new/netatalk-3.1.11/libatalk/util/netatalk_conf.c 2017-01-05 15:21:09.000000000 +0100 @@ -1963,6 +1963,7 @@ options->addomain = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "ad domain", NULL); options->ntseparator = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "nt separator", NULL); options->mimicmodel = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "mimic model", NULL); + options->zeroconfname = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "zeroconf name", NULL); options->adminauthuser = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "admin auth user",NULL); options->ignored_attr = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "ignored attributes", NULL); options->cnid_mysql_host = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "cnid mysql host", NULL); @@ -2193,6 +2194,8 @@ CONFIG_ARG_FREE(obj->options.ntseparator); if (obj->options.mimicmodel) CONFIG_ARG_FREE(obj->options.mimicmodel); + if (obj->options.zeroconfname) + CONFIG_ARG_FREE(obj->options.zeroconfname); if (obj->options.adminauthuser) CONFIG_ARG_FREE(obj->options.adminauthuser); if (obj->options.hostname) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/vfs/ea_sys.c new/netatalk-3.1.11/libatalk/vfs/ea_sys.c --- old/netatalk-3.1.10/libatalk/vfs/ea_sys.c 2016-06-22 10:57:37.000000000 +0200 +++ new/netatalk-3.1.11/libatalk/vfs/ea_sys.c 2017-03-09 10:56:46.000000000 +0100 @@ -158,6 +158,7 @@ { ssize_t ret; uint32_t attrsize; + size_t extra = 0; #ifdef SOLARIS /* Protect special attributes set by NFS server */ @@ -171,6 +172,16 @@ /* Start building reply packet */ + if (maxreply <= MAX_REPLY_EXTRA_BYTES) { + /* + * maxreply must be at least size of xattr + MAX_REPLY_EXTRA_BYTES (6) + * bytes. The 6 bytes are the AFP reply packets bitmap and length field. + */ + memset(rbuf, 0, 4); + *rbuflen += 4; + return AFPERR_PARAM; + } + maxreply -= MAX_REPLY_EXTRA_BYTES; if (maxreply > MAX_EA_SIZE) @@ -178,19 +189,19 @@ LOG(log_debug7, logtype_afpd, "sys_getextattr_content(%s): attribute: \"%s\", size: %u", uname, attruname, maxreply); if (vol->v_flags & AFPVOL_EA_SAMBA) { - maxreply++; + extra = 1; } /* PBaranski fix */ if (fd != -1) { LOG(log_debug, logtype_afpd, "sys_get_eacontent(%s): file is already opened", uname); - ret = sys_fgetxattr(fd, attruname, rbuf +4, maxreply); + ret = sys_fgetxattr(fd, attruname, rbuf +4, maxreply + extra); } else { if ((oflag & O_NOFOLLOW) ) { - ret = sys_lgetxattr(uname, attruname, rbuf +4, maxreply); + ret = sys_lgetxattr(uname, attruname, rbuf +4, maxreply + extra); } else { - ret = sys_getxattr(uname, attruname, rbuf +4, maxreply); + ret = sys_getxattr(uname, attruname, rbuf +4, maxreply + extra); } } /* PBaranski fix */ @@ -209,6 +220,9 @@ return AFPERR_NOITEM; return AFPERR_MISC; + case ERANGE: + return AFPERR_PARAM; + default: LOG(log_debug, logtype_afpd, "sys_getextattr_content(%s): error: %s", attruname, strerror(errno)); return AFPERR_MISC; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/libatalk/vfs/extattr.c new/netatalk-3.1.11/libatalk/vfs/extattr.c --- old/netatalk-3.1.10/libatalk/vfs/extattr.c 2016-06-22 10:57:37.000000000 +0200 +++ new/netatalk-3.1.11/libatalk/vfs/extattr.c 2017-03-09 10:56:46.000000000 +0100 @@ -194,6 +194,10 @@ const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1; if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) { + if (size == 0) { + /* size == 0 means only return size */ + return retval; + } if(retval > size) { errno = ERANGE; return -1; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/macros/libgcrypt.m4 new/netatalk-3.1.11/macros/libgcrypt.m4 --- old/netatalk-3.1.10/macros/libgcrypt.m4 2014-03-12 08:06:49.000000000 +0100 +++ new/netatalk-3.1.11/macros/libgcrypt.m4 2017-01-05 15:21:09.000000000 +0100 @@ -114,10 +114,13 @@ AC_DEFINE(UAM_DHX2, 1, [Define if the DHX2 UAM modules should be compiled]) ifelse([$2], , :, [$2]) else + if test x$libgcrypt_config_prefix != x"no" ; then + AC_MSG_ERROR([Could not find libcgrypt development files needed for the DHX2 UAM, please install the libgcrypt devel package]) + fi LIBGCRYPT_CFLAGS="" LIBGCRYPT_LIBS="" ifelse([$3], , :, [$3]) fi AC_SUBST(LIBGCRYPT_CFLAGS) AC_SUBST(LIBGCRYPT_LIBS) -]) \ No newline at end of file +]) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/netatalk-3.1.10/man/man5/afp.conf.5.in new/netatalk-3.1.11/man/man5/afp.conf.5.in --- old/netatalk-3.1.10/man/man5/afp.conf.5.in 2016-09-12 11:47:35.000000000 +0200 +++ new/netatalk-3.1.11/man/man5/afp.conf.5.in 2017-03-15 09:51:50.000000000 +0100 @@ -2,12 +2,12 @@ .\" Title: afp.conf .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author] .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/> -.\" Date: 04 Apr 2016 +.\" Date: 27 Dec 2016 .\" Manual: @NETATALK_VERSION@ .\" Source: @NETATALK_VERSION@ .\" Language: English .\" -.TH "AFP\&.CONF" "5" "04 Apr 2016" "@NETATALK_VERSION@" "@NETATALK_VERSION@" +.TH "AFP\&.CONF" "5" "27 Dec 2016" "@NETATALK_VERSION@" "@NETATALK_VERSION@" .\" ----------------------------------------------------------------- .\" * Define some portability stuff .\" ----------------------------------------------------------------- @@ -519,13 +519,13 @@ .PP use sendfile = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR .RS 4 -Whether to use sendfile +Whether to use sendfile.\" sendfile syscall for sending file data to clients\&. .RE .PP zeroconf = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR .RS 4 -Whether to use automatic Zeroconf +Whether to use automatic Zeroconf.\" Zeroconf: Bonjour service registration if Avahi or mDNSResponder were compiled in\&. .RE .SS "Miscellaneous Options" @@ -678,7 +678,7 @@ .PP mimic model = \fImodel\fR \fB(G)\fR .RS 4 -Specifies the icon model that appears on clients\&. Defaults to off\&. Note that afpd must support Zeroconf\&. Examples: RackMac (same as Xserve), PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort\&. +Specifies the icon model that appears on clients\&. Defaults to off\&. Note that netatalk must support Zeroconf\&. Examples: RackMac (same as Xserve), PowerBook, PowerMac, Macmini, iMac, MacBook, MacBookPro, MacBookAir, MacPro, AppleTV1,1, AirPort\&. .RE .PP signature = <text> \fB(G)\fR @@ -776,6 +776,11 @@ \fBname\fR as option preset for all volumes (when set in the [Global] section) or for one volume (when set in that volume\*(Aqs section)\&. .RE +.PP +zeroconf name = \fIname\fR \fB(G)\fR +.RS 4 +Specifies a human\-readable name that uniquely describes registered services\&. The zeroconf name is advertised as UTF\-8, up to 63 octets (bytes) in length\&. Defaults to hostname\&. Note that netatalk must support Zeroconf\&. +.RE .SS "Logging Options" .PP log file = \fIlogfile\fR \fB(G)\fR @@ -812,7 +817,7 @@ .sp .5v .RE .RE -.SS "Filesystem Change Events (FCE)" +.SS "Filesystem Change Events (FCE.\" FCE )" .PP Netatalk includes a nifty filesystem change event mechanism where afpd processes notify interested listeners about certain filesystem event by UDP network datagrams\&. .PP @@ -1193,7 +1198,7 @@ .PP ea = \fInone|auto|sys|ad|samba\fR \fB(V)\fR .RS 4 -Specify how Extended Attributes +Specify how Extended Attributes.\" Extended Attributes are stored\&. \fBauto\fR is the default\&.