From owner-freebsd-fs@FreeBSD.ORG Sat Jun 11 11:14:19 2011 Return-Path: Delivered-To: fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 02E28106564A for ; Sat, 11 Jun 2011 11:14:19 +0000 (UTC) (envelope-from kostikbel@gmail.com) Received: from mail.zoral.com.ua (mx0.zoral.com.ua [91.193.166.200]) by mx1.freebsd.org (Postfix) with ESMTP id D8A3E8FC08 for ; Sat, 11 Jun 2011 11:14:17 +0000 (UTC) Received: from deviant.kiev.zoral.com.ua (root@deviant.kiev.zoral.com.ua [10.1.1.148]) by mail.zoral.com.ua (8.14.2/8.14.2) with ESMTP id p5BAgI20061345 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Sat, 11 Jun 2011 13:42:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: from deviant.kiev.zoral.com.ua (kostik@localhost [127.0.0.1]) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4) with ESMTP id p5BAgIWO016972; Sat, 11 Jun 2011 13:42:18 +0300 (EEST) (envelope-from kostikbel@gmail.com) Received: (from kostik@localhost) by deviant.kiev.zoral.com.ua (8.14.4/8.14.4/Submit) id p5BAgFMQ016971; Sat, 11 Jun 2011 13:42:16 +0300 (EEST) (envelope-from kostikbel@gmail.com) X-Authentication-Warning: deviant.kiev.zoral.com.ua: kostik set sender to kostikbel@gmail.com using -f Date: Sat, 11 Jun 2011 13:42:15 +0300 From: Kostik Belousov To: Jaakko Heinonen Message-ID: <20110611104215.GG48734@deviant.kiev.zoral.com.ua> References: <4DF287F0.8080301@scsiguy.com> <20110611070939.GC10793@jh> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="13nVYX24B/ovCM08" Content-Disposition: inline In-Reply-To: <20110611070939.GC10793@jh> User-Agent: Mutt/1.4.2.3i X-Virus-Scanned: clamav-milter 0.95.2 at skuns.kiev.zoral.com.ua X-Virus-Status: Clean X-Spam-Status: No, score=-3.3 required=5.0 tests=ALL_TRUSTED,AWL,BAYES_00, DNS_FROM_OPENWHOIS autolearn=no version=3.2.5 X-Spam-Checker-Version: SpamAssassin 3.2.5 (2008-06-10) on skuns.kiev.zoral.com.ua Cc: "Justin T. Gibbs" , fs@freebsd.org Subject: Re: [CFT] Fix DEVFS aliases in subdirectories. X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2011 11:14:19 -0000 --13nVYX24B/ovCM08 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 11, 2011 at 10:09:40AM +0300, Jaakko Heinonen wrote: >=20 > Hi, >=20 > On 2011-06-10, Justin T. Gibbs wrote: > > The aliased devs are far from the root and so must have "../" entries > > added in order to function correctly. I considered making the symlink > > paths absolute, but that complicates jail handling. Alternatively, you might change devfs_readlink, prepending the absolute symlinks with the statfs.f_mntonname. This indeed would have to consider the case of a jailed process. No, I am not requesting this. > >=20 > > Are there any objections to the attached change? >=20 > > @@ -584,14 +584,43 @@ > > =20 > > de =3D devfs_newdirent(s, q - s); > > if (cdp->cdp_c.si_flags & SI_ALIAS) { > > + char *slash; > > + int depth; > > + int namelen; > > + int buflen; > > + int i; >=20 > style(9) discourages putting declarations inside blocks. Please consider > putting symlink name generation to its own helper function. > devfs_populate_loop() has already become too large. --13nVYX24B/ovCM08 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3zRocACgkQC3+MBN1Mb4gfeACg7gCPLo72qG3WH1Yo6RMQ3m0s PM8AoKCsMOCF1VpynIw3shPgPnj7wV35 =QyX2 -----END PGP SIGNATURE----- --13nVYX24B/ovCM08--