Deleted Added
full compact
servconf.c (73400) servconf.c (76227)
1/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved
4 *
5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
10 */
11
12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.53 2000/10/14 12:12:09 markus Exp $");
1/*
2 * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
3 * All rights reserved
4 *
5 * As far as I am concerned, the code I have written for this software
6 * can be used freely for any purpose. Any derived versions of this
7 * software must be clearly marked as such, and if the derived work is
8 * incompatible with the protocol description in the RFC file, it must be
9 * called by a name other than "ssh" or "Secure Shell".
10 */
11
12#include "includes.h"
13RCSID("$OpenBSD: servconf.c,v 1.53 2000/10/14 12:12:09 markus Exp $");
14RCSID("$FreeBSD: head/crypto/openssh/servconf.c 73400 2001-03-04 02:22:04Z assar $");
14RCSID("$FreeBSD: head/crypto/openssh/servconf.c 76227 2001-05-03 00:29:28Z green $");
15
16#include "ssh.h"
17#include "servconf.h"
18#include "xmalloc.h"
19#include "compat.h"
20
21/* add listen address */
22void add_listen_addr(ServerOptions *options, char *addr);

--- 195 unchanged lines hidden (view full) ---

218#endif
219 sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress,
220 sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset,
221 sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail,
222 sUseLogin, sAllowTcpForwarding,
223 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
224 sIgnoreUserKnownHosts, sHostDSAKeyFile, sCiphers, sProtocol, sPidFile,
225 sGatewayPorts, sDSAAuthentication, sConnectionsPerPeriod, sXAuthLocation,
15
16#include "ssh.h"
17#include "servconf.h"
18#include "xmalloc.h"
19#include "compat.h"
20
21/* add listen address */
22void add_listen_addr(ServerOptions *options, char *addr);

--- 195 unchanged lines hidden (view full) ---

218#endif
219 sPasswordAuthentication, sKbdInteractiveAuthentication, sListenAddress,
220 sPrintMotd, sIgnoreRhosts, sX11Forwarding, sX11DisplayOffset,
221 sStrictModes, sEmptyPasswd, sRandomSeedFile, sKeepAlives, sCheckMail,
222 sUseLogin, sAllowTcpForwarding,
223 sAllowUsers, sDenyUsers, sAllowGroups, sDenyGroups,
224 sIgnoreUserKnownHosts, sHostDSAKeyFile, sCiphers, sProtocol, sPidFile,
225 sGatewayPorts, sDSAAuthentication, sConnectionsPerPeriod, sXAuthLocation,
226 sSubsystem, sMaxStartups
226 sSubsystem, sMaxStartups, sVersionAddendum
227} ServerOpCodes;
228
229/* Textual representation of the tokens. */
230static struct {
231 const char *name;
232 ServerOpCodes opcode;
233} keywords[] = {
234 { "port", sPort },

--- 48 unchanged lines hidden (view full) ---

283 { "allowgroups", sAllowGroups },
284 { "denygroups", sDenyGroups },
285 { "ciphers", sCiphers },
286 { "protocol", sProtocol },
287 { "gatewayports", sGatewayPorts },
288 { "connectionsperperiod", sConnectionsPerPeriod },
289 { "subsystem", sSubsystem },
290 { "maxstartups", sMaxStartups },
227} ServerOpCodes;
228
229/* Textual representation of the tokens. */
230static struct {
231 const char *name;
232 ServerOpCodes opcode;
233} keywords[] = {
234 { "port", sPort },

--- 48 unchanged lines hidden (view full) ---

283 { "allowgroups", sAllowGroups },
284 { "denygroups", sDenyGroups },
285 { "ciphers", sCiphers },
286 { "protocol", sProtocol },
287 { "gatewayports", sGatewayPorts },
288 { "connectionsperperiod", sConnectionsPerPeriod },
289 { "subsystem", sSubsystem },
290 { "maxstartups", sMaxStartups },
291 { "versionaddendum", sVersionAddendum },
291 { NULL, 0 }
292};
293
294/*
295 * Returns the number of the token pointed to by cp of length len. Never
296 * returns if the token is not known.
297 */
298

--- 432 unchanged lines hidden (view full) ---

731 options->max_startups_rate < 1)
732 fatal("%s line %d: Illegal MaxStartups spec.",
733 filename, linenum);
734 break;
735 }
736 intptr = &options->max_startups;
737 goto parse_int;
738
292 { NULL, 0 }
293};
294
295/*
296 * Returns the number of the token pointed to by cp of length len. Never
297 * returns if the token is not known.
298 */
299

--- 432 unchanged lines hidden (view full) ---

732 options->max_startups_rate < 1)
733 fatal("%s line %d: Illegal MaxStartups spec.",
734 filename, linenum);
735 break;
736 }
737 intptr = &options->max_startups;
738 goto parse_int;
739
740 case sVersionAddendum:
741 ssh_version_set_addendum(strtok(cp, "\n"));
742 do
743 arg = strdelim(&cp);
744 while (arg != NULL && *arg != '\0');
745 break;
746
739 default:
740 fatal("%.200s line %d: Missing handler for opcode %s (%d)\n",
741 filename, linenum,arg, opcode);
742 }
743 if ((arg = strdelim(&cp)) != NULL && *arg != '\0') {
744 fprintf(stderr,
745 "%s line %d: garbage at end of line; \"%.200s\".\n",
746 filename, linenum, arg);
747 exit(1);
748 }
749 }
750 fclose(f);
751 if (bad_options > 0) {
752 fatal("%.200s: terminating, %d bad configuration options\n",
753 filename, bad_options);
754 }
755}
747 default:
748 fatal("%.200s line %d: Missing handler for opcode %s (%d)\n",
749 filename, linenum,arg, opcode);
750 }
751 if ((arg = strdelim(&cp)) != NULL && *arg != '\0') {
752 fprintf(stderr,
753 "%s line %d: garbage at end of line; \"%.200s\".\n",
754 filename, linenum, arg);
755 exit(1);
756 }
757 }
758 fclose(f);
759 if (bad_options > 0) {
760 fatal("%.200s: terminating, %d bad configuration options\n",
761 filename, bad_options);
762 }
763}