mirror of
https://git.libssh.org/projects/libssh.git
synced 2026-02-28 07:13:54 +09:00
refactor(server): Warn about config override behavior in bind APIs
- Add a warning to ssh_bind_listen() clarifying that it implicitly calls ssh_bind_options_parse_config(), which may override options previously set via ssh_bind_options_set(). - Add a warning to ssh_bind_options_set() and ssh_bind_config_parse_string() explaining that options may be overridden if configuration files are parsed afterwards, either implicitly via ssh_bind_listen() or by an explicit call to ssh_bind_options_parse_config(). Signed-off-by: Francesco <eferollo@gmail.com> Reviewed-by: Jakub Jelen <jjelen@redhat.com>
This commit is contained in:
committed by
Jakub Jelen
parent
edbd929fa2
commit
90b07e2c18
@@ -110,6 +110,23 @@ LIBSSH_API int ssh_bind_config_parse_string(ssh_bind bind, const char *input);
|
||||
* @param ssh_bind_o The ssh server bind to use.
|
||||
*
|
||||
* @return 0 on success, < 0 on error.
|
||||
*
|
||||
* @warning This function implicitly calls ssh_bind_options_parse_config()
|
||||
* to process system-wide and user configuration files unless
|
||||
* configuration processing was already performed explicitly
|
||||
* by the caller.\n
|
||||
* As a result, any options previously set (e.g., manually via
|
||||
* ssh_bind_options_set() or ssh_bind_config_parse_string()) may be
|
||||
* overridden by values from the configuration files.\n
|
||||
* To guarantee that explicitly set options take precedence,
|
||||
* callers of this function should either:
|
||||
* - call ssh_bind_options_parse_config() themselves before
|
||||
* setting options, or
|
||||
* - disable automatic config processing via
|
||||
* SSH_BIND_OPTIONS_PROCESS_CONFIG (set to false).
|
||||
*
|
||||
* @see ssh_bind_options_parse_config()
|
||||
* @see ssh_bind_options_set()
|
||||
*/
|
||||
LIBSSH_API int ssh_bind_listen(ssh_bind ssh_bind_o);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user