From owner-freebsd-bugs@FreeBSD.ORG Wed Oct 20 12:00:51 2004 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1882316A4CE for ; Wed, 20 Oct 2004 12:00:51 +0000 (GMT) Received: from freefall.freebsd.org (freefall.freebsd.org [216.136.204.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id DD18243D67 for ; Wed, 20 Oct 2004 12:00:50 +0000 (GMT) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.12.11/8.12.11) with ESMTP id i9KC0oO9041532 for ; Wed, 20 Oct 2004 12:00:50 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.12.11/8.12.11/Submit) id i9KC0oqI041522; Wed, 20 Oct 2004 12:00:50 GMT (envelope-from gnats) Resent-Date: Wed, 20 Oct 2004 12:00:50 GMT Resent-Message-Id: <200410201200.i9KC0oqI041522@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Andriy Gapon Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4B75C16A4CE for ; Wed, 20 Oct 2004 11:50:41 +0000 (GMT) Received: from www.freebsd.org (www.freebsd.org [216.136.204.117]) by mx1.FreeBSD.org (Postfix) with ESMTP id 3E01643D46 for ; Wed, 20 Oct 2004 11:50:41 +0000 (GMT) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.12.11/8.12.11) with ESMTP id i9KBoe6C087732 for ; Wed, 20 Oct 2004 11:50:40 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.12.11/8.12.11/Submit) id i9KBoemF087731; Wed, 20 Oct 2004 11:50:40 GMT (envelope-from nobody) Message-Id: <200410201150.i9KBoemF087731@www.freebsd.org> Date: Wed, 20 Oct 2004 11:50:40 GMT From: Andriy Gapon To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-2.3 Subject: kern/72920: linux emulation : path "prefixing" is not done on unix domain socket addresses X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Oct 2004 12:00:51 -0000 >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: