You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@subversion.apache.org by iv...@apache.org on 2015/09/08 09:32:03 UTC
svn commit: r1701736 - /subversion/trunk/subversion/libsvn_subr/io.c
Author: ivan
Date: Tue Sep 8 07:32:02 2015
New Revision: 1701736
URL: http://svn.apache.org/r1701736
Log:
Fix Access Denied errors on checkout/update with working copies stored on
SMBv1 network shares.
Discussion: http://svn.haxx.se/dev/archive-2015-09/0054.shtml
* subversion/libsvn_subr/io.c
(svn_io__win_rename_open_file): Return SVN_ERR_UNSUPPORTED_FEATURE if
SetFileInformationByHandle() returns ERROR_ACCESS_DENIED. Windows seems
to do not support performing rename operation twice using same file handle
for SMBv1 network shares and return ERROR_ACCESS_DENIED in this without
even sending request to SMB server. The caller will fall back to normal
close + rename in this case.
Modified:
subversion/trunk/subversion/libsvn_subr/io.c
Modified: subversion/trunk/subversion/libsvn_subr/io.c
URL: http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_subr/io.c?rev=1701736&r1=1701735&r2=1701736&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_subr/io.c (original)
+++ subversion/trunk/subversion/libsvn_subr/io.c Tue Sep 8 07:32:02 2015
@@ -2065,11 +2065,21 @@ svn_io__win_rename_open_file(apr_file_t
rename_size);
}
- WIN32_RETRY_LOOP(status,
- win32_set_file_information_by_handle(hFile,
- FileRenameInfo,
- rename_info,
- rename_size));
+ /* Windows returns Vista+ client accessing network share stored on Windows
+ Server 2003 returns ERROR_ACCESS_DENIED. The same happens when Vista+
+ client access Windows Server 2008 with disabled SMBv2 protocol.
+
+ So return SVN_ERR_UNSUPPORTED_FEATURE in this case like we do when
+ SetFileInformationByHandle() is not available and let caller to
+ handle it.
+
+ See "Access denied error on checkout-commit after updating to 1.9.X"
+ discussion on dev@s.a.o:
+ http://svn.haxx.se/dev/archive-2015-09/0054.shtml */
+ if (status == APR_FROM_OS_ERROR(ERROR_ACCESS_DENIED))
+ {
+ status = SVN_ERR_UNSUPPORTED_FEATURE;
+ }
if (status)
{