diff options
author | marcus <marcus@FreeBSD.org> | 2014-05-10 01:51:27 +0800 |
---|---|---|
committer | marcus <marcus@FreeBSD.org> | 2014-05-10 01:51:27 +0800 |
commit | f9b81e5af6d25c540670ecd723edfd2f8300ef9b (patch) | |
tree | d4bfd13eed8c7e6e3551edcdae137e035e5604ae /net/netatalk3 | |
parent | 3b4a608bf20f835b7d67f664cbb509b16c75bf65 (diff) | |
download | freebsd-ports-gnome-f9b81e5af6d25c540670ecd723edfd2f8300ef9b.tar.gz freebsd-ports-gnome-f9b81e5af6d25c540670ecd723edfd2f8300ef9b.tar.zst freebsd-ports-gnome-f9b81e5af6d25c540670ecd723edfd2f8300ef9b.zip |
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@Kithrup.COM>
Diffstat (limited to 'net/netatalk3')
-rw-r--r-- | net/netatalk3/Makefile | 1 | ||||
-rw-r--r-- | net/netatalk3/files/patch-libatalk_vfs_extattr.c | 13 |
2 files changed, 14 insertions, 0 deletions
diff --git a/net/netatalk3/Makefile b/net/netatalk3/Makefile index f6d0610ed4c2..d5741b9ca052 100644 --- a/net/netatalk3/Makefile +++ b/net/netatalk3/Makefile @@ -3,6 +3,7 @@ PORTNAME= netatalk PORTVERSION= 3.1.1 +PORTREVISION= 1 PORTEPOCH= 1 CATEGORIES= net MASTER_SITES= SF diff --git a/net/netatalk3/files/patch-libatalk_vfs_extattr.c b/net/netatalk3/files/patch-libatalk_vfs_extattr.c new file mode 100644 index 000000000000..bd131a104129 --- /dev/null +++ b/net/netatalk3/files/patch-libatalk_vfs_extattr.c @@ -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; |