On Fri, Jul 13, 2012 at 11:26:22AM +0000, [email protected] wrote:
> http://defect.opensolaris.org/bz/show_bug.cgi?id=19197
> 
> --- Comment #3 from Knut Anders Hatlen <[email protected]> 2012-07-13 
> 11:26:15 UTC ---
> Had an offline discussion with Steven about this issue, and it turns out I can
> reproduce it if the project directories are not actual directories, but rather
> symbolic links to other directories.
> 
> The problem seems to be present regardless of which cache back-end we use
> (happens with both FileHistoryCache and JDBCHistoryCache).

Hmmm, I think, the cause of the problem are all the
File.get{Absolute|Canonical}Path(), which resolve symlinks.

IMHO possible way to fix: Avoid absolute path usage completely and
establish some basic rules.

E.g.: Actually DATAROOT and SOURCEROOT should be the only absolute pathes
used in opengrok without any exception. Project pathes should be allowed
to be symlinks (or better, make this an app property) and should be
recorded/used always relative to *ROOT. I.e. if a project dir is
foo/bar -> /var/tmp/foo ,  foo/bar should be used/recorded as repo
path/project dir. And analog all files in that repo/project should be 
used/recorded as relative path wrt. the repo path/project dir. One may
give opengrok a per project property to [not] allow following symlinks ...
Unfortunately the Java File API is a little bit limited to accomplish
this in a more or less easy way. So IMHO it is probably the best to
postpone a fix 'til 1.7 (Path API) can be used.

Regards,
jel.
-- 
Otto-von-Guericke University     http://www.cs.uni-magdeburg.de/
Department of Computer Science   Geb. 29 R 027, Universitaetsplatz 2
39106 Magdeburg, Germany         Tel: +49 391 67 12768
_______________________________________________
opengrok-dev mailing list
[email protected]
http://mail.opensolaris.org/mailman/listinfo/opengrok-dev

Reply via email to