• R/O
  • HTTP
  • SSH
  • HTTPS

netatalk-doc-ja: コミット

Netatalk はオープンソースの AFP ファイルサーバーのソフトウェア.
*NIX/*BSD で動作する Netatalk は AppleShare ファイルサーバー (AFP) として同時にマッキントッシュのクライアントの共有を可能とする.
=====
本プロジェクトは上記 Netatalk のドキュメントの日本語訳を提供することを目的とする.


コミットメタ情報

リビジョン5788d491a73018a4c5b1ab729833cfe7a68b5ebc (tree)
日時2017-03-21 00:33:13
作者HAT <hat@fa2....>
コミッターHAT

ログメッセージ

ソースファイル類を3.1.11ベースに更新

変更サマリ

差分

--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,14 @@
1+Changes in 3.1.11
2+================
3+* NEW: Global option "zeroconf name", FR#99
4+* NEW: show Zeroconf support by "netatalk -V", FR#100
5+* UPD: gentoo: Switch openrc init script to openrc-run, GitHub#77
6+* FIX: log message: name of function doese not match, GitHub#78
7+* UPD: volume capacity reporting to match Samba behavior, GitHub#83
8+* FIX: debian: sysv init status command exits with proper exit code, GitHub#84
9+* FIX: dsi_stream_read: len:0, unexpected EOF, GitHub#82
10+* UPD: dhx uams: OpenSSL 1.1 support, GitHub#87
11+
112 Changes in 3.1.10
213 ================
314 * FIX: cannot build when ldap is not defined, bug #630
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
1-3.1.10
\ No newline at end of file
1+3.1.11
\ No newline at end of file
--- a/configure
+++ b/configure
@@ -17178,6 +17178,9 @@ $as_echo "#define UAM_DHX2 1" >>confdefs.h
1717817178
1717917179 :
1718017180 else
17181+ if test x$libgcrypt_config_prefix != x"no" ; then
17182+ as_fn_error $? "Could not find libcgrypt development files needed for the DHX2 UAM, please install the libgcrypt devel package" "$LINENO" 5
17183+ fi
1718117184 LIBGCRYPT_CFLAGS=""
1718217185 LIBGCRYPT_LIBS=""
1718317186 :
--- a/distrib/initscripts/rc.debian.tmpl
+++ b/distrib/initscripts/rc.debian.tmpl
@@ -70,6 +70,7 @@ case "$1" in
7070 else
7171 echo "Netatalk is not running."
7272 fi
73+ exit $EXIT_CODE
7374 ;;
7475 *)
7576 echo "Usage: $0 {start|stop|restart|force-reload|status}" >&2
--- a/distrib/initscripts/rc.gentoo.tmpl
+++ b/distrib/initscripts/rc.gentoo.tmpl
@@ -1,4 +1,4 @@
1-#!/sbin/runscript
1+#!/sbin/openrc-run
22 # Copyright 1999-2012 Gentoo Foundation
33 # Distributed under the terms of the GNU General Public License v2
44 #
--- a/etc/afpd/unix.c
+++ b/etc/afpd/unix.c
@@ -67,8 +67,7 @@ int ustatfs_getvolspace(const struct vol *vol, VolSpace *bfree, VolSpace *btotal
6767 *btotal = (VolSpace)
6868 ( sfs.fd_req.btot - ( sfs.fd_req.bfree - sfs.fd_req.bfreen ));
6969 #else /* !ultrix */
70- *btotal = (VolSpace)
71- ( sfs.f_blocks - ( sfs.f_bfree - sfs.f_bavail ));
70+ *btotal = (VolSpace) sfs.f_blocks;
7271 #endif /* ultrix */
7372
7473 /* see similar block above comments */
--- a/etc/netatalk/afp_avahi.c
+++ b/etc/netatalk/afp_avahi.c
@@ -93,14 +93,26 @@ static void register_stuff(void) {
9393
9494 LOG(log_info, logtype_afpd, "hostname: %s", ctx->obj->options.hostname);
9595
96- if (convert_string(ctx->obj->options.unixcharset,
97- CH_UTF8,
98- ctx->obj->options.hostname,
99- -1,
100- name,
101- MAXINSTANCENAMELEN) <= 0) {
102- LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.hostname);
103- goto fail;
96+ if (ctx->obj->options.zeroconfname) {
97+ if (convert_string(ctx->obj->options.unixcharset,
98+ CH_UTF8,
99+ ctx->obj->options.zeroconfname,
100+ -1,
101+ name,
102+ MAXINSTANCENAMELEN) <= 0) {
103+ LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.zeroconfname);
104+ goto fail;
105+ }
106+ } else {
107+ if (convert_string(ctx->obj->options.unixcharset,
108+ CH_UTF8,
109+ ctx->obj->options.hostname,
110+ -1,
111+ name,
112+ MAXINSTANCENAMELEN) <= 0) {
113+ LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", ctx->obj->options.hostname);
114+ goto fail;
115+ }
104116 }
105117
106118 LOG(log_info, logtype_afpd, "Registering server '%s' with Bonjour", name);
--- a/etc/netatalk/afp_mdns.c
+++ b/etc/netatalk/afp_mdns.c
@@ -36,7 +36,7 @@ static pthread_t poller;
3636 * Its easier to use asprintf to set the TXT record values
3737 */
3838
39-int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... )
39+int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ... )
4040 {
4141 int ret = 0;
4242 char *str;
@@ -45,7 +45,7 @@ int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ...
4545
4646 if( 0 > vasprintf(&str, fmt, ap ) ) {
4747 va_end(ap);
48- return -1;
48+ return -1;
4949 }
5050 va_end(ap);
5151
@@ -57,7 +57,7 @@ int TXTRecordPrintf(TXTRecordRef * rec, const char * key, const char * fmt, ...
5757 return ret;
5858 }
5959
60-int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...)
60+int TXTRecordKeyPrintf(TXTRecordRef * rec, const char * key_fmt, int key_var, const char * fmt, ...)
6161 {
6262 int ret = 0;
6363 char *key = NULL, *str = NULL;
@@ -135,7 +135,7 @@ static void RegisterReply(DNSServiceRef sdRef, DNSServiceFlags flags, DNSService
135135 * registered and frees associated memory
136136 */
137137 static void unregister_stuff() {
138- pthread_cancel(poller);
138+ pthread_cancel(poller);
139139
140140 for (int i = 0; i < svc_ref_count; i++)
141141 close(fds[i].fd);
@@ -212,14 +212,26 @@ static void register_stuff(const AFPObj *obj) {
212212
213213 port = atoi(obj->options.port);
214214
215- if (convert_string(obj->options.unixcharset,
216- CH_UTF8,
217- obj->options.hostname,
218- -1,
219- name,
220- MAXINSTANCENAMELEN) <= 0) {
221- LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name");
222- goto fail;
215+ if (obj->options.zeroconfname) {
216+ if (convert_string(obj->options.unixcharset,
217+ CH_UTF8,
218+ obj->options.zeroconfname,
219+ -1,
220+ name,
221+ MAXINSTANCENAMELEN) <= 0) {
222+ LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", obj->options.zeroconfname);
223+ goto fail;
224+ }
225+ } else {
226+ if (convert_string(obj->options.unixcharset,
227+ CH_UTF8,
228+ obj->options.hostname,
229+ -1,
230+ name,
231+ MAXINSTANCENAMELEN) <= 0) {
232+ LOG(log_error, logtype_afpd, "Could not set Zeroconf instance name: %s", obj->options.hostname);
233+ goto fail;
234+ }
223235 }
224236
225237 error = DNSServiceRegister(&svc_refs[svc_ref_count++],
--- a/etc/netatalk/netatalk.c
+++ b/etc/netatalk/netatalk.c
@@ -348,6 +348,15 @@ static void show_netatalk_version( void )
348348
349349 puts( "netatalk has been compiled with support for these features:\n" );
350350
351+ printf( " Zeroconf support:\t" );
352+#if defined (HAVE_MDNS)
353+ puts( "mDNSResponder" );
354+#elif defined (HAVE_AVAHI)
355+ puts( "Avahi" );
356+#else
357+ puts( "No" );
358+#endif
359+
351360 printf( " Spotlight support:\t" );
352361 #ifdef HAVE_TRACKER
353362 puts( "Yes" );
--- a/etc/uams/Makefile.am
+++ b/etc/uams/Makefile.am
@@ -83,6 +83,8 @@ uams_dhx2_passwd_la_SOURCES = uams_dhx2_passwd.c
8383 uams_dhx2_pam_la_SOURCES = uams_dhx2_pam.c
8484 uams_gss_la_SOURCES = uams_gss.c
8585
86+noinst_HEADERS = openssl_compat.h
87+
8688 #
8789 # flags
8890 #
--- a/etc/uams/Makefile.in
+++ b/etc/uams/Makefile.in
@@ -20,6 +20,7 @@
2020 # conditionally build some modules
2121 #
2222
23+
2324 VPATH = @srcdir@
2425 am__is_gnu_make = { \
2526 if test -z '$(MAKELEVEL)'; then \
@@ -132,7 +133,8 @@ am__aclocal_m4_deps = $(top_srcdir)/macros/afs-check.m4 \
132133 $(top_srcdir)/configure.ac
133134 am__configure_deps = $(am__aclocal_m4_deps) $(CONFIGURE_DEPENDENCIES) \
134135 $(ACLOCAL_M4)
135-DIST_COMMON = $(srcdir)/Makefile.am $(am__DIST_COMMON)
136+DIST_COMMON = $(srcdir)/Makefile.am $(noinst_HEADERS) \
137+ $(am__DIST_COMMON)
136138 mkinstalldirs = $(install_sh) -d
137139 CONFIG_HEADER = $(top_builddir)/config.h
138140 CONFIG_CLEAN_FILES =
@@ -300,6 +302,7 @@ am__can_run_installinfo = \
300302 n|no|NO) false;; \
301303 *) (install-info --version) >/dev/null 2>&1;; \
302304 esac
305+HEADERS = $(noinst_HEADERS)
303306 am__tagged_files = $(HEADERS) $(SOURCES) $(TAGS_FILES) $(LISP)
304307 # Read a list of newline-separated strings from the standard input,
305308 # and print each of them once, without duplicates. Input order is
@@ -570,6 +573,7 @@ uams_dhx_pam_la_SOURCES = uams_dhx_pam.c
570573 uams_dhx2_passwd_la_SOURCES = uams_dhx2_passwd.c
571574 uams_dhx2_pam_la_SOURCES = uams_dhx2_pam.c
572575 uams_gss_la_SOURCES = uams_gss.c
576+noinst_HEADERS = openssl_compat.h
573577
574578 #
575579 # flags
@@ -862,7 +866,7 @@ distdir: $(DISTFILES)
862866 done
863867 check-am: all-am
864868 check: check-am
865-all-am: Makefile $(LTLIBRARIES)
869+all-am: Makefile $(LTLIBRARIES) $(HEADERS)
866870 installdirs:
867871 for dir in "$(DESTDIR)$(uamsdir)"; do \
868872 test -z "$$dir" || $(MKDIR_P) "$$dir"; \
--- /dev/null
+++ b/etc/uams/openssl_compat.h
@@ -0,0 +1,45 @@
1+/*
2+
3+Copyright (c) 2017 Denis Bychkov (manover@gmail.com)
4+
5+This file is released under the GNU General Public License (GPLv2).
6+The full license text is available at:
7+
8+http://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
9+*/
10+
11+#ifndef OPENSSL_COMPAT_H
12+#define OPENSSL_COMPAT_H
13+
14+#if OPENSSL_VERSION_NUMBER < 0x10100000L
15+inline static int DH_set0_pqg(DH *dh, BIGNUM *p, BIGNUM *q, BIGNUM *g)
16+{
17+ /* If the fields p and g in d are NULL, the corresponding input
18+ * parameters MUST be non-NULL. q may remain NULL.
19+ */
20+ if ((dh->p == NULL && p == NULL) || (dh->g == NULL && g == NULL))
21+ return 0;
22+
23+ if (p != NULL)
24+ dh->p = p;
25+ if (q != NULL)
26+ dh->q = q;
27+ if (g != NULL)
28+ dh->g = g;
29+
30+ if (q != NULL)
31+ dh->length = BN_num_bits(q);
32+
33+ return 1;
34+}
35+
36+inline static void DH_get0_key(const DH *dh, const BIGNUM **pub_key, const BIGNUM **priv_key)
37+{
38+ if (pub_key != NULL)
39+ *pub_key = dh->pub_key;
40+ if (priv_key != NULL)
41+ *priv_key = dh->priv_key;
42+}
43+#endif /* OPENSSL_VERSION_NUMBER */
44+
45+#endif /* OPENSSL_COMPAT_H */
--- a/etc/uams/uams_dhx_pam.c
+++ b/etc/uams/uams_dhx_pam.c
@@ -34,6 +34,7 @@
3434 #include <openssl/dh.h>
3535 #include <openssl/cast.h>
3636 #include <openssl/err.h>
37+#include "openssl_compat.h"
3738 #else /* OPENSSL_DHX */
3839 #include <bn.h>
3940 #include <dh.h>
@@ -193,6 +194,7 @@ static int dhx_setup(void *obj, char *ibuf, size_t ibuflen _U_,
193194 uint16_t sessid;
194195 size_t i;
195196 BIGNUM *bn, *gbn, *pbn;
197+ const BIGNUM *pub_key;
196198 DH *dh;
197199
198200 /* get the client's public key */
@@ -236,9 +238,16 @@ static int dhx_setup(void *obj, char *ibuf, size_t ibuflen _U_,
236238 return AFPERR_PARAM;
237239 }
238240
241+ if (!DH_set0_pqg(dh, pbn, NULL, gbn)) {
242+ BN_free(pbn);
243+ BN_free(gbn);
244+ /* Log Entry */
245+ LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM DH_set0_pqg() mysteriously failed -- %s", strerror(errno));
246+ /* Log Entry */
247+ goto pam_fail;
248+ }
249+
239250 /* generate key and make sure that we have enough space */
240- dh->p = pbn;
241- dh->g = gbn;
242251 if (DH_generate_key(dh) == 0) {
243252 unsigned long dherror;
244253 char errbuf[256];
@@ -252,9 +261,10 @@ static int dhx_setup(void *obj, char *ibuf, size_t ibuflen _U_,
252261 ERR_free_strings();
253262 goto pam_fail;
254263 }
255- if (BN_num_bytes(dh->pub_key) > KEYSIZE) {
256- LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s", strerror(errno));
257- goto pam_fail;
264+ DH_get0_key(dh, &pub_key, NULL);
265+ if (BN_num_bytes(pub_key) > KEYSIZE) {
266+ LOG(log_info, logtype_uams, "uams_dhx_pam.c :PAM: Err Generating Key -- Not enough Space? -- %s", strerror(errno));
267+ goto pam_fail;
258268 }
259269
260270 /* figure out the key. store the key in rbuf for now. */
@@ -270,7 +280,7 @@ static int dhx_setup(void *obj, char *ibuf, size_t ibuflen _U_,
270280 *rbuflen += sizeof(sessid);
271281
272282 /* public key */
273- BN_bn2bin(dh->pub_key, (unsigned char *)rbuf);
283+ BN_bn2bin(pub_key, (unsigned char *)rbuf);
274284 rbuf += KEYSIZE;
275285 *rbuflen += KEYSIZE;
276286
--- a/etc/uams/uams_dhx_passwd.c
+++ b/etc/uams/uams_dhx_passwd.c
@@ -32,6 +32,7 @@
3232 #include <openssl/bn.h>
3333 #include <openssl/dh.h>
3434 #include <openssl/cast.h>
35+#include "openssl_compat.h"
3536 #else /* OPENSSL_DHX */
3637 #include <bn.h>
3738 #include <dh.h>
@@ -76,6 +77,7 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
7677 struct spwd *sp;
7778 #endif /* SHADOWPW */
7879 BIGNUM *bn, *gbn, *pbn;
80+ const BIGNUM *pub_key;
7981 uint16_t sessid;
8082 size_t i;
8183 DH *dh;
@@ -139,10 +141,18 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
139141 return AFPERR_PARAM;
140142 }
141143
144+ if (!DH_set0_pqg(dh, pbn, NULL, gbn)) {
145+ BN_free(pbn);
146+ BN_free(gbn);
147+ goto passwd_fail;
148+ }
149+
142150 /* generate key and make sure we have enough space */
143- dh->p = pbn;
144- dh->g = gbn;
145- if (!DH_generate_key(dh) || (BN_num_bytes(dh->pub_key) > KEYSIZE)) {
151+ if (!DH_generate_key(dh)) {
152+ goto passwd_fail;
153+ }
154+ DH_get0_key(dh, &pub_key, NULL);
155+ if (BN_num_bytes(pub_key) > KEYSIZE) {
146156 goto passwd_fail;
147157 }
148158
@@ -159,7 +169,7 @@ static int pwd_login(void *obj, char *username, int ulen, struct passwd **uam_pw
159169 *rbuflen += sizeof(sessid);
160170
161171 /* send our public key */
162- BN_bn2bin(dh->pub_key, (unsigned char *)rbuf);
172+ BN_bn2bin(pub_key, (unsigned char *)rbuf);
163173 rbuf += KEYSIZE;
164174 *rbuflen += KEYSIZE;
165175
--- a/include/atalk/ea.h
+++ b/include/atalk/ea.h
@@ -58,10 +58,10 @@
5858 #define MAX_EA_SIZE 3802
5959
6060 /*
61- * At time of writing the 10.5.6 client adds 8 bytes to the
62- * length of the EA that we send him
63-*/
64-#define MAX_REPLY_EXTRA_BYTES 8
61+ * req_count has space for AFP response bitmap and length as well, so
62+ * 6 bytes
63+ */
64+#define MAX_REPLY_EXTRA_BYTES 6
6565
6666 /*
6767 * Library user must provide a static buffer of size ATTRNAMEBUFSIZ.
--- a/include/atalk/globals.h
+++ b/include/atalk/globals.h
@@ -127,6 +127,7 @@ struct afp_options {
127127 char *logconfig;
128128 char *logfile;
129129 char *mimicmodel;
130+ char *zeroconfname;
130131 char *adminauthuser;
131132 char *ignored_attr;
132133 int splice_size;
--- a/libatalk/Makefile.am
+++ b/libatalk/Makefile.am
@@ -46,6 +46,7 @@ VERSION_INFO = 18:0:0
4646 # 3.1.8 17:0:0
4747 # 3.1.9 17:0:0
4848 # 3.1.10 18:0:0
49+# 3.1.11 18:0:0
4950
5051 SUBDIRS = acl adouble bstring compat cnid dsi iniparser talloc util unicode vfs
5152
--- a/libatalk/Makefile.in
+++ b/libatalk/Makefile.in
@@ -534,6 +534,7 @@ VERSION_INFO = 18:0:0
534534 # 3.1.8 17:0:0
535535 # 3.1.9 17:0:0
536536 # 3.1.10 18:0:0
537+# 3.1.11 18:0:0
537538 SUBDIRS = acl adouble bstring compat cnid dsi iniparser talloc util \
538539 unicode vfs $(am__append_1)
539540 lib_LTLIBRARIES = libatalk.la
--- a/libatalk/acl/ldap.c
+++ b/libatalk/acl/ldap.c
@@ -357,7 +357,7 @@ int ldap_getuuidfromname( const char *name, uuidtype_t type, char **uuid_string)
357357 ldap_attr = ldap_name_attr;
358358 len = snprintf( filter, 256, "%s=%s", ldap_attr, name);
359359 if (len >= 256 || len == -1) {
360- LOG(log_error, logtype_default, "ldap_getnamefromuuid: filter error:%d, \"%s\"", len, filter);
360+ LOG(log_error, logtype_default, "ldap_getuuidfromname: filter error:%d, \"%s\"", len, filter);
361361 return -1;
362362 }
363363
@@ -383,7 +383,7 @@ int ldap_getuuidfromname( const char *name, uuidtype_t type, char **uuid_string)
383383 uuid_bytes[10], uuid_bytes[11], uuid_bytes[12], /* Data4 - Low Bytes */
384384 uuid_bytes[13], uuid_bytes[14], uuid_bytes[15]);
385385 free(uuid_bytes);
386- LOG(log_error, logtype_default, "ldap_getnamefromuuid: uuid_string: %s", *uuid_string);
386+ LOG(log_error, logtype_default, "ldap_getuuidfromname: uuid_string: %s", *uuid_string);
387387 }
388388
389389 return 0;
--- a/libatalk/util/netatalk_conf.c
+++ b/libatalk/util/netatalk_conf.c
@@ -1963,6 +1963,7 @@ int afp_config_parse(AFPObj *AFPObj, char *processname)
19631963 options->addomain = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "ad domain", NULL);
19641964 options->ntseparator = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "nt separator", NULL);
19651965 options->mimicmodel = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "mimic model", NULL);
1966+ options->zeroconfname = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "zeroconf name", NULL);
19661967 options->adminauthuser = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "admin auth user",NULL);
19671968 options->ignored_attr = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "ignored attributes", NULL);
19681969 options->cnid_mysql_host = atalk_iniparser_getstrdup(config, INISEC_GLOBAL, "cnid mysql host", NULL);
@@ -2193,6 +2194,8 @@ void afp_config_free(AFPObj *obj)
21932194 CONFIG_ARG_FREE(obj->options.ntseparator);
21942195 if (obj->options.mimicmodel)
21952196 CONFIG_ARG_FREE(obj->options.mimicmodel);
2197+ if (obj->options.zeroconfname)
2198+ CONFIG_ARG_FREE(obj->options.zeroconfname);
21962199 if (obj->options.adminauthuser)
21972200 CONFIG_ARG_FREE(obj->options.adminauthuser);
21982201 if (obj->options.hostname)
--- a/libatalk/vfs/ea_sys.c
+++ b/libatalk/vfs/ea_sys.c
@@ -158,6 +158,7 @@ int sys_get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT)
158158 {
159159 ssize_t ret;
160160 uint32_t attrsize;
161+ size_t extra = 0;
161162
162163 #ifdef SOLARIS
163164 /* Protect special attributes set by NFS server */
@@ -171,6 +172,16 @@ int sys_get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT)
171172
172173 /* Start building reply packet */
173174
175+ if (maxreply <= MAX_REPLY_EXTRA_BYTES) {
176+ /*
177+ * maxreply must be at least size of xattr + MAX_REPLY_EXTRA_BYTES (6)
178+ * bytes. The 6 bytes are the AFP reply packets bitmap and length field.
179+ */
180+ memset(rbuf, 0, 4);
181+ *rbuflen += 4;
182+ return AFPERR_PARAM;
183+ }
184+
174185 maxreply -= MAX_REPLY_EXTRA_BYTES;
175186
176187 if (maxreply > MAX_EA_SIZE)
@@ -178,19 +189,19 @@ int sys_get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT)
178189
179190 LOG(log_debug7, logtype_afpd, "sys_getextattr_content(%s): attribute: \"%s\", size: %u", uname, attruname, maxreply);
180191 if (vol->v_flags & AFPVOL_EA_SAMBA) {
181- maxreply++;
192+ extra = 1;
182193 }
183194
184195 /* PBaranski fix */
185196 if (fd != -1) {
186197 LOG(log_debug, logtype_afpd, "sys_get_eacontent(%s): file is already opened", uname);
187- ret = sys_fgetxattr(fd, attruname, rbuf +4, maxreply);
198+ ret = sys_fgetxattr(fd, attruname, rbuf +4, maxreply + extra);
188199 } else {
189200 if ((oflag & O_NOFOLLOW) ) {
190- ret = sys_lgetxattr(uname, attruname, rbuf +4, maxreply);
201+ ret = sys_lgetxattr(uname, attruname, rbuf +4, maxreply + extra);
191202 }
192203 else {
193- ret = sys_getxattr(uname, attruname, rbuf +4, maxreply);
204+ ret = sys_getxattr(uname, attruname, rbuf +4, maxreply + extra);
194205 }
195206 }
196207 /* PBaranski fix */
@@ -209,6 +220,9 @@ int sys_get_eacontent(VFS_FUNC_ARGS_EA_GETCONTENT)
209220 return AFPERR_NOITEM;
210221 return AFPERR_MISC;
211222
223+ case ERANGE:
224+ return AFPERR_PARAM;
225+
212226 default:
213227 LOG(log_debug, logtype_afpd, "sys_getextattr_content(%s): error: %s", attruname, strerror(errno));
214228 return AFPERR_MISC;
--- a/libatalk/vfs/extattr.c
+++ b/libatalk/vfs/extattr.c
@@ -194,6 +194,10 @@ ssize_t sys_fgetxattr (int filedes, const char *uname, void *value, size_t size)
194194 const char *attrname = ((s=strchr(name, '.')) == NULL) ? name : s + 1;
195195
196196 if((retval=extattr_get_fd(filedes, attrnamespace, attrname, NULL, 0)) >= 0) {
197+ if (size == 0) {
198+ /* size == 0 means only return size */
199+ return retval;
200+ }
197201 if(retval > size) {
198202 errno = ERANGE;
199203 return -1;
--- a/macros/libgcrypt.m4
+++ b/macros/libgcrypt.m4
@@ -114,10 +114,13 @@ fi
114114 AC_DEFINE(UAM_DHX2, 1, [Define if the DHX2 UAM modules should be compiled])
115115 ifelse([$2], , :, [$2])
116116 else
117+ if test x$libgcrypt_config_prefix != x"no" ; then
118+ AC_MSG_ERROR([Could not find libcgrypt development files needed for the DHX2 UAM, please install the libgcrypt devel package])
119+ fi
117120 LIBGCRYPT_CFLAGS=""
118121 LIBGCRYPT_LIBS=""
119122 ifelse([$3], , :, [$3])
120123 fi
121124 AC_SUBST(LIBGCRYPT_CFLAGS)
122125 AC_SUBST(LIBGCRYPT_LIBS)
123-])
\ No newline at end of file
126+])
--- a/man/man5/afp.conf.5.in
+++ b/man/man5/afp.conf.5.in
@@ -2,12 +2,12 @@
22 .\" Title: afp.conf
33 .\" Author: [FIXME: author] [see http://docbook.sf.net/el/author]
44 .\" Generator: DocBook XSL Stylesheets v1.78.0 <http://docbook.sf.net/>
5-.\" Date: 04 Apr 2016
5+.\" Date: 27 Dec 2016
66 .\" Manual: @NETATALK_VERSION@
77 .\" Source: @NETATALK_VERSION@
88 .\" Language: English
99 .\"
10-.TH "AFP\&.CONF" "5" "04 Apr 2016" "@NETATALK_VERSION@" "@NETATALK_VERSION@"
10+.TH "AFP\&.CONF" "5" "27 Dec 2016" "@NETATALK_VERSION@" "@NETATALK_VERSION@"
1111 .\" -----------------------------------------------------------------
1212 .\" * Define some portability stuff
1313 .\" -----------------------------------------------------------------
@@ -519,13 +519,13 @@ Maximum number of bytes spliced\&.
519519 .PP
520520 use sendfile = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR
521521 .RS 4
522-Whether to use sendfile
522+Whether to use sendfile.\" sendfile
523523 syscall for sending file data to clients\&.
524524 .RE
525525 .PP
526526 zeroconf = \fIBOOLEAN\fR (default: \fIyes\fR) \fB(G)\fR
527527 .RS 4
528-Whether to use automatic Zeroconf
528+Whether to use automatic Zeroconf.\" Zeroconf: Bonjour
529529 service registration if Avahi or mDNSResponder were compiled in\&.
530530 .RE
531531 .SS "Miscellaneous Options"
@@ -678,7 +678,7 @@ and should be quoted\&. Extended characters are allowed\&.
678678 .PP
679679 mimic model = \fImodel\fR \fB(G)\fR
680680 .RS 4
681-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\&.
681+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\&.
682682 .RE
683683 .PP
684684 signature = <text> \fB(G)\fR
@@ -776,6 +776,11 @@ Use section
776776 \fBname\fR
777777 as option preset for all volumes (when set in the [Global] section) or for one volume (when set in that volume\*(Aqs section)\&.
778778 .RE
779+.PP
780+zeroconf name = \fIname\fR \fB(G)\fR
781+.RS 4
782+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\&.
783+.RE
779784 .SS "Logging Options"
780785 .PP
781786 log file = \fIlogfile\fR \fB(G)\fR
@@ -812,7 +817,7 @@ Both logtype and loglevels are case insensitive\&.
812817 .sp .5v
813818 .RE
814819 .RE
815-.SS "Filesystem Change Events (FCE)"
820+.SS "Filesystem Change Events (FCE.\" FCE )"
816821 .PP
817822 Netatalk includes a nifty filesystem change event mechanism where afpd processes notify interested listeners about certain filesystem event by UDP network datagrams\&.
818823 .PP
@@ -1193,7 +1198,7 @@ set the CNID backend to be used for the volume, default is [@DEFAULT_CNID_SCHEME
11931198 .PP
11941199 ea = \fInone|auto|sys|ad|samba\fR \fB(V)\fR
11951200 .RS 4
1196-Specify how Extended Attributes
1201+Specify how Extended Attributes.\" Extended Attributes
11971202 are stored\&.
11981203 \fBauto\fR
11991204 is the default\&.
旧リポジトリブラウザで表示