Git Product home page Git Product logo

Comments (8)

mpartel avatar mpartel commented on September 17, 2024 1

Works on Linux, so appears to be a limitation of MacOS or fuse-t.

from bindfs.

slonopotamus avatar slonopotamus commented on September 17, 2024

Works on Linux

Confirming, btw. Next time I'll first test on Linux before creating an issue :D Sorry for the noise.

Reported to:

from bindfs.

mpartel avatar mpartel commented on September 17, 2024

Actually I may have been hasty :)
Some things need MacOS-specific functions. But I just checked and didn't find any obvious API related to domain sockets.

You (sorry, I've no access to a mac at the moment) could check with bindfs -d -f ... what, if any, call nc ends up making into bindfs. If no call is made then it's pretty clearly a fuse problem. Otherwise, perhaps we need an additional special case in mknod or something.

from bindfs.

slonopotamus avatar slonopotamus commented on September 17, 2024

Output of bindfs -d -f ... produced during nc -U <path> -l:

With macFUSE:

unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 405
getattr /
   unique: 2, success, outsize: 136
unique: 3, opcode: GETXATTR (22), nodeid: 1, insize: 77, pid: 405
getxattr / com.apple.FinderInfo 32 0
   unique: 3, success, outsize: 48
unique: 2, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 111
getattr /
   unique: 2, success, outsize: 136
unique: 3, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 698
LOOKUP /sock
getattr /sock
   unique: 3, error: -2 (No such file or directory), outsize: 16
unique: 2, opcode: MKNOD (8), nodeid: 1, insize: 61, pid: 698
mknod /sock 0140755 0x0 umask=0000
   unique: 2, error: -22 (Invalid argument), outsize: 16

With fuse-t:

unique: 39, opcode: STATFS (17), nodeid: 1, insize: 40, pid: 0
statfs_x /
   unique: 39, success, outsize: 96
unique: 40, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 0
getattr /
   unique: 40, success, outsize: 136
unique: 41, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 0
LOOKUP /sock
getattr /sock
   unique: 41, error: -2 (No such file or directory), outsize: 16

So, it looks like we have different bugs here?

  1. macFUSE passes mknod call to bindfs, but bindfs fails to handle it
  2. fuse-t doesn't pass mknod to bindfs at all

For the reference, here's how nc -U sock -l through bindfs looks on Linux:

unique: 64, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 16753
getattr[NULL] /
   unique: 64, success, outsize: 120
unique: 66, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 16753
LOOKUP /sock
getattr[NULL] /sock
   unique: 66, error: -2 (No such file or directory), outsize: 16
unique: 68, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 16753
getattr[NULL] /
   unique: 68, success, outsize: 120
unique: 70, opcode: LOOKUP (1), nodeid: 1, insize: 45, pid: 16753
LOOKUP /sock
getattr[NULL] /sock
   unique: 70, error: -2 (No such file or directory), outsize: 16
unique: 72, opcode: GETATTR (3), nodeid: 1, insize: 56, pid: 16753
getattr[NULL] /
   unique: 72, success, outsize: 120
unique: 74, opcode: MKNOD (8), nodeid: 1, insize: 61, pid: 16753
mknod /sock 0140755 0x0 umask=0022
getattr[NULL] /sock
   NODEID: 3
   unique: 74, success, outsize: 144

from bindfs.

slonopotamus avatar slonopotamus commented on September 17, 2024

In macos-fuse-t/fuse-t#31, I was given this link: https://libfuse.github.io/doxygen/example_2passthrough__helpers_8h_source.html. mknod in bindfs doesn't currently have any special handling for S_ISSOCK. Maybe it should?

from bindfs.

slonopotamus avatar slonopotamus commented on September 17, 2024

@mpartel what do you think?

My current understanding is that

  1. There's missing functionality in fuse-t: it doesn't call mknod at all
  2. There's missing support for S_ISSOCK in bindfs mknod implementation
  3. macFUSE works properly

I suggest reopening this issue and will try to fix №2 (and send a PR).

from bindfs.

mpartel avatar mpartel commented on September 17, 2024

Yes, that seems likely. Thanks! And apologies, this week it's especially difficult for me to anything mac-related.

from bindfs.

slonopotamus avatar slonopotamus commented on September 17, 2024

See #133. With those fixes, I'm able to talk with nc over AF_UNIX socket created inside bindfs-mounted dir.

from bindfs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.