aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorAnderson Toshiyuki Sasaki <ansasaki@redhat.com>2019-03-07 17:00:44 +0100
committerAndreas Schneider <asn@cryptomilk.org>2019-04-01 08:38:17 +0200
commitfd25beff68a8c61c62a1f43eb1c53d50a7390180 (patch)
tree7fc29d461cb4a870df64c627d7a84598a08c2272 /include
parentbab4d2b77b820961bc4b6ba081af27673f139b7a (diff)
downloadlibssh-fd25beff68a8c61c62a1f43eb1c53d50a7390180.tar.gz
libssh-fd25beff68a8c61c62a1f43eb1c53d50a7390180.tar.xz
libssh-fd25beff68a8c61c62a1f43eb1c53d50a7390180.zip
options: Introduce ssh_bind_options_parse_config()
The added API allows setting the options of a given bind context through a configuration file. The default global configuration file "/etc/ssh/libssh_server_config" is parsed before the provided configuration file, if it hasn't been parsed yet. Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com> Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
Diffstat (limited to 'include')
-rw-r--r--include/libssh/bind.h1
-rw-r--r--include/libssh/server.h3
2 files changed, 4 insertions, 0 deletions
diff --git a/include/libssh/bind.h b/include/libssh/bind.h
index edbc7b77..c082e199 100644
--- a/include/libssh/bind.h
+++ b/include/libssh/bind.h
@@ -46,6 +46,7 @@ struct ssh_bind_struct {
unsigned int bindport;
int blocking;
int toaccept;
+ bool config_processed;
};
struct ssh_poll_handle_struct *ssh_bind_get_poll(struct ssh_bind_struct
diff --git a/include/libssh/server.h b/include/libssh/server.h
index 9fe73575..f1d905d0 100644
--- a/include/libssh/server.h
+++ b/include/libssh/server.h
@@ -90,6 +90,9 @@ LIBSSH_API ssh_bind ssh_bind_new(void);
LIBSSH_API int ssh_bind_options_set(ssh_bind sshbind,
enum ssh_bind_options_e type, const void *value);
+LIBSSH_API int ssh_bind_options_parse_config(ssh_bind sshbind,
+ const char *filename);
+
/**
* @brief Start listening to the socket.
*