Garrett Rooney wrote:
>On 9/24/05, firstname.lastname@example.org <email@example.com> 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))
>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 *),
>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.
To unsubscribe, e-mail: firstname.lastname@example.org
For additional commands, e-mail: email@example.com
Received on Sun Sep 25 04:49:32 2005