Package com.google.gerrit.sshd
Class SuExec
- java.lang.Object
-
- com.google.gerrit.sshd.BaseCommand
-
- com.google.gerrit.sshd.SuExec
-
- All Implemented Interfaces:
org.apache.sshd.server.command.Command
,org.apache.sshd.server.command.CommandLifecycle
public final class SuExec extends BaseCommand
Executes any other command as a different user identity.The calling user must be authenticated as a
PeerDaemonUser
, which usually requires public key authentication using this daemon's private host key, or a key on this daemon's peer host key ring.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class com.google.gerrit.sshd.BaseCommand
BaseCommand.CommandRunnable, BaseCommand.Failure, BaseCommand.ProjectCommandRunnable, BaseCommand.UnloggedFailure
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.sshd.BaseCommand
cleanup, ENC, err, exit, in, out, STATUS_NOT_ADMIN, user
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
destroy(org.apache.sshd.server.channel.ChannelSession channel)
void
start(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env)
-
Methods inherited from class com.google.gerrit.sshd.BaseCommand
die, die, die, enableGracefulStop, getArguments, getName, getPluginName, getTaskDescription, getTrimmedArguments, newCmdLineParser, onExit, parseCommandLine, parseCommandLine, provideStateTo, setArguments, setErrorStream, setExitCallback, setInputStream, setOutputStream, startThread, toPrintWriter, usage, writeError
-
-
-
-
Method Detail
-
start
public void start(org.apache.sshd.server.channel.ChannelSession channel, org.apache.sshd.server.Environment env) throws IOException
- Throws:
IOException
-
destroy
public void destroy(org.apache.sshd.server.channel.ChannelSession channel)
- Specified by:
destroy
in interfaceorg.apache.sshd.server.command.CommandLifecycle
- Overrides:
destroy
in classBaseCommand
-
-