Vlad Georgescu <vgeorgescu@gmail.com>


Patch Review
r22841, r22580, r22483, r22238, r22161, r22110, r21627, r21560, r21554, r21529, r21305, r21266, r21140, r21111, r21109, r21016, r20681, r19923, r19647 r22701

r22841 | brane | 2006-12-30 19:05:40 -0600 (Sat, 30 Dec 2006)

Support building DLLs on Windows. This closes #1627.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
          rey4
(Tweaked by me.)

* build.conf:
  (libsvn_client, libsvn_delta, libsvn_diff, libsvn_fs,
   libsvn_ra, libsvn_repos, libsvn_subr, libsvn_wc):
  Replace the msvc_static option with a msvc_export option containing the
  list of public header files for that library.
  (swig_client, swig_delta, swig_fs, swig_ra, swig_repos):
  Add dependency on APR.
  (svnserve): Add dependency on advapi32.lib

* build/generator/extractor.py:
  Handle svn_ctype_table.
  (_filter_names): Add svn_auth_get_keychain_simple_provider.

* build/generator/gen_win.py
  (create_dll_target): New. Given a static library, it creates a new
   dynamic library target that depends on that library.
  (get_install_targets): Call create_dll_target for each target that has
   msvc_export set.
  (get_linked_win_depends): Scan the dependency tree in breadth-first
   order, allowing us to prevent cases when both a dll and its
   corresponding static library are linked into a project.
  (get_def_file): Return a name that's in a generated directory, not
   in the source tree.

* build/generator/vcnet_vcproj.ezt,
  build/generator/msvc_dsp.ezt:
  Add empty.c as a source file for dll projects, because Visual Studio
  refuses to build a project's outputs if it has no source files.

* build/win32/empty.c: New file.

* gen-make.py:
  Handle the new --disable-shared option.

* subversion/libsvn_ra/ra_loader.c
  (svn_ra_dav_init, svn_ra_svn_init, svn_ra_local_init, svn_ra_serf_init):
  Implement these here if their corresponding libraries are not linked in,
  and have them return a "not implemented" error.

* subversion/libsvn_subr/ctype.c
  (svn_ctype_table_internal): Rename from ctype_table. Remove 'static'
   qualifier.

* win-tests.py:
  Append the paths to our libraries' dlls to the PATH environment variable.


r22701 | dlr | 2006-12-13 18:02:47 -0600 (Wed, 13 Dec 2006)

Revert part of r22580, fixing a potential backwards compatibility
problem.

* subversion/svnserve/main.c
  (main): Make the --root option again no longer mandatory on Windows.

Suggested by: rooneg
Review by: Vlad Georgescu <vgeorgescu@gmail.com>


r22580 | dlr | 2006-12-05 11:59:26 -0600 (Tue, 05 Dec 2006)

Improve the way svnserve handles the --root option.

* subversion/svnserve/main.c
  Include "svn_io.h".
  (main): Make the --root option mandatory on Windows. Make sure the
   path passed to --root actually exists.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>


r22483 | dlr | 2006-11-28 13:06:46 -0600 (Tue, 28 Nov 2006)

Fix potential infinite loop bug for Windows file systems, where we
fail to detect that an absolute path doesn't actually contain a
repository root, and don't notice our loop exit condition.

* subversion/libsvn_repos/repos.c
 (svn_repos_find_root_path): Check whether we've reached the file
  system root in a cross-platform manner.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
(Tweaked by me.)


r22238 | rooneg | 2006-11-08 17:07:54 -0600 (Wed, 08 Nov 2006)

Encapsulate ra_svn's I/O with a stream-based wrapper. This will
facilitate the introduction of SASL and TLS encryption.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/libsvn_ra_svn/marshal.c:
  Update the copyright date.
  (svn_ra_svn_create_conn): Create the connection stream. Don't initialize
   in_file and out_file.
  (svn_ra_svn__set_block_handler, svn_ra_svn__input_waiting,
   writebuf_output, readbuf_input): Use the new svn_ra_svn__stream_t interface
   instead of the old apr_file_t/apr_socket_t code.

* subversion/libsvn_ra_svn/ra_svn.h
  (ra_svn_pending_fn_t,
   ra_svn_timeout_fn_t,
   svn_ra_svn__stream_t): New typedefs.
  (svn_ra_svn_conn_st): Add stream. Remove in_file, out_file and proc. Explain
   that direct access to sock is still required by SASL.
  (svn_ra_svn__stream_from_sock,
   svn_ra_svn__stream_from_files,
   svn_ra_svn__stream_create,
   svn_ra_svn__stream_write,
   svn_ra_svn__stream_read,
   svn_ra_svn__stream_timeout,
   svn_ra_svn__stream_pending): New function declarations.

* subversion/libsvn_ra_svn/streams.c: New file. Implements the
  svn_ra_svn__stream_t interface for socket and file streams.


r22161 | rooneg | 2006-10-30 14:39:23 -0600 (Mon, 30 Oct 2006)

Fix a memory access problem with svnsync over ra_svn when SASL is enabled.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/svnserve/sasl_auth.c
  (sasl_auth_request): Allocate b->user in b->pool rather than pool.


r22110 | rooneg | 2006-10-25 10:59:58 -0500 (Wed, 25 Oct 2006)

If a SASL mechanism fails sufficiently early (i.e. before the client
sends the initial response), don't automatically fail the authentication.
Instead, fall back to the next best mechanism sent by the server.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/libsvn_ra_svn/sasl_auth.c
  (try_auth): If sasl_client_start() fails with a non-fatal error message,
   delete the current mechanism from the list and try again.


r21627 | rooneg | 2006-09-25 10:08:06 -0500 (Mon, 25 Sep 2006)

Add the ability to run the svnserve checks with Cyrus SASL turned on.

Note that the svnserve tests are failing for me with this turned on. I'm
still committing this now since it's off by default and it seems to be a
problem unrelated to this particular patch.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
          (Tweaked by me)

* Makefile.in
  (check): Handle the 'ENABLE_SASL' command line argument.
  (svncheck): Document usage of ENABLE_SASL.
* build/run_tests.py:
  Propagate the '--enable-sasl' option to the individual tests.
* subversion/tests/cmdline/svntest/main.py
  (enable_sasl): New global variable.
  (create_repos): Check the value of enable_sasl when
   creating svnserve.conf.
  (run_tests): Set enable_sasl to 1 if '--enable-sasl' was used.
* subversion/tests/cmdline/authz_tests.py:
  (write_restrictive_svnserve_conf): Check the value of enable_sasl when
   creating svnserve.conf.


r21560 | rooneg | 2006-09-19 16:37:13 -0500 (Tue, 19 Sep 2006)

Isolate svnserve from internal libsvn_ra_svn implementation details.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
Tweaked by: me

* subversion/include/private/ra_svn_sasl.h: New file, contents mostly from...

* subversion/libsvn_ra_svn/ra_svn_sasl.h: Here.

* subversion/libsvn_ra_svn/sasl_auth.c:
  Include svn_sasl.h instead of ra_svn_sasl.h.
  (svn_ra_svn__default_secprops): New function.
  (new_sasl_ctx): Use svn_ra_svn__default_secprops instead of
   initializing secprops directly.
  (svn_ra_svn__get_addresses): Take an svn_ra_svn_conn_t parameter
   instead of an apr_socket_t. Check that conn->sock is non-NULL before
   using it.
  (svn_ra_svn__do_auth): Adjust for the change to
   svn_ra_svn__get_addresses.

* subversion/svnserve/sasl_auth.c:
  Include svn_sasl.h instead of ra_svn_sasl.h.
  (get_local_hostname): Deleted.
  (sasl_auth_request): Call svn_ra_svn__get_addresses unconditionally.
   Use apr_gethostname instead of get_local_hostname. Call
   svn_ra_svn__default_secprops.


r21554 | rooneg | 2006-09-19 10:17:39 -0500 (Tue, 19 Sep 2006)

Add Cyrus SASL support to svnserve.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/libsvn_ra_svn/sasl_auth.c:
  (svn_ra_svn__sasl_status): Rename from sasl_status, change all uses and
   drop the 'static' qualifier.

* subversion/libsvn_ra_svn/ra_svn_sasl.h
  (svn_ra_svn__sasl_status): New declaration.

* subversion/include/svn_config.h
  (SVN_CONFIG_SECTION_SASL): New section.
  (SVN_CONFIG_OPTION_USE_SASL): New option.

* subversion/libsvn_repos/repos.c
  (create_conf): Document the new option.

* subversion/svnserve/sasl_auth.c: New file.

* subversion/svnserve/main.c
  (main): Call sasl_init().

* subversion/svnserve/serve.c:
  (server_baton_t, authn_type, authz_type, get_access): Moved to server.h.
  (simple_auth_request): Contains the code that was prieviously in
   auth_request.
  (auth_request): Call sasl_auth_request() or simple_auth_request().
  (must_have_access): Consider the value of b->use_sasl when
   determining whether authentication should be performed.
  (find_repos): Read the value of the use-sasl option into b->use_sasl.
   Use that value when determining whether access is allowed to the
   repository.
  (get_access): Make non-static.

* subversion/svnserve/server.h
  (server_baton_t): Moved here from serve.c. Has a new member 'use_sasl'
  (authn_type, authz_type, get_access): Moved here from serve.c.
  (sasl_init, sasl_auth_request): New declarations.


r21529 | rooneg | 2006-09-18 13:27:50 -0500 (Mon, 18 Sep 2006)

Check that the credentials are valid as early as possible.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/libsvn_ra_svn/sasl_auth.c:
  (handle_interact): Don't check that the 'creds' variable is non-NULL here.
  (svn_ra_svn__do_auth): Instead do it here, right after the call to
   sasl_auth_next_credentials().


r21305 | kfogel | 2006-08-28 17:23:01 -0500 (Mon, 28 Aug 2006)

* www/svn_1.4_releasenotes.html: Fix typo.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>


r21266 | rooneg | 2006-08-25 16:17:16 -0500 (Fri, 25 Aug 2006)

Handle the case when sasl_pool is destroyed before the connection pool,
by making sure that:

  a) nothing allocated in sasl_pool is accessed after that pool is destroyed.
  b) sasl_done() is always called _after_ the last call to sasl_dispose().

Note that detecting that sasl_pool has been destroyed by looking at the
sasl_status variable is safe because it will only ever be changed once we
hit single threaded mode during shutdown.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* subversion/include/private/svn_atomic.h
  (svn_atomic_inc, svn_atomic_dec): New macro definitions.
* subversion/libsvn_ra_svn/sasl_auth.c
  (sasl_ctx_count): New static variable.
  (svn_ra_svn__sasl_common_init): Initialize sasl_ctx_count.
  (sasl_done_cb, sasl_dispose_cb): Decrement sasl_ctx_count. If it
   is 0, call sasl_done().
  (new_sasl_ctx): Increment sasl_ctx_count..
  (sasl_mutex_alloc_cb, sasl_mutex_lock_cb,
   sasl_mutex_unlock_cb, sasl_mutex_free_cb): Check the value of sasl_status
   before doing anything.


r21140 | rooneg | 2006-08-21 09:59:45 -0500 (Mon, 21 Aug 2006)

Use pool cleanups to make sure sasl contexts are always destroyed.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
Tweaked by: me

* subversion/libsvn_ra_svn/sasl_auth.c
  (sasl_dispose_cb): New pool cleanup function.
  (new_sasl_ctx): Install the cleanup.
  (svn_ra_svn__do_auth): Don't call sasl_dispose.


r21111 | djh | 2006-08-17 21:32:26 -0500 (Thu, 17 Aug 2006)

Modify the build system on Windows to optionally include and link
Cyrus SASL.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
          me

* build/gen-make.py
 (_usage_exit): Document the new '--with-sasl' option.
 Add '--with-sasl' to the options list.

* build/generator/gen_win.py
 (parse_options): Parse the '--with-sasl' option.
 (get_win_defines): Define SVN_HAVE_SASL.
 (get_win_includes): Add Cyrus SASL's include directory.
 (get_win_lib_dirs): Add Cyrus SASL's library directory.
 (get_win_libs): Add libsasl.lib.
 


r21109 | rooneg | 2006-08-17 18:02:02 -0500 (Thu, 17 Aug 2006)

Add client-side support for Cyrus SASL.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

* configure.in: Define SVN_HAVE_SASL.

* subversion/libsvn_ra_svn/client.c
  (svn_ra_svn__init): Call svn_ra_svn__sasl_init.

* subversion/libsvn_ra_svn/ra_svn_sasl.h: New file.

* subversion/libsvn_ra_svn/sasl_auth.c: New file.

* subversion/libsvn_ra_svn/simple_auth.c:
  Enclose content within an #ifndef SVN_HAVE_SASL .. #endif pair.

* subversion/libsvn_ra_svn/ra_svn.h
  (SVN_RA_SVN__READBUF_SIZE,
   SVN_RA_SVN__WRITEBUF_SIZE): New defines.
  (svn_ra_svn_conn_st): Use them here.
  (svn_ra_svn__sasl_init): New declaration.


r21016 | rooneg | 2006-08-08 10:34:59 -0500 (Tue, 08 Aug 2006)

Extract the atomic initialization code from libsvn_fs_base/bdb/env.c
and convert it to a generic implementation that can be used to
initialize other libraries (*cough* Cyrus SASL *cough*). Make bdb use
the new implementation.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
Tweaked by: me

* build.conf
  (options): Add subversion/include/private/*.h to private-includes.

* subversion/include/private/svn_atomic.h: New file.

* subversion/libsvn_subr/atomic.c: New file.

* subversion/libsvn_fs_base/bdb/env.c
  Include svn_atomic.h instead of apr_atomic.h.
  (svn__atomic_t,
   svn__atomic_read,
   svn__atomic_set,
   svn__atomic_cas): These are now in subversion/include/svn_atomic.h
   and have a single underscore. All calls were changed to reflect this.
  (BDB_CACHE_UNINITIALIZED,
   BDB_CACHE_START_INIT,
   BDB_CACHE_INIT_FAILED,
   BDB_CACHE_INITIALIZED): Deleted. Similar definitions are now in atomic.c.
  (bdb_cache_state): This is no longer declared inside an #ifdef
   APR_HAS_THREADS, and is no longer explicitly initialized.
  (svn_fs_bdb__init_cb): New function. Contains bdb-specific initialization.
  (svn_fs_bdb__init): Call svn_atomic_init_once().


r20681 | danderson | 2006-07-14 21:31:48 -0500 (Fri, 14 Jul 2006)

Refactor libsvn_ra_svn's authentication code. This is mainly to
facilitate the subsequent introduction of Cyrus SASL support.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
Review by: me

* subversion/libsvn_ra_svn/client.c
 (ra_svn_session_baton_t): Moved to ra_svn.h and renamed to
  svn_ra_svn__session_baton_t. Changed all occurrences to reflect this.
 (find_mech, read_success): Moved to simple_auth.c.
 (do_auth): Moved to simple_auth.c and renamed to svn_ra_svn__do_auth.
 (auth_response): Renamed to svn_ra_svn__auth_response.

* subversion/libsvn_ra_svn/simple_auth.c: New file. Contains
  functions taken from client.c.

* subversion/libsvn_ra_svn/ra_svn.h
 (svn_ra_svn__session_baton_t): Copied from client.c.
 (svn_ra_svn__do_auth,
  svn_ra_svn__auth_response): New declarations.


r19923 | djames | 2006-06-03 21:10:15 -0500 (Sat, 03 Jun 2006)

Update the Unix build system to link Cyrus SASL into svnserve, if
Cyrus SASL is available.

NOTE: We don't actually use the Cyrus SASL library yet, but we are
      planning to do so.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>
Review by: me

 * build/ac-macros/sasl.m4: New file.

 * configure.in: Call SVN_LIB_SASL.

 * Makefile.in
   (SVN_SASL_LIBS): New AC_SUBSTed variables.
   (INCLUDES): Add SVN_SASL_INCLUDES.

 * aclocal.m4
   Add build/ac-macros/sasl.m4 to the list of supplementary macros.

 * build.conf
   (sasl): New entry.
   (libsvn_ra_svn, svnserve): Add sasl to the list of dependencies.



r19647 | djames | 2006-05-15 14:31:27 -0500 (Mon, 15 May 2006)

Fix typos in comments for libsvn_client.

Patch by: Vlad Georgescu <vgeorgescu@gmail.com>

[ In subversion/libsvn_client ]

* externals.c
  (switch_external): Replaced 'revison' with 'revision'.
* client.h
  (svn_client__wc_delete): Replaced 'modifed' with 'modified'.
  (svn_client__get_diff_editor): Replaced 'calback' with 'callback'.
* diff.c
  (diff_content_changed): Replaced 'instread' with 'instead'.
  (diff_parameters): Replaced 'acestry' with 'ancestry'.
* commit_util.c
  (harvest_committables): Replaced 'comparitive' with 'comparative'.
* commit.c
  (svn_client_import2): Replaced 'asethetically' with 'aesthetically'
  (reconcile_errors): Replaced 'decendant' with 'descendant'.
* add.c
  (svn_client_mkdir2): Replaced 'directoies' with 'directories'.