You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@subversion.apache.org by Lachlan O'Dea <od...@ca.com> on 2004/04/14 02:57:52 UTC

[PATCH] svnlook and symlinked /tmp

Hi,

Sorry if this is a repost, but my previous message didn't seem to 
appear on the list...

I'm running Subversion 1.0.1 on FreeBSD 5.2.1. svnlook is having 
trouble with my /tmp directory:

isis /tmp > svnlook diff /home/svn/repos -r 15
svn: Error creating dir '/tmp' (path exists)
svn: Can't open file '/tmp/svnlook.1/arclib/Makefile': No such file or 
directory

This happens because my /tmp happens to be a symbolic link. If I point 
TMPDIR at a real directory it works. I think the correct fix is to have 
svnlook use svn_io_check_resolved_path in open_writable_binary_file:

--- main.c.orig Wed Apr  7 11:50:37 2004
+++ main.c      Wed Apr  7 12:19:39 2004
@@ -515,7 +515,7 @@
        svn_node_kind_t kind;
        const char *piece = ((const char **) (path_pieces->elts))[i];
        full_path = svn_path_join (full_path, piece, pool);
-      SVN_ERR (svn_io_check_path (full_path, &kind, pool));
+      SVN_ERR (svn_io_check_resolved_path (full_path, &kind, pool));

        /* Does this path component exist at all? */
        if (kind == svn_node_none)


It worked for me.

--
Lachlan O'Dea
Computer Associates
Senior Software Engineer
tel: +61 3 8416 5627
fax: +61 3 8416 5810
mobile: +61 412 390 650
odela01@ca.com

Relax and enjoy your shoes!


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org

Re: [PATCH] svnlook and symlinked /tmp

Posted by Ben Reser <be...@reser.org>.
On Wed, Apr 14, 2004 at 12:57:52PM +1000, Lachlan O'Dea wrote:
> Hi,
> 
> Sorry if this is a repost, but my previous message didn't seem to 
> appear on the list...
> 
> I'm running Subversion 1.0.1 on FreeBSD 5.2.1. svnlook is having 
> trouble with my /tmp directory:
> 
> isis /tmp > svnlook diff /home/svn/repos -r 15
> svn: Error creating dir '/tmp' (path exists)
> svn: Can't open file '/tmp/svnlook.1/arclib/Makefile': No such file or 
> directory
> 
> This happens because my /tmp happens to be a symbolic link. If I point 
> TMPDIR at a real directory it works. I think the correct fix is to have 
> svnlook use svn_io_check_resolved_path in open_writable_binary_file:
> 
> --- main.c.orig Wed Apr  7 11:50:37 2004
> +++ main.c      Wed Apr  7 12:19:39 2004
> @@ -515,7 +515,7 @@
>        svn_node_kind_t kind;
>        const char *piece = ((const char **) (path_pieces->elts))[i];
>        full_path = svn_path_join (full_path, piece, pool);
> -      SVN_ERR (svn_io_check_path (full_path, &kind, pool));
> +      SVN_ERR (svn_io_check_resolved_path (full_path, &kind, pool));
> 
>        /* Does this path component exist at all? */
>        if (kind == svn_node_none)

Looks good to me.  ISTR we've fixed a similar problem elsewhere.

-- 
Ben Reser <be...@reser.org>
http://ben.reser.org

"Conscience is the inner voice which warns us somebody may be looking."
- H.L. Mencken

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org