mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-29 01:16:01 +08:00
GT-3521 fix problem with "Method is not Remote" when connecting
A recent change in java's RemoteObjectInvocationHandler added an additional check to ensure that the interface a method was declared on was also marked with the Remote marker interface. Previously the check was looser and only checked if the entire proxied object implemented Remote. The change was made in commit be35f9ef53774a87662ad7a0bb978986ea56ca78: https://github.com/openjdk/jdk/commit/be35f9ef53774a87662ad7a0bb978986ea56ca78 The error the user would encounter would say something about "Method is not Remote" and something about "RepositoryServerHandle.isReadOnly()".
This commit is contained in:
+106
@@ -15,11 +15,117 @@
|
||||
*/
|
||||
package ghidra.framework.remote;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
|
||||
import db.buffers.ManagedBufferFileHandle;
|
||||
import ghidra.framework.store.*;
|
||||
import ghidra.util.InvalidNameException;
|
||||
|
||||
/**
|
||||
* <code>RepositoryHandle</code> provides access to a remote repository via RMI.
|
||||
* <p>
|
||||
* Methods from {@link RepositoryHandle} <b>must</b> be re-declared here to mark them as rmi-able.
|
||||
*/
|
||||
public interface RemoteRepositoryHandle extends RepositoryHandle, Remote {
|
||||
@Override
|
||||
String getName() throws IOException;
|
||||
|
||||
@Override
|
||||
User getUser() throws IOException;
|
||||
|
||||
@Override
|
||||
User[] getUserList() throws IOException;
|
||||
|
||||
@Override
|
||||
boolean anonymousAccessAllowed() throws IOException;
|
||||
|
||||
@Override
|
||||
String[] getServerUserList() throws IOException;
|
||||
|
||||
@Override
|
||||
void setUserList(User[] users, boolean anonymousAccessAllowed) throws IOException;
|
||||
|
||||
@Override
|
||||
String[] getSubfolderList(String folderPath) throws IOException;
|
||||
|
||||
@Override
|
||||
int getItemCount() throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryItem[] getItemList(String folderPath) throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryItem getItem(String parentPath, String name) throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryItem getItem(String fileID) throws IOException;
|
||||
|
||||
@Override
|
||||
ManagedBufferFileHandle createDatabase(String parentPath, String itemName, String fileID,
|
||||
int bufferSize, String contentType, String projectPath)
|
||||
throws IOException, InvalidNameException;
|
||||
|
||||
@Override
|
||||
ManagedBufferFileHandle openDatabase(String parentPath, String itemName, int version,
|
||||
int minChangeDataVer) throws IOException;
|
||||
|
||||
@Override
|
||||
ManagedBufferFileHandle openDatabase(String parentPath, String itemName, long checkoutId)
|
||||
throws IOException;
|
||||
|
||||
@Override
|
||||
Version[] getVersions(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
void deleteItem(String parentPath, String itemName, int version) throws IOException;
|
||||
|
||||
@Override
|
||||
void moveFolder(String oldParentPath, String newParentPath, String oldFolderName,
|
||||
String newFolderName) throws InvalidNameException, IOException;
|
||||
|
||||
@Override
|
||||
void moveItem(String oldParentPath, String newParentPath, String oldItemName,
|
||||
String newItemName) throws InvalidNameException, IOException;
|
||||
|
||||
@Override
|
||||
ItemCheckoutStatus checkout(String parentPath, String itemName, CheckoutType checkoutType,
|
||||
String projectPath) throws IOException;
|
||||
|
||||
@Override
|
||||
void terminateCheckout(String parentPath, String itemName, long checkoutId, boolean notify)
|
||||
throws IOException;
|
||||
|
||||
@Override
|
||||
ItemCheckoutStatus getCheckout(String parentPath, String itemName, long checkoutId)
|
||||
throws IOException;
|
||||
|
||||
@Override
|
||||
ItemCheckoutStatus[] getCheckouts(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
boolean folderExists(String folderPath) throws IOException;
|
||||
|
||||
@Override
|
||||
boolean fileExists(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
long getLength(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
boolean hasCheckouts(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
boolean isCheckinActive(String parentPath, String itemName) throws IOException;
|
||||
|
||||
@Override
|
||||
void updateCheckoutVersion(String parentPath, String itemName, long checkoutId,
|
||||
int checkoutVersion) throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryChangeEvent[] getEvents() throws IOException;
|
||||
|
||||
@Override
|
||||
void close() throws IOException;
|
||||
|
||||
}
|
||||
|
||||
+39
@@ -15,11 +15,50 @@
|
||||
*/
|
||||
package ghidra.framework.remote;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
|
||||
/**
|
||||
* <code>RepositoryServerHandle</code> provides access to a remote repository server via RMI.
|
||||
* <p>
|
||||
* Methods from {@link RepositoryServerHandle} <b>must</b> be re-declared here to mark them as rmi-able.
|
||||
*/
|
||||
public interface RemoteRepositoryServerHandle extends RepositoryServerHandle, Remote {
|
||||
|
||||
@Override
|
||||
boolean anonymousAccessAllowed() throws IOException;
|
||||
|
||||
@Override
|
||||
boolean isReadOnly() throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryHandle createRepository(String name) throws IOException;
|
||||
|
||||
@Override
|
||||
RepositoryHandle getRepository(String name) throws IOException;
|
||||
|
||||
@Override
|
||||
void deleteRepository(String name) throws IOException;
|
||||
|
||||
@Override
|
||||
String[] getRepositoryNames() throws IOException;
|
||||
|
||||
@Override
|
||||
String getUser() throws IOException;
|
||||
|
||||
@Override
|
||||
String[] getAllUsers() throws IOException;
|
||||
|
||||
@Override
|
||||
boolean canSetPassword() throws IOException;
|
||||
|
||||
@Override
|
||||
long getPasswordExpiration() throws IOException;
|
||||
|
||||
@Override
|
||||
boolean setPassword(char[] saltedSHA256PasswordHash) throws IOException;
|
||||
|
||||
@Override
|
||||
void connected() throws IOException;
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user