bind_config: Added minimal support for Match keyword

Only "Match All" is supported, if any other criterion is used, the block
is ignored and the options are not applied.

It is important to note that only a subset of the supported keywords are
allowed to be used inside a Match block, currently being "LogLevel" the
only supported keyword.

Signed-off-by: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
Reviewed-by: Andreas Schneider <asn@cryptomilk.org>
This commit is contained in:
Anderson Toshiyuki Sasaki
2019-03-12 16:32:08 +01:00
committed by Andreas Schneider
parent 25af8641b3
commit d9e6237a47
2 changed files with 205 additions and 13 deletions

View File

@@ -29,6 +29,8 @@
#include "libssh/server.h"
enum ssh_bind_config_opcode_e {
/* Known but not allowed in Match block */
BIND_CFG_NOT_ALLOWED_IN_MATCH = -4,
/* Unknown opcode */
BIND_CFG_UNKNOWN = -3,
/* Known and not applicable to libssh */
@@ -43,6 +45,7 @@ enum ssh_bind_config_opcode_e {
BIND_CFG_CIPHERS,
BIND_CFG_MACS,
BIND_CFG_KEXALGORITHMS,
BIND_CFG_MATCH,
BIND_CFG_MAX /* Keep this one last in the list */
};