From owner-freebsd-emulation@FreeBSD.ORG Fri Oct 15 13:58:37 2004 Return-Path: Delivered-To: freebsd-emulation@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id EBDA416A4CE for ; Fri, 15 Oct 2004 13:58:37 +0000 (GMT) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4551443D1D for ; Fri, 15 Oct 2004 13:58:36 +0000 (GMT) (envelope-from avg@icyb.net.ua) Received: from [212.40.38.87] (oddity.topspin.kiev.ua [212.40.38.87]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id QAA12680 for ; Fri, 15 Oct 2004 16:58:33 +0300 (EEST) (envelope-from avg@icyb.net.ua) Message-ID: <416FD788.3090605@icyb.net.ua> Date: Fri, 15 Oct 2004 16:58:32 +0300 From: Andriy Gapon User-Agent: Mozilla Thunderbird 0.7.3 (X11/20040831) X-Accept-Language: en-us, en MIME-Version: 1.0 To: freebsd-emulation@freebsd.org Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Subject: unix domain sockets in linux emulation X-BeenThere: freebsd-emulation@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Development of Emulators of other operating systems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Oct 2004 13:58:38 -0000 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: 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 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