From owner-freebsd-bugs@FreeBSD.ORG Wed Nov 27 23:10:01 2013 Return-Path: Delivered-To: freebsd-bugs@smarthost.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 186C9ADC for ; Wed, 27 Nov 2013 23:10:01 +0000 (UTC) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:1900:2254:206c::16:87]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id CDF6627E for ; Wed, 27 Nov 2013 23:10:00 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.7/8.14.7) with ESMTP id rARNA07x098072 for ; Wed, 27 Nov 2013 23:10:00 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.7/8.14.7/Submit) id rARNA0Zt098071; Wed, 27 Nov 2013 23:10:00 GMT (envelope-from gnats) Resent-Date: Wed, 27 Nov 2013 23:10:00 GMT Resent-Message-Id: <201311272310.rARNA0Zt098071@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, David Cundiff Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id F3870A6F for ; Wed, 27 Nov 2013 23:03:31 +0000 (UTC) Received: from oldred.freebsd.org (oldred.freebsd.org [8.8.178.121]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.freebsd.org (Postfix) with ESMTPS id E01BF24F for ; Wed, 27 Nov 2013 23:03:31 +0000 (UTC) Received: from oldred.freebsd.org ([127.0.1.6]) by oldred.freebsd.org (8.14.5/8.14.7) with ESMTP id rARN3VNi051804 for ; Wed, 27 Nov 2013 23:03:31 GMT (envelope-from nobody@oldred.freebsd.org) Received: (from nobody@localhost) by oldred.freebsd.org (8.14.5/8.14.5/Submit) id rARN3VKr051794; Wed, 27 Nov 2013 23:03:31 GMT (envelope-from nobody) Message-Id: <201311272303.rARN3VKr051794@oldred.freebsd.org> Date: Wed, 27 Nov 2013 23:03:31 GMT From: David Cundiff To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Subject: misc/184340: PATH_MAX not interoperable with Linux X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.16 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 27 Nov 2013 23:10:01 -0000 >Number: 184340 >Category: misc >Synopsis: PATH_MAX not interoperable with Linux >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: update >Submitter-Id: current-users >Arrival-Date: Wed Nov 27 23:10:00 UTC 2013 >Closed-Date: >Last-Modified: >Originator: David Cundiff >Release: 9.2-RELEASE >Organization: A2hosting >Environment: FreeBSD rsync6.a2hosting.com 9.2-STABLE FreeBSD 9.2-STABLE #0: Thu Oct 31 22:09:39 UTC 2013 root@snap.freebsd.org:/usr/obj/usr/src/sys/GENERIC amd64 >Description: PATH_MAX in is not interoperable with Linux when transferring files with Rsync. Since file paths can be much longer on Linux(4096 bytes) Rsync will crash as it sets up a buffer based on PATH_MAX. Also as unicode use increases a PATH_MAX of 1024 would limit paths to 256 32-bit unicode characters. Using 4096 bytes unicode paths could be 1024 characters. Sure Rsync could change the value in their source, however, there could be other programs that are used between FreeBSD and Linux that use the value and will have trouble. This is defined in the kernel headers /usr/src/sys/sys/syslimits.h:#define PATH_MAX 1024 /* max bytes in pathname */ >How-To-Repeat: Copy a file from a Linux machine to a FreeBSD machine where the pathname is greater than 1024 characters. >Fix: Change PATH_MAX in kernel to 4096 from 1024. Should be harmless and will fix the issue in any program that uses PATH_MAX from the kernel headers. Also would allow longer 32-bit unicode paths. >Release-Note: >Audit-Trail: >Unformatted: