logging-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sde...@apache.org
Subject svn commit: r985122 - /logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
Date Fri, 13 Aug 2010 07:56:42 GMT
Author: sdeboy
Date: Fri Aug 13 07:56:42 2010
New Revision: 985122

URL: http://svn.apache.org/viewvc?rev=985122&view=rev
Log:
Updating VFSLogFilePatternReceiver jsch authorization logic (no longer setting userInfo)

Verified on Linux without a known_hosts entry

Modified:
    logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java

Modified: logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
URL: http://svn.apache.org/viewvc/logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java?rev=985122&r1=985121&r2=985122&view=diff
==============================================================================
--- logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
(original)
+++ logging/chainsaw/trunk/src/main/java/org/apache/log4j/chainsaw/vfs/VFSLogFilePatternReceiver.java
Fri Aug 13 07:56:42 2010
@@ -345,7 +345,6 @@ public class VFSLogFilePatternReceiver e
                     //if jsch not in classpath, can get NoClassDefFoundError here
                     try {
                     	SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts,
"no");
-                    	SftpFileSystemConfigBuilder.getInstance().setUserInfo(opts, new MyUserInfo(password));
                     } catch (NoClassDefFoundError ncdfe) {
                     	getLogger().warn("JSch not on classpath!", ncdfe);
                     }
@@ -392,7 +391,6 @@ public class VFSLogFilePatternReceiver e
                         //if jsch not in classpath, can get NoClassDefFoundError here
                         try {
                             SftpFileSystemConfigBuilder.getInstance().setStrictHostKeyChecking(opts,
"no");
-                            SftpFileSystemConfigBuilder.getInstance().setUserInfo(opts, new
MyUserInfo(password));
                         } catch (NoClassDefFoundError ncdfe) {
                             getLogger().warn("JSch not on classpath!", ncdfe);
                         }
@@ -558,44 +556,4 @@ public class VFSLogFilePatternReceiver e
 		  return password;
 	  }
   }
-
-  /**
-   * UserInfo class used to automatically log in if needed - also implemements
-   * UIKeyboardInteractive (UserInfo methods not used, just UIKeyboardInteractive)
-   * 
-   * @author sdeboy
-   */
-  public static class MyUserInfo implements UserInfo, UIKeyboardInteractive {
-    private final String thisPassword;
-    
-    public MyUserInfo(String thisPassword) {
-        this.thisPassword = thisPassword;
-    }
-	public String[] promptKeyboardInteractive(String destination, String loginName, String instruction,
String[] prompt, boolean[] echo) {
-		return new String[]{thisPassword};
-	}
-
-	public String getPassphrase() {
-		return null;
-	}
-
-	public String getPassword() {
-		return null;
-	}
-
-	public boolean promptPassphrase(String arg0) {
-		return false;
-	}
-
-	public boolean promptPassword(String arg0) {
-		return false;
-	}
-
-	public boolean promptYesNo(String arg0) {
-		return false;
-	}
-
-	public void showMessage(String arg0) {
-	}
-  }
 }



Mime
View raw message