NAME

Net::Dropbear::XS::SessionAccept - Manage how a command session should be handled by Dropbear.

DESCRIPTION

This type of object is created and passed during the on_chansess_command hook. See Net::Dropbear::SSHd for details. There is no new method for this object, it is only created based on the struct from Dropbear.

ATTRIBUTES

All of these attributes are set to a defaults. if HOOK_COMPLETE is returned, they should be filled in with enough information to allow Dropbear to clean up afterwards. This means it will close file handles and send exit signals to child processes.

channel_index

The index of the channel being opened. This is Read-Only.

Default: The current channel index

cmd

The command that will be ran. This can be changed to a new command and Dropbear will run the new command instead.

Default: The requested command

pid

The pid of the child process

Default: 0 (no child process)

iscmd

A boolean indicating that the request was for a command to be ran.

Default: From the request

issubsys

A boolean indicating that this command was requesting a subsystem (SCP, SFTP, etc).

Default: From the request

writefd

The file descriptor number that this channel will write to. On a command, this would be STDOUT.

Default: -1 (file closed)

readfd

The file descriptor number that this channel will read from. On a command, this would be STDIN.

Default: -1 (file closed)

errfd

The file descriptor number that this channel will write error messages to. On a command, this would be STDERR.

Default: -1 (file closed)