Index: racallback.c
===================================================================
--- racallback.c	(Revision 1174)
+++ racallback.c	(Arbeitskopie)
@@ -17,6 +17,8 @@
 #include <subversion-1/svn_ra.h>
 #include <subversion-1/svn_auth.h>
 #include <subversion-1/svn_client.h>
+#include <subversion-1/svn_config.h>
+#include <subversion-1/svn_cmdline.h>
 
 
 
@@ -31,20 +33,37 @@
 
 svn_error_t *cb__init(apr_pool_t *pool)
 {
-	svn_auth_provider_object_t *prov;
-	apr_array_header_t *provs;
+	int status;
+	svn_error_t *status_svn;
+	apr_hash_t *cfg_hash;
+	svn_config_t *cfg;
+
+
+	status=0;
+	STOPIF_SVNERR(svn_config_get_config,
+			(&cfg_hash, NULL, pool) );
 
-	provs=apr_array_make (pool, 10, sizeof (svn_auth_provider_object_t *));
+	cfg = apr_hash_get(cfg_hash, SVN_CONFIG_CATEGORY_CONFIG,
+			APR_HASH_KEY_STRING);
 
-	svn_client_get_simple_provider(&prov, pool);
-	APR_ARRAY_PUSH (provs, svn_auth_provider_object_t *) = prov;
-	svn_client_get_username_provider(&prov, pool);
-	APR_ARRAY_PUSH (provs, svn_auth_provider_object_t *) = prov;
+	/* Set up Authentication stuff. */
+	STOPIF_SVNERR( svn_cmdline_setup_auth_baton,
+			(&cb__cb_table.auth_baton,
+			 !(isatty(STDIN_FILENO) && isatty(STDOUT_FILENO)),
+			 NULL, /* Username */
+			 NULL, /* Password */
+			 NULL, /* Config dir */
+			 1, /* no_auth_cache */
+			 cfg,
+			 NULL, /* cancel function */
+			 NULL, /* cancel baton */
+			 pool)
+			);
 
-	svn_auth_open(&(cb__cb_table.auth_baton), provs, pool);
 	BUG_ON(!cb__cb_table.auth_baton);
 
-	return SVN_NO_ERROR;
+ex:
+	RETURN_SVNERR(status);
 }
 
 
@@ -83,7 +102,6 @@
 	STOPIF( apr_file_mktemp(fp, buffer, 0, pool),
 			"Cannot create a temporary file");
 ex:
-
 	RETURN_SVNERR(status);
 }
 


