version 1.12, 1999/10/11 21:07:37 |
version 1.13, 1999/10/11 21:48:29 |
|
|
options->use_login = -1; |
options->use_login = -1; |
options->num_allow_hosts = 0; |
options->num_allow_hosts = 0; |
options->num_deny_hosts = 0; |
options->num_deny_hosts = 0; |
|
options->num_allow_users = 0; |
|
options->num_deny_users = 0; |
|
options->num_allow_groups = 0; |
|
options->num_deny_groups = 0; |
} |
} |
|
|
void fill_default_server_options(ServerOptions *options) |
void fill_default_server_options(ServerOptions *options) |
|
|
sPasswordAuthentication, sAllowHosts, sDenyHosts, sListenAddress, |
sPasswordAuthentication, sAllowHosts, sDenyHosts, sListenAddress, |
sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, |
sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset, |
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail, |
sUseLogin |
sUseLogin, sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups |
|
|
} ServerOpCodes; |
} ServerOpCodes; |
|
|
/* Textual representation of the tokens. */ |
/* Textual representation of the tokens. */ |
|
|
{ "uselogin", sUseLogin }, |
{ "uselogin", sUseLogin }, |
{ "randomseed", sRandomSeedFile }, |
{ "randomseed", sRandomSeedFile }, |
{ "keepalive", sKeepAlives }, |
{ "keepalive", sKeepAlives }, |
|
{ "allowusers", sAllowUsers }, |
|
{ "denyusers", sDenyUsers }, |
|
{ "allowgroups", sAllowGroups }, |
|
{ "denygroups", sDenyGroups }, |
{ NULL, 0 } |
{ NULL, 0 } |
}; |
}; |
|
|
|
|
exit(1); |
exit(1); |
} |
} |
options->deny_hosts[options->num_deny_hosts++] = xstrdup(cp); |
options->deny_hosts[options->num_deny_hosts++] = xstrdup(cp); |
|
} |
|
break; |
|
|
|
case sAllowUsers: |
|
while ((cp = strtok(NULL, WHITESPACE))) |
|
{ |
|
if (options->num_allow_users >= MAX_ALLOW_USERS) |
|
{ |
|
fprintf(stderr, "%s line %d: too many allow users.\n", |
|
filename, linenum); |
|
exit(1); |
|
} |
|
options->allow_users[options->num_allow_users++] = xstrdup(cp); |
|
} |
|
break; |
|
|
|
case sDenyUsers: |
|
while ((cp = strtok(NULL, WHITESPACE))) |
|
{ |
|
if (options->num_deny_users >= MAX_DENY_USERS) |
|
{ |
|
fprintf(stderr, "%s line %d: too many deny users.\n", |
|
filename, linenum); |
|
exit(1); |
|
} |
|
options->deny_users[options->num_deny_users++] = xstrdup(cp); |
|
} |
|
break; |
|
|
|
case sAllowGroups: |
|
while ((cp = strtok(NULL, WHITESPACE))) |
|
{ |
|
if (options->num_allow_groups >= MAX_ALLOW_GROUPS) |
|
{ |
|
fprintf(stderr, "%s line %d: too many allow groups.\n", |
|
filename, linenum); |
|
exit(1); |
|
} |
|
options->allow_groups[options->num_allow_groups++] = xstrdup(cp); |
|
} |
|
break; |
|
|
|
case sDenyGroups: |
|
while ((cp = strtok(NULL, WHITESPACE))) |
|
{ |
|
if (options->num_deny_groups >= MAX_DENY_GROUPS) |
|
{ |
|
fprintf(stderr, "%s line %d: too many deny groups.\n", |
|
filename, linenum); |
|
exit(1); |
|
} |
|
options->deny_groups[options->num_deny_groups++] = xstrdup(cp); |
} |
} |
break; |
break; |
|
|