l.c.s.s.RestrictedExecOnlySession(ExecOnlySession) : class documentation

Part of lp.codehosting.sshserver.session View In Hierarchy

Known subclasses: lp.codehosting.sshserver.session.ForkingRestrictedExecOnlySession

Conch session that only allows specific commands to be executed.
Method __init__ Construct a RestrictedExecOnlySession.
Class Method getAvatarAdapter Undocumented
Method getCommandToRun As in ExecOnlySession, but only allow a particular command.

Inherited from ExecOnlySession:

Method closed See ISession.
Method eofReceived See ISession.
Method execCommand Executes command using protocol as the ProcessProtocol.
Method _spawn Undocumented
def __init__(self, avatar, reactor, lookup_command_template, environment=None):
Construct a RestrictedExecOnlySession.
ParametersavatarSee ExecOnlySession.
reactorSee ExecOnlySession.
lookup_command_templateLookup the template for a command. A template is a Python format string for the actual command that will be run. '%(user_id)s' will be replaced with the 'user_id' attribute of the current avatar. Should raise ForbiddenCommand if the command is not allowed.
@classmethod
def getAvatarAdapter(klass, lookup_command_template, environment=None):
Undocumented
def getCommandToRun(self, command):
As in ExecOnlySession, but only allow a particular command.
RaisesForbiddenCommandwhen command is not the allowed command.
API Documentation for Launchpad, generated by pydoctor at 2022-06-16 00:00:12.