unix domain sockets in linux emulation
Andriy Gapon
avg at icyb.net.ua
Fri Oct 15 06:58:38 PDT 2004
It seems that pathname "prefixing" is not performed for unix domain
socket calls in linux emulation e.g. "/compat/linux" prefix is never
tried to be prepended for bind() and connect() calls.
This leads to linux applications failing in scenarios like this:
<pseudo-code>
mkdir("/tmp/foo");
//this will create /compat/linux/tmp/foo/ directory
s = socket(AF_LOCAL, SOCK_DGRAM, PF_LOCAL);
strcpy(addr.sun_path, "/tmp/foo/bar");
addr.sun_family = AF_LOCAL;
bind(s, (struct sockaddr *) &addr, SUN_LEN(&addr));
//this will try to bind socket in /tmp/foo/ directory
//which does not exist
</pseudo-code>
voila
Existence of this problem can be easily verified using the above code.
I have experinced this problem on FreeBSD 5.2.1 with two real-life
applications:
oracle 9.2.0.4.0
IBM WebSphere MQ 5.3
Should this be considered as a bug or a feature ?
--
Andriy Gapon
More information about the freebsd-emulation
mailing list