servconf.h revision 57429
1119482Sobrien/* 238465Smsmith * 338465Smsmith * servconf.h 438465Smsmith * 538465Smsmith * Author: Tatu Ylonen <ylo@cs.hut.fi> 638465Smsmith * 738465Smsmith * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland 838465Smsmith * All rights reserved 938465Smsmith * 1038465Smsmith * Created: Mon Aug 21 15:35:03 1995 ylo 1138465Smsmith * 1238465Smsmith * Definitions for server configuration data and for the functions reading it. 1338465Smsmith * 1438465Smsmith */ 1538465Smsmith 1638465Smsmith/* RCSID("$Id: servconf.h,v 1.15 2000/01/04 00:08:00 markus Exp $"); */ 1738465Smsmith 1838465Smsmith#ifndef SERVCONF_H 1938465Smsmith#define SERVCONF_H 2038465Smsmith 2138465Smsmith#define MAX_PORTS 256 /* Max # ports. */ 2238465Smsmith 2338465Smsmith#define MAX_ALLOW_USERS 256 /* Max # users on allow list. */ 2438465Smsmith#define MAX_DENY_USERS 256 /* Max # users on deny list. */ 2538465Smsmith#define MAX_ALLOW_GROUPS 256 /* Max # groups on allow list. */ 26119482Sobrien#define MAX_DENY_GROUPS 256 /* Max # groups on deny list. */ 27119482Sobrien 28119482Sobrientypedef struct { 2938465Smsmith unsigned int num_ports; 3039441Smsmith unsigned int ports_from_cmdline; 3141285Srnordier u_short ports[MAX_PORTS]; /* Port number to listen on. */ 32120118Sbde char *listen_addr; /* Address on which the server listens. */ 33229435Skib struct addrinfo *listen_addrs; /* Addresses on which the server listens. */ 3439441Smsmith char *host_key_file; /* File containing host key. */ 3538465Smsmith int server_key_bits;/* Size of the server key. */ 3641285Srnordier int login_grace_time; /* Disconnect if no auth in this time 3741285Srnordier * (sec). */ 3841285Srnordier int key_regeneration_time; /* Server key lifetime (seconds). */ 39149213Siedowse int permit_root_login; /* If true, permit root login. */ 4041285Srnordier int ignore_rhosts; /* Ignore .rhosts and .shosts. */ 4142480Srnordier int ignore_user_known_hosts; /* Ignore ~/.ssh/known_hosts 4241285Srnordier * for RhostsRsaAuth */ 4342480Srnordier int print_motd; /* If true, print /etc/motd. */ 4442480Srnordier int check_mail; /* If true, check for new mail. */ 4541285Srnordier int x11_forwarding; /* If true, permit inet (spoofing) X11 fwd. */ 4642480Srnordier int x11_display_offset; /* What DISPLAY number to start 4741285Srnordier * searching at */ 4838465Smsmith int strict_modes; /* If true, require string home dir modes. */ 4938465Smsmith int keepalives; /* If true, set SO_KEEPALIVE. */ 5039441Smsmith SyslogFacility log_facility; /* Facility for system logging. */ 5139441Smsmith LogLevel log_level; /* Level for system logging. */ 52149213Siedowse int rhosts_authentication; /* If true, permit rhosts 5339441Smsmith * authentication. */ 54229435Skib int rhosts_rsa_authentication; /* If true, permit rhosts RSA 55229435Skib * authentication. */ 56229435Skib int rsa_authentication; /* If true, permit RSA authentication. */ 57229435Skib#ifdef KRB4 58229435Skib int kerberos_authentication; /* If true, permit Kerberos 59229435Skib * authentication. */ 60229435Skib int kerberos_or_local_passwd; /* If true, permit kerberos 61229435Skib * and any other password 62149213Siedowse * authentication mechanism, 63149213Siedowse * such as SecurID or 6438465Smsmith * /etc/passwd */ 65149213Siedowse int kerberos_ticket_cleanup; /* If true, destroy ticket 66229435Skib * file on logout. */ 67229435Skib#endif 6840211Speter#ifdef AFS 6938465Smsmith int kerberos_tgt_passing; /* If true, permit Kerberos tgt 7038465Smsmith * passing. */ 7141285Srnordier int afs_token_passing; /* If true, permit AFS token passing. */ 7238465Smsmith#endif 7338465Smsmith int password_authentication; /* If true, permit password 7438465Smsmith * authentication. */ 7539441Smsmith#ifdef SKEY 7639441Smsmith int skey_authentication; /* If true, permit s/key 7739441Smsmith * authentication. */ 7838465Smsmith#endif 7938465Smsmith int permit_empty_passwd; /* If false, do not permit empty 8038465Smsmith * passwords. */ 8138465Smsmith int use_login; /* If true, login(1) is used */ 8238465Smsmith unsigned int num_allow_users; 83229435Skib char *allow_users[MAX_ALLOW_USERS]; 84229435Skib unsigned int num_deny_users; 85229435Skib char *deny_users[MAX_DENY_USERS]; 86229435Skib unsigned int num_allow_groups; 87149213Siedowse char *allow_groups[MAX_ALLOW_GROUPS]; 88149213Siedowse unsigned int num_deny_groups; 89149213Siedowse char *deny_groups[MAX_DENY_GROUPS]; 90149213Siedowse} ServerOptions; 91149213Siedowse/* 92149213Siedowse * Initializes the server options to special values that indicate that they 93149213Siedowse * have not yet been set. 94149213Siedowse */ 95149213Siedowsevoid initialize_server_options(ServerOptions * options); 96149213Siedowse 97149213Siedowse/* 98149213Siedowse * Reads the server configuration file. This only sets the values for those 99229435Skib * options that have the special value indicating they have not been set. 100229435Skib */ 101229435Skibvoid read_server_config(ServerOptions * options, const char *filename); 102229435Skib 103149213Siedowse/* Sets values for those values that have not yet been set. */ 104149213Siedowsevoid fill_default_server_options(ServerOptions * options); 105149213Siedowse 106149213Siedowse#endif /* SERVCONF_H */ 107229435Skib