Date: Sat, 11 Jun 2011 13:42:15 +0300 From: Kostik Belousov <kostikbel@gmail.com> To: Jaakko Heinonen <jh@freebsd.org> Cc: "Justin T. Gibbs" <gibbs@scsiguy.com>, fs@freebsd.org Subject: Re: [CFT] Fix DEVFS aliases in subdirectories. Message-ID: <20110611104215.GG48734@deviant.kiev.zoral.com.ua> In-Reply-To: <20110611070939.GC10793@jh> References: <4DF287F0.8080301@scsiguy.com> <20110611070939.GC10793@jh>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Sat, Jun 11, 2011 at 10:09:40AM +0300, Jaakko Heinonen wrote:
>
> Hi,
>
> 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.
> >
> > Are there any objections to the attached change?
>
> > @@ -584,14 +584,43 @@
> >
> > de = devfs_newdirent(s, q - s);
> > if (cdp->cdp_c.si_flags & SI_ALIAS) {
> > + char *slash;
> > + int depth;
> > + int namelen;
> > + int buflen;
> > + int i;
>
> 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.
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.11 (FreeBSD)
iEYEARECAAYFAk3zRocACgkQC3+MBN1Mb4gfeACg7gCPLo72qG3WH1Yo6RMQ3m0s
PM8AoKCsMOCF1VpynIw3shPgPnj7wV35
=QyX2
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110611104215.GG48734>
