add control master and path option

Signed-off-by: Ahsen Kamal <itsahsenkamal@gmail.com>
Reviewed-by: Jakub Jelen <jjelen@redhat.com>
Reviewed-by: Norbert Pocs <npocs@redhat.com>
This commit is contained in:
Ahsen Kamal
2023-05-29 17:41:03 +05:30
committed by Jakub Jelen
parent 83ce7bfa59
commit 15dbf3ace7
6 changed files with 130 additions and 2 deletions

View File

@@ -63,6 +63,8 @@ enum ssh_config_opcode_e {
SOC_REKEYLIMIT,
SOC_IDENTITYAGENT,
SOC_IDENTITIESONLY,
SOC_CONTROLMASTER,
SOC_CONTROLPATH,
SOC_MAX /* Keep this one last in the list */
};

View File

@@ -360,6 +360,14 @@ enum {
/** @} */
enum ssh_control_master_options_e {
SSH_CONTROL_MASTER_NO,
SSH_CONTROL_MASTER_AUTO,
SSH_CONTROL_MASTER_YES,
SSH_CONTROL_MASTER_ASK,
SSH_CONTROL_MASTER_AUTOASK
};
enum ssh_options_e {
SSH_OPTIONS_HOST,
SSH_OPTIONS_PORT,
@@ -405,6 +413,8 @@ enum ssh_options_e {
SSH_OPTIONS_RSA_MIN_SIZE,
SSH_OPTIONS_IDENTITY_AGENT,
SSH_OPTIONS_IDENTITIES_ONLY,
SSH_OPTIONS_CONTROL_MASTER,
SSH_OPTIONS_CONTROL_PATH,
};
enum {

View File

@@ -106,6 +106,7 @@ enum ssh_pending_call_e {
#define SSH_OPT_EXP_FLAG_GLOBAL_KNOWNHOSTS 0x2
#define SSH_OPT_EXP_FLAG_PROXYCOMMAND 0x4
#define SSH_OPT_EXP_FLAG_IDENTITY 0x8
#define SSH_OPT_EXP_FLAG_CONTROL_PATH 0x10
/* extensions flags */
/* negotiation enabled */
@@ -260,6 +261,8 @@ struct ssh_session_struct {
uint32_t rekey_time;
int rsa_min_size;
bool identities_only;
int control_master;
char *control_path;
} opts;
/* counters */
ssh_counter socket_counter;