Closed Bug 979535 Opened 11 years ago Closed 7 years ago

Cannot open unix domain sockets in abstract namespace

Categories

(Core :: Networking, defect, P5)

x86_64
Linux
defect

Tracking

()

RESOLVED DUPLICATE of bug 1462019

People

(Reporter: christophg+mozilla, Unassigned)

Details

(Whiteboard: [necko-would-take])

User Agent: Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release) Build ID: 20140218140359 Steps to reproduce: There is currently no way to open an abstract unix domain socket on Linux from Javascript extension code, as neither nsFile doesn't accept a path starting with a nul-byte and nsSocketTransportService.createUnixDomainTransport offers no flag to specify opening in the abstract namespace. const FileFromPath = CC("@mozilla.org/file/local;1", "nsILocalFile", "initWithPath"); var file = FileFromPath('\0/tmp/socket'); var socket = socketTransportService.createUnixDomainTransport(file); Actual results: I get an error on FileFromPath('\0/tmp/socket'): NS_ERROR_FILE_UNRECOGNIZED_PATH: Component returned failure code: 0x80520001 (NS_ERROR_FILE_UNRECOGNIZED_PATH) [nsILocalFile.initWithPath]
The problem still exists. My reason for this is a DBus implementation I wrote in Javascript ( https://gitlab.com/cg909/xpi-dbus ). The DBus session bus on Linux uses abstract domain sockets by default, so I had to work around this bug by executing socat to proxy the bus connection.
Whiteboard: [necko-would-take]
Priority: -- → P5
This is supported by bug 1462019
Status: UNCONFIRMED → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.