- (djm) Reorder portable-specific server options so that they come first.

This should help reduce diff collisions for new server options (as they
   will appear at the end)
This commit is contained in:
Damien Miller 2001-11-12 11:40:11 +11:00
parent 75413ac499
commit 726273e129
2 changed files with 32 additions and 12 deletions

View File

@ -60,7 +60,8 @@
original patch from jlk@kamens.brookline.ma.us via nalin@redhat.com original patch from jlk@kamens.brookline.ma.us via nalin@redhat.com
- markus@cvs.openbsd.org 2001/11/10 13:19:45 - markus@cvs.openbsd.org 2001/11/10 13:19:45
[sshd.c] [sshd.c]
cleanup libwrap support (remove bogus comment, bogus close(), add debug, etc). cleanup libwrap support (remove bogus comment, bogus close(), add
debug, etc).
- markus@cvs.openbsd.org 2001/11/10 13:22:42 - markus@cvs.openbsd.org 2001/11/10 13:22:42
[ssh-rsa.c] [ssh-rsa.c]
KNF (unexpand) KNF (unexpand)
@ -69,7 +70,11 @@
remove extra debug() remove extra debug()
- markus@cvs.openbsd.org 2001/11/11 13:02:31 - markus@cvs.openbsd.org 2001/11/11 13:02:31
[servconf.c] [servconf.c]
make AuthorizedKeysFile2 fallback to AuthorizedKeysFile if AuthorizedKeysFile is specified. make AuthorizedKeysFile2 fallback to AuthorizedKeysFile if
AuthorizedKeysFile is specified.
- (djm) Reorder portable-specific server options so that they come first.
This should help reduce diff collisions for new server options (as they
will appear at the end)
20011109 20011109
- (stevesk) auth-pam.c: use do_pam_authenticate(PAM_DISALLOW_NULL_AUTHTOK) - (stevesk) auth-pam.c: use do_pam_authenticate(PAM_DISALLOW_NULL_AUTHTOK)
@ -6882,4 +6887,4 @@
- Wrote replacements for strlcpy and mkdtemp - Wrote replacements for strlcpy and mkdtemp
- Released 1.0pre1 - Released 1.0pre1
$Id: ChangeLog,v 1.1656 2001/11/12 00:14:35 djm Exp $ $Id: ChangeLog,v 1.1657 2001/11/12 00:40:11 djm Exp $

View File

@ -43,6 +43,11 @@ void
initialize_server_options(ServerOptions *options) initialize_server_options(ServerOptions *options)
{ {
memset(options, 0, sizeof(*options)); memset(options, 0, sizeof(*options));
/* Portable-specific options */
options->pam_authentication_via_kbd_int = -1;
/* Standard Options */
options->num_ports = 0; options->num_ports = 0;
options->ports_from_cmdline = 0; options->ports_from_cmdline = 0;
options->listen_addrs = NULL; options->listen_addrs = NULL;
@ -104,12 +109,16 @@ initialize_server_options(ServerOptions *options)
options->client_alive_count_max = -1; options->client_alive_count_max = -1;
options->authorized_keys_file = NULL; options->authorized_keys_file = NULL;
options->authorized_keys_file2 = NULL; options->authorized_keys_file2 = NULL;
options->pam_authentication_via_kbd_int = -1;
} }
void void
fill_default_server_options(ServerOptions *options) fill_default_server_options(ServerOptions *options)
{ {
/* Portable-specific options */
if (options->pam_authentication_via_kbd_int == -1)
options->pam_authentication_via_kbd_int = 0;
/* Standard Options */
if (options->protocol == SSH_PROTO_UNKNOWN) if (options->protocol == SSH_PROTO_UNKNOWN)
options->protocol = SSH_PROTO_1|SSH_PROTO_2; options->protocol = SSH_PROTO_1|SSH_PROTO_2;
if (options->num_host_key_files == 0) { if (options->num_host_key_files == 0) {
@ -222,13 +231,14 @@ fill_default_server_options(ServerOptions *options)
} }
if (options->authorized_keys_file == NULL) if (options->authorized_keys_file == NULL)
options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS;
if (options->pam_authentication_via_kbd_int == -1)
options->pam_authentication_via_kbd_int = 0;
} }
/* Keyword tokens. */ /* Keyword tokens. */
typedef enum { typedef enum {
sBadOption, /* == unknown option */ sBadOption, /* == unknown option */
/* Portable-specific options */
sPAMAuthenticationViaKbdInt,
/* Standard Options */
sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime, sPort, sHostKeyFile, sServerKeyBits, sLoginGraceTime, sKeyRegenerationTime,
sPermitRootLogin, sLogFacility, sLogLevel, sPermitRootLogin, sLogFacility, sLogLevel,
sRhostsAuthentication, sRhostsRSAAuthentication, sRSAAuthentication, sRhostsAuthentication, sRhostsRSAAuthentication, sRSAAuthentication,
@ -253,7 +263,7 @@ typedef enum {
sBanner, sReverseMappingCheck, sHostbasedAuthentication, sBanner, sReverseMappingCheck, sHostbasedAuthentication,
sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sHostbasedUsesNameFromPacketOnly, sClientAliveInterval,
sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
sDeprecated, sPAMAuthenticationViaKbdInt sDeprecated
} ServerOpCodes; } ServerOpCodes;
/* Textual representation of the tokens. */ /* Textual representation of the tokens. */
@ -261,6 +271,9 @@ static struct {
const char *name; const char *name;
ServerOpCodes opcode; ServerOpCodes opcode;
} keywords[] = { } keywords[] = {
/* Portable-specific options */
{ "PAMAuthenticationViaKbdInt", sPAMAuthenticationViaKbdInt },
/* Standard Options */
{ "port", sPort }, { "port", sPort },
{ "hostkey", sHostKeyFile }, { "hostkey", sHostKeyFile },
{ "hostdsakey", sHostKeyFile }, /* alias */ { "hostdsakey", sHostKeyFile }, /* alias */
@ -323,7 +336,6 @@ static struct {
{ "clientalivecountmax", sClientAliveCountMax }, { "clientalivecountmax", sClientAliveCountMax },
{ "authorizedkeysfile", sAuthorizedKeysFile }, { "authorizedkeysfile", sAuthorizedKeysFile },
{ "authorizedkeysfile2", sAuthorizedKeysFile2 }, { "authorizedkeysfile2", sAuthorizedKeysFile2 },
{ "PAMAuthenticationViaKbdInt", sPAMAuthenticationViaKbdInt },
{ NULL, 0 } { NULL, 0 }
}; };
@ -417,6 +429,13 @@ read_server_config(ServerOptions *options, const char *filename)
case sBadOption: case sBadOption:
bad_options++; bad_options++;
continue; continue;
/* Portable-specific options */
case sPAMAuthenticationViaKbdInt:
intptr = &options->pam_authentication_via_kbd_int;
goto parse_flag;
/* Standard Options */
case sPort: case sPort:
/* ignore ports from configfile if cmdline specifies ports */ /* ignore ports from configfile if cmdline specifies ports */
if (options->ports_from_cmdline) if (options->ports_from_cmdline)
@ -849,10 +868,6 @@ parse_flag:
arg = strdelim(&cp); arg = strdelim(&cp);
break; break;
case sPAMAuthenticationViaKbdInt:
intptr = &options->pam_authentication_via_kbd_int;
goto parse_flag;
default: default:
fatal("%s line %d: Missing handler for opcode %s (%d)", fatal("%s line %d: Missing handler for opcode %s (%d)",
filename, linenum, arg, opcode); filename, linenum, arg, opcode);