svn commit: r353481 - in head/net/netatalk3: . files

Joe Marcus Clarke marcus at FreeBSD.org
Fri May 9 17:51:27 UTC 2014


Author: marcus
Date: Fri May  9 17:51:27 2014
New Revision: 353481
URL: http://svnweb.freebsd.org/changeset/ports/353481
QAT: https://qat.redports.org/buildarchive/r353481/

Log:
  Fix the behavior of sys_lgetxattr() so that it mimics that of Linux where a
  size argument of 0 will return the required size of the extended attribute.
  
  Submitted by:   Sean Eric Fagan <sef at Kithrup.COM>

Added:
  head/net/netatalk3/files/patch-libatalk_vfs_extattr.c   (contents, props changed)
Modified:
  head/net/netatalk3/Makefile

Modified: head/net/netatalk3/Makefile
==============================================================================
--- head/net/netatalk3/Makefile	Fri May  9 17:47:15 2014	(r353480)
+++ head/net/netatalk3/Makefile	Fri May  9 17:51:27 2014	(r353481)
@@ -3,6 +3,7 @@
 
 PORTNAME=	netatalk
 PORTVERSION=	3.1.1
+PORTREVISION=	1
 PORTEPOCH=	1
 CATEGORIES=	net
 MASTER_SITES=	SF

Added: head/net/netatalk3/files/patch-libatalk_vfs_extattr.c
==============================================================================
--- /dev/null	00:00:00 1970	(empty, because file is newly added)
+++ head/net/netatalk3/files/patch-libatalk_vfs_extattr.c	Fri May  9 17:51:27 2014	(r353481)
@@ -0,0 +1,13 @@
+--- libatalk/vfs/extattr.c.orig	2014-05-09 13:42:40.000000000 -0400
++++ libatalk/vfs/extattr.c	2014-05-09 13:45:39.000000000 -0400
+@@ -241,6 +241,10 @@ ssize_t sys_lgetxattr (const char *path,
+ #elif defined(HAVE_EXTATTR_GET_LINK)
+ 	ssize_t retval;
+ 	if((retval=extattr_get_link(path, EXTATTR_NAMESPACE_USER, uname, NULL, 0)) >= 0) {
++		if (size == 0) {
++			/* size == 0 means only return size */
++			return retval;
++		}
+ 		if(retval > size) {
+ 			errno = ERANGE;
+ 			return -1;


More information about the svn-ports-head mailing list