1
1

bind: Apply global configuration automatically

Apply the global bind configuration from the file pointed by
BIND_GLOBAL_CONFIG when a bind_new() is called.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Этот коммит содержится в:
Anderson Toshiyuki Sasaki 2019-03-11 17:07:20 +01:00 коммит произвёл Andreas Schneider
родитель d6d9b56bb9
Коммит 25af8641b3

Просмотреть файл

@ -130,17 +130,25 @@ static socket_t bind_socket(ssh_bind sshbind, const char *hostname,
}
ssh_bind ssh_bind_new(void) {
ssh_bind ptr;
ssh_bind ptr;
int rc;
ptr = calloc(1, sizeof(struct ssh_bind_struct));
if (ptr == NULL) {
return NULL;
}
ptr->bindfd = SSH_INVALID_SOCKET;
ptr->bindport= 22;
ptr->common.log_verbosity = 0;
ptr = calloc(1, sizeof(struct ssh_bind_struct));
if (ptr == NULL) {
return NULL;
}
ptr->bindfd = SSH_INVALID_SOCKET;
ptr->bindport = 22;
ptr->common.log_verbosity = 0;
return ptr;
/* Apply global bind configurations */
rc = ssh_bind_options_parse_config(ptr, NULL);
if (rc != 0) {
ssh_bind_free(ptr);
ptr = NULL;
}
return ptr;
}
static int ssh_bind_import_keys(ssh_bind sshbind) {