Fix bz# 441071: Add backward compatibility patch from mwringe at redhat

This commit is contained in:
Deepak Bhole 2008-04-07 17:34:57 +00:00
parent 4374dd2b32
commit 6800f8ba32
2 changed files with 44 additions and 1 deletions

View File

@ -0,0 +1,36 @@
diff -ru src/com/jcraft/jsch/HostKeyRepository.java.orig src/com/jcraft/jsch/HostKeyRepository.java
--- src/com/jcraft/jsch/HostKeyRepository.java.orig 2006-10-15 13:14:46.000000000 -0400
+++ src/com/jcraft/jsch/HostKeyRepository.java 2008-04-04 16:44:31.000000000 -0400
@@ -36,6 +36,7 @@
int check(String host, byte[] key);
void add(HostKey hostkey, UserInfo ui);
+ void add(String host, byte[] key, UserInfo ui);
void remove(String host, String type);
void remove(String host, String type, byte[] key);
String getKnownHostsRepositoryID();
diff -ru src/com/jcraft/jsch/KnownHosts.java.orig src/com/jcraft/jsch/KnownHosts.java
--- src/com/jcraft/jsch/KnownHosts.java.orig 2006-10-15 14:02:31.000000000 -0400
+++ src/com/jcraft/jsch/KnownHosts.java 2008-04-04 16:46:41.000000000 -0400
@@ -205,6 +205,20 @@
//System.err.println("fail!!");
return result;
}
+
+ public void add(String host, byte[] key, UserInfo userinfo)
+ {
+ try
+ {
+ HostKey hostkey = new HostKey(host,key);
+ add(hostkey, userinfo);
+ }
+ catch (Exception e)
+ {
+ // this should't get called
+ }
+ }
+
public void add(HostKey hostkey, UserInfo userinfo){
int type=hostkey.type;
String host=hostkey.getHost();

View File

@ -36,7 +36,7 @@
Name: jsch
Version: 0.1.31
Release: 2jpp.2%{?dist}
Release: 2jpp.3%{?dist}
Epoch: 0
Summary: Pure Java implementation of SSH2
Group: Development/Libraries/Java
@ -48,6 +48,8 @@ Source0: http://download.sourceforge.net/sourceforge/jsch/jsch-%{version}
# mv META-INF/MANIFEST.MF
# rmdir META-INF
Source1: MANIFEST.MF
Patch0: %{name}-%{version}-backwards-compat.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
BuildRequires: jpackage-utils >= 0:1.5
@ -93,6 +95,8 @@ Requires(postun): /bin/rm
%prep
%setup -q
%patch0
%build
export CLASSPATH=$(build-classpath jzlib)
ant dist javadoc
@ -178,6 +182,9 @@ fi
%changelog
* Mon Apr 07 2008 Deepak Bhole <dbhole@redhat.com> - 0:0.1.31-2jpp.3
- Fix bz# 441071: Add backward compatibility patch from mwringe at redhat
* Mon Feb 18 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> - 0:0.1.31-2jpp.2
- Autorebuild for GCC 4.3