Date: Wed, 20 Oct 2004 11:50:40 GMT From: Andriy Gapon <avg@icyb.net.ua> To: freebsd-gnats-submit@FreeBSD.org Subject: kern/72920: linux emulation : path "prefixing" is not done on unix domain socket addresses Message-ID: <200410201150.i9KBoemF087731@www.freebsd.org> Resent-Message-ID: <200410201200.i9KC0oqI041522@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 72920 >Category: kern >Synopsis: linux emulation : path "prefixing" is not done on unix domain socket addresses >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Wed Oct 20 12:00:50 GMT 2004 >Closed-Date: >Last-Modified: >Originator: Andriy Gapon >Release: 5.2.1-RELEASE-p11 >Organization: >Environment: 5.2.1-RELEASE-p11 i386 >Description: 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. When mixed with filesystem calls this leads to linux applications failing in scenarios like this: 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 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 >How-To-Repeat: Existence of this problem can be easily verified using a small program with the above code (make sure /tmp/foo directory is not existant). >Fix: fix should not be very hard to implement, but I'd prefer that someone more familiar with the code would do it (someone who wrote the similar code for filesystem calls). >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200410201150.i9KBoemF087731>