diff options
author | des <des@FreeBSD.org> | 2006-03-22 20:41:37 +0000 |
---|---|---|
committer | des <des@FreeBSD.org> | 2006-03-22 20:41:37 +0000 |
commit | 7c07891caf91823c65d0ed7f700a1cfe983e15cc (patch) | |
tree | fb276a713da5dc24fdafffe04d15c0de14e138e2 /crypto/openssh/servconf.c | |
parent | c2efe9a3053e865e5c7bf36de808ec154ddb8c36 (diff) | |
download | FreeBSD-src-7c07891caf91823c65d0ed7f700a1cfe983e15cc.zip FreeBSD-src-7c07891caf91823c65d0ed7f700a1cfe983e15cc.tar.gz |
Merge conflicts.
Diffstat (limited to 'crypto/openssh/servconf.c')
-rw-r--r-- | crypto/openssh/servconf.c | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/crypto/openssh/servconf.c b/crypto/openssh/servconf.c index 466f897..9b2a31a 100644 --- a/crypto/openssh/servconf.c +++ b/crypto/openssh/servconf.c @@ -10,7 +10,7 @@ */ #include "includes.h" -RCSID("$OpenBSD: servconf.c,v 1.144 2005/08/06 10:03:12 dtucker Exp $"); +RCSID("$OpenBSD: servconf.c,v 1.146 2005/12/08 18:34:11 reyk Exp $"); RCSID("$FreeBSD$"); #include "ssh.h" @@ -102,6 +102,7 @@ initialize_server_options(ServerOptions *options) options->authorized_keys_file = NULL; options->authorized_keys_file2 = NULL; options->num_accept_env = 0; + options->permit_tun = -1; /* Needs to be accessable in many places */ use_privsep = -1; @@ -232,6 +233,8 @@ fill_default_server_options(ServerOptions *options) } if (options->authorized_keys_file == NULL) options->authorized_keys_file = _PATH_SSH_USER_PERMITTED_KEYS; + if (options->permit_tun == -1) + options->permit_tun = SSH_TUNMODE_NO; /* Turn privilege separation on by default */ if (use_privsep == -1) @@ -273,7 +276,7 @@ typedef enum { sBanner, sUseDNS, sHostbasedAuthentication, sHostbasedUsesNameFromPacketOnly, sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2, - sGssAuthentication, sGssCleanupCreds, sAcceptEnv, + sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel, sUsePrivilegeSeparation, sVersionAddendum, sDeprecated, sUnsupported @@ -377,6 +380,7 @@ static struct { { "authorizedkeysfile2", sAuthorizedKeysFile2 }, { "useprivilegeseparation", sUsePrivilegeSeparation}, { "acceptenv", sAcceptEnv }, + { "permittunnel", sPermitTunnel }, { "versionaddendum", sVersionAddendum }, { NULL, sBadOption } }; @@ -967,6 +971,28 @@ parse_flag: } break; + case sPermitTunnel: + intptr = &options->permit_tun; + arg = strdelim(&cp); + if (!arg || *arg == '\0') + fatal("%s line %d: Missing yes/point-to-point/" + "ethernet/no argument.", filename, linenum); + value = 0; /* silence compiler */ + if (strcasecmp(arg, "ethernet") == 0) + value = SSH_TUNMODE_ETHERNET; + else if (strcasecmp(arg, "point-to-point") == 0) + value = SSH_TUNMODE_POINTOPOINT; + else if (strcasecmp(arg, "yes") == 0) + value = SSH_TUNMODE_YES; + else if (strcasecmp(arg, "no") == 0) + value = SSH_TUNMODE_NO; + else + fatal("%s line %d: Bad yes/point-to-point/ethernet/" + "no argument: %s", filename, linenum, arg); + if (*intptr == -1) + *intptr = value; + break; + case sVersionAddendum: ssh_version_set_addendum(strtok(cp, "\n")); do { |