version 1.42, 2000/05/31 06:36:40 |
version 1.43, 2000/06/17 22:52:33 |
|
|
options->ciphers = NULL; |
options->ciphers = NULL; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->protocol = SSH_PROTO_UNKNOWN; |
options->gateway_ports = -1; |
options->gateway_ports = -1; |
|
options->num_subsystems = 0; |
} |
} |
|
|
void |
void |
|
|
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups, |
sIgnoreUserKnownHosts, sHostDSAKeyFile, sCiphers, sProtocol, sPidFile, |
sIgnoreUserKnownHosts, sHostDSAKeyFile, sCiphers, sProtocol, sPidFile, |
sGatewayPorts, sDSAAuthentication, sXAuthLocation |
sGatewayPorts, sDSAAuthentication, sXAuthLocation, sSubsystem |
} ServerOpCodes; |
} ServerOpCodes; |
|
|
/* Textual representation of the tokens. */ |
/* Textual representation of the tokens. */ |
|
|
{ "ciphers", sCiphers }, |
{ "ciphers", sCiphers }, |
{ "protocol", sProtocol }, |
{ "protocol", sProtocol }, |
{ "gatewayports", sGatewayPorts }, |
{ "gatewayports", sGatewayPorts }, |
|
{ "subsystem", sSubsystem }, |
{ NULL, 0 } |
{ NULL, 0 } |
}; |
}; |
|
|
|
|
int linenum, *intptr, value; |
int linenum, *intptr, value; |
int bad_options = 0; |
int bad_options = 0; |
ServerOpCodes opcode; |
ServerOpCodes opcode; |
|
int i; |
|
|
f = fopen(filename, "r"); |
f = fopen(filename, "r"); |
if (!f) { |
if (!f) { |
|
|
filename, linenum, cp ? cp : "<NONE>"); |
filename, linenum, cp ? cp : "<NONE>"); |
if (*intptr == SSH_PROTO_UNKNOWN) |
if (*intptr == SSH_PROTO_UNKNOWN) |
*intptr = value; |
*intptr = value; |
|
break; |
|
|
|
case sSubsystem: |
|
if(options->num_subsystems >= MAX_SUBSYSTEMS) { |
|
fatal("%s line %d: too many subsystems defined.", |
|
filename, linenum); |
|
} |
|
cp = strtok(NULL, WHITESPACE); |
|
if (!cp) |
|
fatal("%s line %d: Missing subsystem name.", |
|
filename, linenum); |
|
for (i = 0; i < options->num_subsystems; i++) |
|
if(strcmp(cp, options->subsystem_name[i]) == 0) |
|
fatal("%s line %d: Subsystem '%s' already defined.", |
|
filename, linenum, cp); |
|
options->subsystem_name[options->num_subsystems] = xstrdup(cp); |
|
cp = strtok(NULL, WHITESPACE); |
|
if (!cp) |
|
fatal("%s line %d: Missing subsystem command.", |
|
filename, linenum); |
|
options->subsystem_command[options->num_subsystems] = xstrdup(cp); |
|
options->num_subsystems++; |
break; |
break; |
|
|
default: |
default: |