servconf.h revision 6f8d59d8fcaf391990ca04c7bdcf65ab23320fe0
7204N/A/*
7204N/A * Author: Tatu Ylonen <ylo@cs.hut.fi>
7204N/A * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
7204N/A * All rights reserved
7204N/A * Definitions for server configuration data and for the functions reading it.
7204N/A *
7204N/A * As far as I am concerned, the code I have written for this software
7204N/A * can be used freely for any purpose. Any derived versions of this
7204N/A * software must be clearly marked as such, and if the derived work is
7204N/A * incompatible with the protocol description in the RFC file, it must be
7204N/A * called by a name other than "ssh" or "Secure Shell".
7204N/A */
7204N/A/*
7204N/A * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
7204N/A * Use is subject to license terms.
7204N/A */
7204N/A
7204N/A/* $OpenBSD: servconf.h,v 1.59 2002/07/30 17:03:55 markus Exp $ */
7204N/A
7204N/A#ifndef _SERVCONF_H
7204N/A#define _SERVCONF_H
7204N/A
7204N/A#ifdef __cplusplus
7204N/Aextern "C" {
7204N/A#endif
7204N/A
7204N/A#define MAX_PORTS 256 /* Max # ports. */
7204N/A
7204N/A#define MAX_ALLOW_USERS 256 /* Max # users on allow list. */
7204N/A#define MAX_DENY_USERS 256 /* Max # users on deny list. */
7204N/A#define MAX_ALLOW_GROUPS 256 /* Max # groups on allow list. */
7204N/A#define MAX_DENY_GROUPS 256 /* Max # groups on deny list. */
7204N/A#define MAX_SUBSYSTEMS 256 /* Max # subsystems. */
7204N/A#define MAX_HOSTKEYS 256 /* Max # hostkeys. */
7204N/A
7204N/A/* permit_root_login */
7204N/A#define PERMIT_NOT_SET -1
7204N/A#define PERMIT_NO 0
7204N/A#define PERMIT_FORCED_ONLY 1
7204N/A#define PERMIT_NO_PASSWD 2
7204N/A#define PERMIT_YES 3
7204N/A
7204N/A/* Magic name for internal sftp-server */
7204N/A#define INTERNAL_SFTP_NAME "internal-sftp"
7204N/A
7204N/Atypedef struct {
7204N/A u_int num_ports;
7204N/A u_int ports_from_cmdline;
7204N/A u_short ports[MAX_PORTS]; /* Port number to listen on. */
7204N/A char *listen_addr; /* Address on which the server listens. */
7204N/A struct addrinfo *listen_addrs; /* Addresses on which the server listens. */
7204N/A char *host_key_files[MAX_HOSTKEYS]; /* Files containing host keys. */
7204N/A int num_host_key_files; /* Number of files for host keys. */
7204N/A char *pid_file; /* Where to put our pid */
7204N/A int server_key_bits;/* Size of the server key. */
7204N/A int login_grace_time; /* Disconnect if no auth in this time
7204N/A * (sec). */
7204N/A int key_regeneration_time; /* Server key lifetime (seconds). */
7204N/A int permit_root_login; /* PERMIT_*, see above */
7204N/A int ignore_rhosts; /* Ignore .rhosts and .shosts. */
7204N/A int ignore_user_known_hosts; /* Ignore ~/.ssh/known_hosts
7204N/A * for RhostsRsaAuth */
7204N/A int print_motd; /* If true, print /etc/motd. */
7204N/A int print_lastlog; /* If true, print lastlog */
7204N/A int x11_forwarding; /* If true, permit inet (spoofing) X11 fwd. */
7204N/A int x11_display_offset; /* What DISPLAY number to start
7204N/A * searching at */
7204N/A int x11_use_localhost; /* If true, use localhost for fake X11 server. */
7204N/A char *xauth_location; /* Location of xauth program */
7204N/A int strict_modes; /* If true, require string home dir modes. */
7204N/A int keepalives; /* If true, set SO_KEEPALIVE. */
7204N/A char *ciphers; /* Supported SSH2 ciphers. */
7204N/A char *macs; /* Supported SSH2 macs. */
7204N/A int protocol; /* Supported protocol versions. */
7204N/A int gateway_ports; /* If true, allow remote connects to forwarded ports. */
7204N/A SyslogFacility log_facility; /* Facility for system logging. */
7204N/A LogLevel log_level; /* Level for system logging. */
7204N/A int rhosts_authentication; /* If true, permit rhosts
7204N/A * authentication. */
7204N/A int rhosts_rsa_authentication; /* If true, permit rhosts RSA
7204N/A * authentication. */
7204N/A int hostbased_authentication; /* If true, permit ssh2 hostbased auth */
7204N/A int hostbased_uses_name_from_packet_only; /* experimental */
7204N/A int rsa_authentication; /* If true, permit RSA authentication. */
7204N/A int pubkey_authentication; /* If true, permit ssh2 pubkey authentication. */
7204N/A#ifdef GSSAPI
7204N/A int gss_authentication;
7204N/A int gss_keyex;
7204N/A int gss_store_creds;
7204N/A int gss_use_session_ccache; /* If true, delegated credentials are
7204N/A * stored in a session specific cache */
7204N/A int gss_cleanup_creds; /* If true, destroy cred cache on logout */
7204N/A#endif /* GSSAPI */
7204N/A#if defined(KRB4) || defined(KRB5)
7204N/A int kerberos_authentication; /* If true, permit Kerberos
7204N/A * authentication. */
7204N/A int kerberos_or_local_passwd; /* If true, permit kerberos
7204N/A * and any other password
7204N/A * authentication mechanism,
7204N/A * such as SecurID or
7204N/A * /etc/passwd */
7204N/A int kerberos_ticket_cleanup; /* If true, destroy ticket
7204N/A * file on logout. */
7204N/A#endif
7204N/A#if defined(AFS) || defined(KRB5)
7204N/A int kerberos_tgt_passing; /* If true, permit Kerberos TGT
7204N/A * passing. */
7204N/A#endif
7204N/A#ifdef AFS
7204N/A int afs_token_passing; /* If true, permit AFS token passing. */
7204N/A#endif
7204N/A int password_authentication; /* If true, permit password
7204N/A * authentication. */
7204N/A int kbd_interactive_authentication; /* If true, permit */
7204N/A int challenge_response_authentication;
7204N/A int permit_empty_passwd; /* If false, do not permit empty
7204N/A * passwords. */
7204N/A int permit_user_env; /* If true, read ~/.ssh/environment */
7204N/A int use_login; /* If true, login(1) is used */
7204N/A int compression; /* If true, compression is allowed */
7204N/A int allow_tcp_forwarding;
7204N/A
7204N/A u_int num_allow_users;
7204N/A char *allow_users[MAX_ALLOW_USERS];
7204N/A u_int num_deny_users;
7204N/A char *deny_users[MAX_DENY_USERS];
7204N/A u_int num_allow_groups;
7204N/A char *allow_groups[MAX_ALLOW_GROUPS];
7204N/A u_int num_deny_groups;
7204N/A char *deny_groups[MAX_DENY_GROUPS];
7204N/A
7204N/A u_int num_subsystems;
7204N/A char *subsystem_name[MAX_SUBSYSTEMS];
7204N/A char *subsystem_command[MAX_SUBSYSTEMS];
7204N/A char *subsystem_args[MAX_SUBSYSTEMS];
7204N/A
7204N/A int max_startups_begin;
7204N/A int max_startups_rate;
7204N/A int max_startups;
7204N/A char *banner; /* SSH-2 banner message */
7204N/A int verify_reverse_mapping; /* cross-check ip and dns */
7204N/A int client_alive_interval; /*
7204N/A * poke the client this often to
7204N/A * see if it's still there
7204N/A */
7204N/A int client_alive_count_max; /*
7204N/A * If the client is unresponsive
7204N/A * for this many intervals above,
7204N/A * disconnect the session
7204N/A */
7204N/A
7204N/A char *authorized_keys_file; /* File containing public keys */
7204N/A char *authorized_keys_file2;
7204N/A
7204N/A int pam_authentication_via_kbd_int;
7204N/A
7204N/A int max_auth_tries;
7204N/A int max_auth_tries_log;
7204N/A
7204N/A int max_init_auth_tries; /* SUNW: /etc/default/login */
7204N/A int max_init_auth_tries_log; /* SUNW: /etc/default/login */
7204N/A
7204N/A int lookup_client_hostnames;
7204N/A int use_openssl_engine;
7204N/A char *chroot_directory;
7204N/A
7204N/A} ServerOptions;
7204N/A
7204N/Avoid initialize_server_options(ServerOptions *);
7204N/Avoid read_server_config(ServerOptions *, const char *);
7204N/Avoid fill_default_server_options(ServerOptions *);
7204N/Aint process_server_config_line(ServerOptions *, char *, const char *, int);
7204N/Aint chroot_requested(char *chroot_directory);
7204N/A
7204N/A#ifdef __cplusplus
7204N/A}
7204N/A#endif
7204N/A
7204N/A
7204N/A#endif /* _SERVCONF_H */
7204N/A