From owner-freebsd-stable@FreeBSD.ORG Sat Jun 22 00:54:46 2013 Return-Path: Delivered-To: freebsd-stable@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 309BDBC7 for ; Sat, 22 Jun 2013 00:54:46 +0000 (UTC) (envelope-from delphij@delphij.net) Received: from anubis.delphij.net (anubis.delphij.net [IPv6:2001:470:1:117::25]) by mx1.freebsd.org (Postfix) with ESMTP id 029791286 for ; Sat, 22 Jun 2013 00:54:46 +0000 (UTC) Received: from zeta.ixsystems.com (drawbridge.ixsystems.com [206.40.55.65]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by anubis.delphij.net (Postfix) with ESMTPSA id A6C971B082; Fri, 21 Jun 2013 17:54:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=delphij.net; s=anubis; t=1371862485; bh=IW3t3qla5YHXSgfkVfoaTNcAh03+rgNX5FqcKACqRrs=; h=Date:From:Reply-To:To:CC:Subject:References:In-Reply-To; b=2bp5+jDo7r+16DhVmAZ9TATQ/TF8DEVgk1yJpApmPVaK7uFXeO2x4mkj33ziM2foh yuMYDKgxLAvfsrBztDMwCK223sl5ERhdDi1a17/OPawze9HPy+NxaIJ/L1Xdd2t/x6 w9ixjX1nN8L9LuknKx937NXD9ZODnqEJn3kzKpbk= Message-ID: <51C4F5D4.6000802@delphij.net> Date: Fri, 21 Jun 2013 17:54:44 -0700 From: Xin Li Organization: The FreeBSD Project MIME-Version: 1.0 To: Miroslav Lachman <000.fbsd@quip.cz> Subject: Re: Another bug in SSH in FreeBSD 8.4 (sftp cannot create relative symlinks) References: <51C4DBFE.1010809@quip.cz> In-Reply-To: <51C4DBFE.1010809@quip.cz> X-Enigmail-Version: 1.5.1 Content-Type: multipart/mixed; boundary="------------000703050507020503070804" Cc: freebsd-stable@FreeBSD.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: d@delphij.net List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 22 Jun 2013 00:54:46 -0000 This is a multi-part message in MIME format. --------------000703050507020503070804 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512 On 06/21/13 16:04, Miroslav Lachman wrote: > 1) Is there some way to create relative symlinks with OpenSSH 6.1? No. It seems like a regression and can not be worked around. I do have a patch (attached; against crypto/openssh/), and my test shows that it would fix the problem. > 2) Was OpenSSH 6.1 tested before importing in to the base of > FreeBSD 8.4 release? These two bugs seems serious to me. This code is not new: it was in OpenBSD 3 years ago, and in FreeBSD for more than 2 years (r221420 or 2011-05-04); OpenSSH 6.1 was imported last September. This issue you have just raised have been there since FreeBSD 9.0-RELEASE. So to me it seems like that the two issues are either rarely hit by the general public (counting myself in: I have never used sftp to create symbolic link remotely and have thus learned something new today), or those who hit this have choose to keep silent about it. Fortunately we have you noticed and reported the problem. As a community effort, we really *need* people to grab in-development snapshots and provide us the feedback. > 3) Is there any chance to fix these bugs in FreeBSD repository, or > do we need to be "bug to bug" compatible with other systems using > OpenSSH 6.x? I can not make a promise as I am not the maintainer. However, I have already reported this issue to upstream OpenBSD developers, so if this was accepted by the upstream, we will commit the change locally to fix the issue. Unfortunately, it is too late to fix this for 8.4-RELEASE, and unless we see widespread complain, I don't think the problem would affect a significant amount of users to warrant a "errata" for supported release (8.4-RELEASE, 9.1-RELEASE), however, if it would be fixed, the fix would be merged to 8-STABLE and 9-STABLE and will be shipped with future releases, if the fix enters the development branch before them. Cheers, - -- Xin LI https://www.delphij.net/ FreeBSD - The Power to Serve! Live free or die -----BEGIN PGP SIGNATURE----- iQEcBAEBCgAGBQJRxPXUAAoJEG80Jeu8UPuzzRAH/AnNKnmsb6vX9LCNRsLtb2SG bk2J4lx5XLK3sCYEeSL/npBtpwShGLMRnfTeb7oAPBU0skzpppHDpvwp8aIZUAGB uMwMrln2YPKYfUJvtkPdUC+5Jm8OHnxwoYepOXkZSQy8R3ii1Q2Kpk9uGbez1i2i iFaP+bQoCJxX8NdTRE/WrPjpfgq8KvUOowBn21dGLZ+MGUL5RlffvrOgth8Py4rp ByekHuvwNz0i5wxILmriPKg04MhI8Ljy6Y8KxjZhn6v3fjEO7D5FvVlJP8us9iu0 AsFbnkBOvaYxJFDCmlh7u4fumCcsvtwmsmNbiqFRdQVbDuyMdvf880kNrmgCb5k= =vS/U -----END PGP SIGNATURE----- --------------000703050507020503070804 Content-Type: text/plain; charset=UTF-8; name="sftp.diff" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="sftp.diff" Index: usr.bin/ssh/sftp.c =================================================================== RCS file: /home/openbsd/src/usr.bin/ssh/sftp.c,v retrieving revision 1.143 diff -u -p -u -r1.143 sftp.c --- usr.bin/ssh/sftp.c 18 Apr 2013 02:16:07 -0000 1.143 +++ usr.bin/ssh/sftp.c 22 Jun 2013 00:26:00 -0000 @@ -1313,7 +1313,6 @@ parse_dispatch_command(struct sftp_conn case I_SYMLINK: sflag = 1; case I_LINK: - path1 = make_absolute(path1, *pwd); path2 = make_absolute(path2, *pwd); err = (sflag ? do_symlink : do_hardlink)(conn, path1, path2); break; --------------000703050507020503070804--