Merge from vendor branch DIFFUTILS:
[dragonfly.git] / secure / usr.sbin / sshd / servconf.c.patch
1 $DragonFly: src/secure/usr.sbin/sshd/Attic/servconf.c.patch,v 1.3 2006/09/28 18:42:50 corecode Exp $
2 --- servconf.c  2006-08-18 16:23:15.000000000 +0200
3 +++ servconf.c  2006-09-28 19:55:05.000000000 +0200
4 @@ -133,7 +133,7 @@
5  
6         /* Standard Options */
7         if (options->protocol == SSH_PROTO_UNKNOWN)
8 -               options->protocol = SSH_PROTO_1|SSH_PROTO_2;
9 +               options->protocol = SSH_PROTO_2;
10         if (options->num_host_key_files == 0) {
11                 /* fill default hostkeys for protocols */
12                 if (options->protocol & SSH_PROTO_1)
13 @@ -141,8 +141,6 @@
14                             _PATH_HOST_KEY_FILE;
15                 if (options->protocol & SSH_PROTO_2) {
16                         options->host_key_files[options->num_host_key_files++] =
17 -                           _PATH_HOST_RSA_KEY_FILE;
18 -                       options->host_key_files[options->num_host_key_files++] =
19                             _PATH_HOST_DSA_KEY_FILE;
20                 }
21         }
22 @@ -159,7 +157,7 @@
23         if (options->key_regeneration_time == -1)
24                 options->key_regeneration_time = 3600;
25         if (options->permit_root_login == PERMIT_NOT_SET)
26 -               options->permit_root_login = PERMIT_YES;
27 +               options->permit_root_login = PERMIT_NO;
28         if (options->ignore_rhosts == -1)
29                 options->ignore_rhosts = 1;
30         if (options->ignore_user_known_hosts == -1)
31 @@ -169,7 +167,7 @@
32         if (options->print_lastlog == -1)
33                 options->print_lastlog = 1;
34         if (options->x11_forwarding == -1)
35 -               options->x11_forwarding = 0;
36 +               options->x11_forwarding = 1;
37         if (options->x11_display_offset == -1)
38                 options->x11_display_offset = 10;
39         if (options->x11_use_localhost == -1)
40 @@ -293,6 +291,7 @@
41         sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
42         sMatch, sPermitOpen, sForceCommand,
43         sUsePrivilegeSeparation,
44 +       sVersionAddendum,
45         sDeprecated, sUnsupported
46  } ServerOpCodes;
47  
48 @@ -398,6 +397,7 @@
49         { "authorizedkeysfile", sAuthorizedKeysFile, SSHCFG_GLOBAL },
50         { "authorizedkeysfile2", sAuthorizedKeysFile2, SSHCFG_GLOBAL },
51         { "useprivilegeseparation", sUsePrivilegeSeparation, SSHCFG_GLOBAL },
52 +       { "versionaddendum", sVersionAddendum , SSHCFG_GLOBAL },
53         { "acceptenv", sAcceptEnv, SSHCFG_GLOBAL },
54         { "permittunnel", sPermitTunnel, SSHCFG_GLOBAL },
55         { "match", sMatch, SSHCFG_ALL },
56 @@ -1253,6 +1253,13 @@
57                         options->adm_forced_command = xstrdup(cp + len);
58                 return 0;
59  
60 +       case sVersionAddendum:
61 +                ssh_version_set_addendum(strtok(cp, "\n"));
62 +                do {
63 +                        arg = strdelim(&cp);
64 +                } while (arg != NULL && *arg != '\0');
65 +               break;
66 +
67         case sDeprecated:
68                 logit("%s line %d: Deprecated option %s",
69                     filename, linenum, arg);