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
@@ -2401,6 +2401,15 @@ static int ssh_bind_set_algo(ssh_bind sshbind,
|
||||
* not a pointer when it should have been a pointer, or if
|
||||
* its a pointer to a pointer when it should have just been
|
||||
* a pointer), then the behaviour is undefined.
|
||||
*
|
||||
* @warning Options set via this function may be overridden if a
|
||||
* configuration file is parsed afterwards (e.g., by an
|
||||
* implicit call to ssh_bind_options_parse_config() inside
|
||||
* ssh_bind_listen(), or by a manual call to the same
|
||||
* function) and contains the same options.\n
|
||||
* It is the caller’s responsibility to ensure the correct
|
||||
* order of API calls if explicit options must take
|
||||
* precedence.
|
||||
*/
|
||||
int
|
||||
ssh_bind_options_set(ssh_bind sshbind,
|
||||
|
||||
Reference in New Issue
Block a user