[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: svn commit: r16244 - in trunk: . subversion/clients/cmdline subversion/include subversion/libsvn_client subversion/libsvn_wc subversion/svnversion subversion/tests/clients/cmdline subversion/tests/clients/cmdline/svntest tools/examples

From: Branko Čibej <brane_at_xbc.nu>
Date: 2005-09-25 04:48:46 CEST

Garrett Rooney wrote:

>On 9/24/05, brane@tigris.org <brane@tigris.org> wrote:
>
>One more thought...
>
>
>
>> /* Skip over SVN admin directories. */
>>- if (strcmp (this_entry.name, SVN_WC_ADM_DIR_NAME) == 0)
>>+ if (svn_wc_is_adm_dir (this_entry.name, subpool))
>> continue;
>>
>>
>
>It seems like this check...
>
>
>
>>- if (strcmp (filename, SVN_WC_ADM_DIR_NAME) == 0)
>>+ if (svn_wc_is_adm_dir (filename, subpool))
>> {
>> /* If someone's trying to import a directory named the same
>> as our administrative directories, that's probably not
>>@@ -747,15 +747,20 @@
>>
>> /* The repository doesn't know about the reserved administrative
>> directory. */
>>- if (new_entries->nelts &&
>>- (strcmp (APR_ARRAY_IDX (new_entries,
>>- new_entries->nelts - 1,
>>- const char *), SVN_WC_ADM_DIR_NAME) == 0))
>>+ if (new_entries->nelts
>>+ /* What's this, what's this? This assignment is here because we
>>+ use the value to construct the error message just below. It
>>+ may not be asethetically pleasing, but it's less ugly than
>>+ calling APR_ARRAY_IDX twice. */
>>+ && svn_wc_is_adm_dir (temp = APR_ARRAY_IDX (new_entries,
>>+ new_entries->nelts - 1,
>>+ const char *),
>>+ pool))
>>
>>
>
>And this one, are less than entirely effective now. Depending on what
>environment variables are set, we prevent different directories from
>entering the repository. Should we be looking for both .svn and _svn?
>
>
We always look for .svn and the actual admin directory name.
svn_opt_args_to_target_array2 always checks for both, which should
prevent these kinds of problems.

(If you look at update_tests.py:update_receive_illegal_name(), you can
see that we already had holes in the client in this regard...)

> If so, what about the (very unlikely, but possible) case where users
>already have an _svn file/directory in their repository?
>
>
What about it? If you use the ASP.NET hack, you're screwed anyway. At
least, with this change, we try to protect against a Unix client
creating such a directory in the repo and hosing Windows clients.

-- Brane

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@subversion.tigris.org
For additional commands, e-mail: dev-help@subversion.tigris.org
Received on Sun Sep 25 04:49:32 2005

This is an archived mail posted to the Subversion Dev mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.