Menu

#562 EAs do not work properly with Mac OS

None
closed
nobody
None
1
2014-05-20
2014-05-06
No

iAppy 144% l -@ fred
-rwxr-xr-x@ 1 sef staff 29 May 6 10:40 fred
wilma -1

This is getting ENOATTR; some investigation shows that this appears to be due to libatalk/vfs/extattr.c, which does not check for 0 when getting an ea. This patch might fix it; I haven't been able to build and test yet.

--- ./libatalk/vfs/extattr.c 2013-10-18 04:57:33.000000000 -0700
+++ /tmp/extattr.c 2014-05-06 11:31:34.000000000 -0700
@@ -241,6 +241,10 @@
#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;

Discussion

  • AxeL

    AxeL - 2014-05-15

    I can confirm the patch fix the problem.
    By looking at the code, it seems the size check is missed also in another place.

    Patch is attached.
    Regards

     

    Last edit: AxeL 2014-05-15
  • Ralph Böhme

    Ralph Böhme - 2014-05-16

    Hey, you guys signed the FreeBSD foundation non-disclosure agreement or what?! :)
    The xattr stuff works correctly on Linux and Solaris, so when reading this bug I thought "hey, what are they talking about, works for me.". I'll try to add a proper fix for this next week.

     
  • Ralph Böhme

    Ralph Böhme - 2014-05-20

    Fixed for 3.1.2 in [a04d24be19aa000f89ee22d0197da4689cc487b2].

     

    Related

    Commit: [a04d24]

  • Ralph Böhme

    Ralph Böhme - 2014-05-20
    • status: open --> closed
    • Group: -->
     

Log in to post a comment.

MongoDB Logo MongoDB