From 751d64025f67454ddca1af36509e74a9462f0397 Mon Sep 17 00:00:00 2001 From: Joe Marcus Clarke Date: Fri, 9 May 2014 17:51:27 +0000 Subject: 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 --- net/netatalk3/files/patch-libatalk_vfs_extattr.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 net/netatalk3/files/patch-libatalk_vfs_extattr.c (limited to 'net/netatalk3/files/patch-libatalk_vfs_extattr.c') 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; -- cgit v1.2.3