|
Packit Service |
31306d |
/*
|
|
Packit Service |
31306d |
* bind_config.h - Parse the SSH server configuration file
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* This file is part of the SSH Library
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* Copyright (c) 2019 by Red Hat, Inc.
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* Author: Anderson Toshiyuki Sasaki <ansasaki@redhat.com>
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* The SSH Library is free software; you can redistribute it and/or modify
|
|
Packit Service |
31306d |
* it under the terms of the GNU Lesser General Public License as published by
|
|
Packit Service |
31306d |
* the Free Software Foundation; either version 2.1 of the License, or (at your
|
|
Packit Service |
31306d |
* option) any later version.
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* The SSH Library is distributed in the hope that it will be useful, but
|
|
Packit Service |
31306d |
* WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit Service |
31306d |
* or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public
|
|
Packit Service |
31306d |
* License for more details.
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* You should have received a copy of the GNU Lesser General Public License
|
|
Packit Service |
31306d |
* along with the SSH Library; see the file COPYING. If not, write to
|
|
Packit Service |
31306d |
* the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
|
|
Packit Service |
31306d |
* MA 02111-1307, USA.
|
|
Packit Service |
31306d |
*/
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
#ifndef BIND_CONFIG_H_
|
|
Packit Service |
31306d |
#define BIND_CONFIG_H_
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
#include "libssh/server.h"
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
enum ssh_bind_config_opcode_e {
|
|
Packit Service |
31306d |
/* Known but not allowed in Match block */
|
|
Packit Service |
31306d |
BIND_CFG_NOT_ALLOWED_IN_MATCH = -4,
|
|
Packit Service |
31306d |
/* Unknown opcode */
|
|
Packit Service |
31306d |
BIND_CFG_UNKNOWN = -3,
|
|
Packit Service |
31306d |
/* Known and not applicable to libssh */
|
|
Packit Service |
31306d |
BIND_CFG_NA = -2,
|
|
Packit Service |
31306d |
/* Known but not supported by current libssh version */
|
|
Packit Service |
31306d |
BIND_CFG_UNSUPPORTED = -1,
|
|
Packit Service |
31306d |
BIND_CFG_INCLUDE,
|
|
Packit Service |
31306d |
BIND_CFG_HOSTKEY,
|
|
Packit Service |
31306d |
BIND_CFG_LISTENADDRESS,
|
|
Packit Service |
31306d |
BIND_CFG_PORT,
|
|
Packit Service |
31306d |
BIND_CFG_LOGLEVEL,
|
|
Packit Service |
31306d |
BIND_CFG_CIPHERS,
|
|
Packit Service |
31306d |
BIND_CFG_MACS,
|
|
Packit Service |
31306d |
BIND_CFG_KEXALGORITHMS,
|
|
Packit Service |
31306d |
BIND_CFG_MATCH,
|
|
Packit Service |
31306d |
BIND_CFG_PUBKEY_ACCEPTED_KEY_TYPES,
|
|
Packit Service |
31306d |
BIND_CFG_HOSTKEY_ALGORITHMS,
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
BIND_CFG_MAX /* Keep this one last in the list */
|
|
Packit Service |
31306d |
};
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
/* @brief Parse configuration file and set the options to the given ssh_bind
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* @params[in] sshbind The ssh_bind context to be configured
|
|
Packit Service |
31306d |
* @params[in] filename The path to the configuration file
|
|
Packit Service |
31306d |
*
|
|
Packit Service |
31306d |
* @returns 0 on successful parsing the configuration file, -1 on error
|
|
Packit Service |
31306d |
*/
|
|
Packit Service |
31306d |
int ssh_bind_config_parse_file(ssh_bind sshbind, const char *filename);
|
|
Packit Service |
31306d |
|
|
Packit Service |
31306d |
#endif /* BIND_CONFIG_H_ */
|