Date: Fri, 15 Oct 2004 16:58:32 +0300 From: Andriy Gapon <avg@icyb.net.ua> To: freebsd-emulation@freebsd.org Subject: unix domain sockets in linux emulation Message-ID: <416FD788.3090605@icyb.net.ua>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?416FD788.3090605>
