Date: Sat, 11 Jun 2011 22:27:48 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Jaakko Heinonen <jh@freebsd.org>, "Justin T. Gibbs" <gibbs@scsiguy.com>, fs@freebsd.org Subject: Re: [CFT] Fix DEVFS aliases in subdirectories. Message-ID: <20110611192748.GM48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110611104215.GG48734@deviant.kiev.zoral.com.ua> References: <4DF287F0.8080301@scsiguy.com> <20110611070939.GC10793@jh> <20110611104215.GG48734@deviant.kiev.zoral.com.ua>
next in thread | previous in thread | raw e-mail | index | archive | help
--1o9f3WYkqpI1o9iD Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jun 11, 2011 at 01:42:15PM +0300, Kostik Belousov wrote: > 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. Just remembered, sometimes links on the devfs point out of devfs. Look, for instance, on the /dev/log symlink on the running system. pooma% ls -l /dev/log lrwxr-xr-x 1 root wheel 12 Jun 11 21:08 /dev/log -> /var/run/log Wouldn't the patch break it ? >=20 > > >=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. --1o9f3WYkqpI1o9iD Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iEYEARECAAYFAk3zwbMACgkQC3+MBN1Mb4hnEQCdEGXGwWNZvFuIz9enb+ikMmTt SygAoK3KEWyUPrpaAH8dHWLaCDH1esNW =hRw0 -----END PGP SIGNATURE----- --1o9f3WYkqpI1o9iD--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110611192748.GM48734>