Author: brane
Date: Sun Feb  8 11:26:12 2015
New Revision: 1658150

URL: http://svn.apache.org/r1658150
Log:
Reverted r1658123 and r1658123.
See http://markmail.org/thread/ty6l7afzdxgfvvef


Modified:
    subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp
    subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp
    subversion/trunk/subversion/bindings/javahl/native/Prompter.h
    subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c

Modified: 
subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp?rev=1658150&r1=1658149&r2=1658150&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp 
(original)
+++ subversion/trunk/subversion/bindings/javahl/native/OperationContext.cpp Sun 
Feb  8 11:26:12 2015
@@ -218,27 +218,6 @@ OperationContext::getAuthBaton(SVN::Pool
   /* Build an authentication baton to give to libsvn_client. */
   svn_auth_open(&ab, providers, pool);
 
-  if (m_prompter.get())
-    {
-      svn_auth_gnome_keyring_unlock_prompt_func_t unlock_cb;
-      void *unlock_baton;
-
-      m_prompter->get_gnome_keyring_unlock(&unlock_cb, &unlock_baton,
-                                         in_pool);
-
-      if (unlock_cb)
-        {
-          svn_auth_set_parameter(
-                         ab,
-                         SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
-                         (const void*)unlock_cb);
-        svn_auth_set_parameter(
-                         ab,
-                         SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_FUNC,
-                         unlock_baton);
-      }
-    }
-
   /* Place any default --username or --password credentials into the
    * auth_baton's run-time parameter hash.  ### Same with --no-auth-cache? */
   if (!m_userName.empty())

Modified: subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp?rev=1658150&r1=1658149&r2=1658150&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp (original)
+++ subversion/trunk/subversion/bindings/javahl/native/Prompter.cpp Sun Feb  8 
11:26:12 2015
@@ -138,16 +138,6 @@ Prompter::get_provider_client_ssl_passwo
   return provider;
 }
 
-void
-Prompter::get_gnome_keyring_unlock(
-              svn_auth_gnome_keyring_unlock_prompt_func_t *cb,
-              void **baton,
-              SVN::Pool &in_pool)
-{
-  *cb = gnome_keyring_unlock_prompt;
-  *baton = this;
-}
-
 svn_error_t *Prompter::simple_prompt(
     svn_auth_cred_simple_t **cred_p,
     void *baton,
@@ -231,18 +221,6 @@ svn_error_t *Prompter::ssl_client_cert_p
   return err;
 }
 
-svn_error_t *Prompter::gnome_keyring_unlock_prompt(
-    char **keyring_password,
-    const char *keyring_name,
-    void *baton,
-    apr_pool_t *pool)
-{
-  /* ### TODO: Forward to Java */
-
-  *keyring_password = NULL; /* Don't attempt an unlock */
-  return SVN_NO_ERROR;
-}
-
 svn_error_t *Prompter::plaintext_prompt(
     svn_boolean_t *may_save_plaintext,
     const char *realmstring,

Modified: subversion/trunk/subversion/bindings/javahl/native/Prompter.h
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/bindings/javahl/native/Prompter.h?rev=1658150&r1=1658149&r2=1658150&view=diff
==============================================================================
--- subversion/trunk/subversion/bindings/javahl/native/Prompter.h (original)
+++ subversion/trunk/subversion/bindings/javahl/native/Prompter.h Sun Feb  8 
11:26:12 2015
@@ -60,11 +60,6 @@ public:
   svn_auth_provider_object_t *get_provider_client_ssl(SVN::Pool &in_pool);
   svn_auth_provider_object_t *get_provider_client_ssl_password(SVN::Pool 
&in_pool);
 
-  void get_gnome_keyring_unlock(
-              svn_auth_gnome_keyring_unlock_prompt_func_t *cb,
-              void **baton,
-              SVN::Pool &in_pool);
-
 protected:
   explicit Prompter(::Java::Env env, jobject jprompter);
 
@@ -149,12 +144,6 @@ protected:
       svn_boolean_t may_save,
       apr_pool_t *pool);
 
-  static svn_error_t *gnome_keyring_unlock_prompt(
-      char **keyring_password,
-      const char *keyring_name,
-      void *baton,
-      apr_pool_t *pool);
-
 protected:
   virtual svn_error_t *dispatch_plaintext_prompt(
       ::Java::Env env,

Modified: subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c
URL: 
http://svn.apache.org/viewvc/subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c?rev=1658150&r1=1658149&r2=1658150&view=diff
==============================================================================
--- subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c 
(original)
+++ subversion/trunk/subversion/libsvn_auth_gnome_keyring/gnome_keyring.c Sun 
Feb  8 11:26:12 2015
@@ -129,22 +129,19 @@ ensure_gnome_keyring_is_unlocked(svn_boo
         svn_hash_gets(parameters,
                       SVN_AUTH_PARAM_GNOME_KEYRING_UNLOCK_PROMPT_BATON);
 
+      char *keyring_password;
+
       if (unlock_prompt_func && check_keyring_is_locked(default_keyring))
         {
-          char *keyring_password;
-
           SVN_ERR((*unlock_prompt_func)(&keyring_password,
                                         default_keyring,
                                         unlock_prompt_baton,
                                         scratch_pool));
 
           /* If keyring is locked give up and try the next provider. */
-          if (keyring_password)
-            {
-              if (! unlock_gnome_keyring(default_keyring, keyring_password,
-                                         scratch_pool))
-                return SVN_NO_ERROR;
-            }
+          if (! unlock_gnome_keyring(default_keyring, keyring_password,
+                                     scratch_pool))
+            return SVN_NO_ERROR;
         }
     }
   else


Reply via email to