]> andersk Git - openssh.git/blobdiff - servconf.c
- djm@cvs.openbsd.org 2009/11/17 05:31:44
[openssh.git] / servconf.c
index e7fc2a7812a78a0343a8012d5b084a328d6b586c..729f23bade344f0b7a7f1937d8a9fd2b42b30f70 100644 (file)
@@ -1,4 +1,4 @@
-/* $OpenBSD: servconf.c,v 1.194 2009/01/22 10:02:34 djm Exp $ */
+/* $OpenBSD: servconf.c,v 1.197 2009/10/28 16:38:18 reyk Exp $ */
 /*
  * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland
  *                    All rights reserved
@@ -128,6 +128,7 @@ initialize_server_options(ServerOptions *options)
        options->adm_forced_command = NULL;
        options->chroot_directory = NULL;
        options->zero_knowledge_password_authentication = -1;
+       options->rdomain = -1;
 }
 
 void
@@ -139,7 +140,7 @@ fill_default_server_options(ServerOptions *options)
 
        /* Standard Options */
        if (options->protocol == SSH_PROTO_UNKNOWN)
-               options->protocol = SSH_PROTO_1|SSH_PROTO_2;
+               options->protocol = SSH_PROTO_2;
        if (options->num_host_key_files == 0) {
                /* fill default hostkeys for protocols */
                if (options->protocol & SSH_PROTO_1)
@@ -304,7 +305,7 @@ typedef enum {
        sClientAliveCountMax, sAuthorizedKeysFile, sAuthorizedKeysFile2,
        sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
        sMatch, sPermitOpen, sForceCommand, sChrootDirectory,
-       sUsePrivilegeSeparation, sAllowAgentForwarding,
+       sUsePrivilegeSeparation, sAllowAgentForwarding, sRDomain,
        sZeroKnowledgePasswordAuthentication,
        sDeprecated, sUnsupported
 } ServerOpCodes;
@@ -343,7 +344,7 @@ static struct {
        { "hostbasedusesnamefrompacketonly", sHostbasedUsesNameFromPacketOnly, SSHCFG_GLOBAL },
        { "rsaauthentication", sRSAAuthentication, SSHCFG_ALL },
        { "pubkeyauthentication", sPubkeyAuthentication, SSHCFG_ALL },
-       { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL },  /* alias */
+       { "dsaauthentication", sPubkeyAuthentication, SSHCFG_GLOBAL }, /* alias */
 #ifdef KRB5
        { "kerberosauthentication", sKerberosAuthentication, SSHCFG_ALL },
        { "kerberosorlocalpasswd", sKerberosOrLocalPasswd, SSHCFG_GLOBAL },
@@ -417,12 +418,13 @@ static struct {
        { "clientalivecountmax", sClientAliveCountMax, SSHCFG_GLOBAL },
        { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_GLOBAL },
        { "authorizedkeysfile2", sAuthorizedKeysFile2, SSHCFG_GLOBAL },
-       { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL },
+       { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL},
        { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL },
        { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL },
-       { "match", sMatch, SSHCFG_ALL },
+       { "match", sMatch, SSHCFG_ALL },
        { "permitopen", sPermitOpen, SSHCFG_ALL },
        { "forcecommand", sForceCommand, SSHCFG_ALL },
+       { "rdomain", sRDomain, SSHCFG_GLOBAL },
        { "chrootdirectory", sChrootDirectory, SSHCFG_ALL },
        { NULL, sBadOption, 0 }
 };
@@ -1294,6 +1296,10 @@ process_server_config_line(ServerOptions *options, char *line,
                        *charptr = xstrdup(arg);
                break;
 
+       case sRDomain:
+               intptr = &options->rdomain;
+               goto parse_int;
+
        case sDeprecated:
                logit("%s line %d: Deprecated option %s",
                    filename, linenum, arg);
@@ -1376,7 +1382,7 @@ parse_server_match_config(ServerOptions *options, const char *user,
 /*
  * Copy any supported values that are set.
  *
- * If the preauth flag is set, we do not bother copying the the string or
+ * If the preauth flag is set, we do not bother copying the string or
  * array values that are not used pre-authentication, because any that we
  * do use must be explictly sent in mm_getpwnamallow().
  */
@@ -1570,6 +1576,7 @@ dump_config(ServerOptions *o)
        dump_cfg_int(sMaxSessions, o->max_sessions);
        dump_cfg_int(sClientAliveInterval, o->client_alive_interval);
        dump_cfg_int(sClientAliveCountMax, o->client_alive_count_max);
+       dump_cfg_int(sRDomain, o->rdomain);
 
        /* formatted integer arguments */
        dump_cfg_fmtint(sPermitRootLogin, o->permit_root_login);
This page took 0.049914 seconds and 4 git commands to generate.