mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2026-05-22 22:58:15 +08:00
Merge remote-tracking branch 'origin/patch'
This commit is contained in:
@@ -15,12 +15,77 @@
|
||||
*/
|
||||
package db.buffers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.server.RemoteObjectInvocationHandler;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* <code>RemoteBufferFileHandle</code> facilitates access to a remote BufferFile
|
||||
* via RMI.
|
||||
* <p>
|
||||
* Methods from {@link BufferFileHandle} <b>must</b> be re-declared here
|
||||
* so they may be properly marshalled for remote invocation via RMI.
|
||||
* This became neccessary with an OpenJDK 11.0.6 change made to
|
||||
* {@link RemoteObjectInvocationHandler}.
|
||||
*/
|
||||
public interface RemoteBufferFileHandle extends BufferFileHandle, Remote {
|
||||
// provides combined interface
|
||||
@Override
|
||||
public boolean isReadOnly() throws IOException;
|
||||
|
||||
@Override
|
||||
public boolean setReadOnly() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getParameter(String name) throws NoSuchElementException, IOException;
|
||||
|
||||
@Override
|
||||
public void setParameter(String name, int value) throws IOException;
|
||||
|
||||
@Override
|
||||
public void clearParameters() throws IOException;
|
||||
|
||||
@Override
|
||||
public String[] getParameterNames() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getBufferSize() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getIndexCount() throws IOException;
|
||||
|
||||
@Override
|
||||
public int[] getFreeIndexes() throws IOException;
|
||||
|
||||
@Override
|
||||
public void setFreeIndexes(int[] indexes) throws IOException;
|
||||
|
||||
@Override
|
||||
public void close() throws IOException;
|
||||
|
||||
@Override
|
||||
public boolean delete() throws IOException;
|
||||
|
||||
@Override
|
||||
public DataBuffer get(int index) throws IOException;
|
||||
|
||||
@Override
|
||||
public void put(DataBuffer buf, int index) throws IOException;
|
||||
|
||||
@Override
|
||||
public void dispose() throws IOException;
|
||||
|
||||
@Override
|
||||
public InputBlockStream getInputBlockStream() throws IOException;
|
||||
|
||||
@Override
|
||||
public OutputBlockStream getOutputBlockStream(int blockCount) throws IOException;
|
||||
|
||||
@Override
|
||||
public BlockStreamHandle<InputBlockStream> getInputBlockStreamHandle() throws IOException;
|
||||
|
||||
@Override
|
||||
public BlockStreamHandle<OutputBlockStream> getOutputBlockStreamHandle(int blockCount)
|
||||
throws IOException;
|
||||
|
||||
}
|
||||
|
||||
@@ -15,12 +15,116 @@
|
||||
*/
|
||||
package db.buffers;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.server.RemoteObjectInvocationHandler;
|
||||
import java.util.NoSuchElementException;
|
||||
|
||||
/**
|
||||
* <code>RemoteManagedBufferFileHandle</code> facilitates access to a ManagedBufferFile
|
||||
* via RMI.
|
||||
* <p>
|
||||
* Methods from {@link BufferFileHandle} and {@link ManagedBufferFile} <b>must</b>
|
||||
* be re-declared here so they may be properly marshalled for remote invocation via RMI.
|
||||
* This became neccessary with an OpenJDK 11.0.6 change made to
|
||||
* {@link RemoteObjectInvocationHandler}.
|
||||
*/
|
||||
public interface RemoteManagedBufferFileHandle extends ManagedBufferFileHandle, Remote {
|
||||
// provides combined interface
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// BufferFileHandle methods
|
||||
//--------------------------------------------------------------------------
|
||||
@Override
|
||||
public boolean isReadOnly() throws IOException;
|
||||
|
||||
@Override
|
||||
public boolean setReadOnly() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getParameter(String name) throws NoSuchElementException, IOException;
|
||||
|
||||
@Override
|
||||
public void setParameter(String name, int value) throws IOException;
|
||||
|
||||
@Override
|
||||
public void clearParameters() throws IOException;
|
||||
|
||||
@Override
|
||||
public String[] getParameterNames() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getBufferSize() throws IOException;
|
||||
|
||||
@Override
|
||||
public int getIndexCount() throws IOException;
|
||||
|
||||
@Override
|
||||
public int[] getFreeIndexes() throws IOException;
|
||||
|
||||
@Override
|
||||
public void setFreeIndexes(int[] indexes) throws IOException;
|
||||
|
||||
@Override
|
||||
public void close() throws IOException;
|
||||
|
||||
@Override
|
||||
public boolean delete() throws IOException;
|
||||
|
||||
@Override
|
||||
public DataBuffer get(int index) throws IOException;
|
||||
|
||||
@Override
|
||||
public void put(DataBuffer buf, int index) throws IOException;
|
||||
|
||||
@Override
|
||||
public void dispose() throws IOException;
|
||||
|
||||
@Override
|
||||
public InputBlockStream getInputBlockStream() throws IOException;
|
||||
|
||||
@Override
|
||||
public OutputBlockStream getOutputBlockStream(int blockCount) throws IOException;
|
||||
|
||||
@Override
|
||||
public BlockStreamHandle<InputBlockStream> getInputBlockStreamHandle() throws IOException;
|
||||
|
||||
@Override
|
||||
public BlockStreamHandle<OutputBlockStream> getOutputBlockStreamHandle(int blockCount)
|
||||
throws IOException;
|
||||
|
||||
//--------------------------------------------------------------------------
|
||||
// ManagedBufferFileHandle methods
|
||||
//--------------------------------------------------------------------------
|
||||
|
||||
@Override
|
||||
public ManagedBufferFileHandle getSaveFile() throws IOException;
|
||||
|
||||
@Override
|
||||
public void saveCompleted(boolean commit) throws IOException;
|
||||
|
||||
@Override
|
||||
public boolean canSave() throws IOException;
|
||||
|
||||
@Override
|
||||
public void setVersionComment(String comment) throws IOException;
|
||||
|
||||
@Override
|
||||
public BufferFileHandle getNextChangeDataFile(boolean getFirst) throws IOException;
|
||||
|
||||
@Override
|
||||
public BufferFileHandle getSaveChangeDataFile() throws IOException;
|
||||
|
||||
@Override
|
||||
public long getCheckinID() throws IOException;
|
||||
|
||||
@Override
|
||||
public byte[] getForwardModMapData(int oldVersion) throws IOException;
|
||||
|
||||
@Override
|
||||
public InputBlockStream getInputBlockStream(byte[] changeMapData) throws IOException;
|
||||
|
||||
@Override
|
||||
public BlockStreamHandle<InputBlockStream> getInputBlockStreamHandle(byte[] changeMapData)
|
||||
throws IOException;
|
||||
|
||||
}
|
||||
|
||||
+110
@@ -15,11 +15,121 @@
|
||||
*/
|
||||
package ghidra.framework.remote;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.server.RemoteObjectInvocationHandler;
|
||||
|
||||
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
|
||||
* so they may be properly marshalled for remote invocation via RMI.
|
||||
* This became neccessary with an OpenJDK 11.0.6 change made to
|
||||
* {@link RemoteObjectInvocationHandler}.
|
||||
*/
|
||||
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;
|
||||
|
||||
}
|
||||
|
||||
+43
@@ -15,11 +15,54 @@
|
||||
*/
|
||||
package ghidra.framework.remote;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.rmi.Remote;
|
||||
import java.rmi.server.RemoteObjectInvocationHandler;
|
||||
|
||||
/**
|
||||
* <code>RepositoryServerHandle</code> provides access to a remote repository server via RMI.
|
||||
* <p>
|
||||
* Methods from {@link RepositoryServerHandle} <b>must</b> be re-declared here
|
||||
* so they may be properly marshalled for remote invocation via RMI.
|
||||
* This became neccessary with an OpenJDK 11.0.6 change made to
|
||||
* {@link RemoteObjectInvocationHandler}.
|
||||
*/
|
||||
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