components/openssh/patches/017-option_default_value.patch
author Huie-Ying Lee <huieying.lee@oracle.com>
Wed, 12 Nov 2014 16:36:55 -0800
changeset 2206 e71c20dca64b
parent 2072 a9add2444420
child 5819 c5f05bd2a9bc
permissions -rw-r--r--
19591379 X11Forwarding and ForwardX11Trusted should default to yes 19906401 should set AUTHTOK to NULL after pam_authenticate in sshpam_auth_passwd()
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
     1
#
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     2
# Some options in OpenSSH have different default values from those in SunSSH.
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     3
# To make the transition smoother from SunSSH to OpenSSH, we change default
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     4
# values for the following options to be as same as those in SunSSH.
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     5
# 
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     6
#   GSSAPIAuthentication (for both server and client)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     7
#   X11Forwarding        (for server)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     8
#   ForwardX11Trusted    (for client)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
     9
#
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    10
# This is for Solaris only, we will not contribute back these changes to the
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    11
# upstream.
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    12
#
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    13
--- orig/readconf.c	Thu Sep  4 17:27:04 2014
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    14
+++ new/readconf.c	Tue Sep  9 17:33:50 2014
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    15
@@ -1575,7 +1575,11 @@
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    16
 	if (options->forward_x11 == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    17
 		options->forward_x11 = 0;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    18
 	if (options->forward_x11_trusted == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    19
+#ifdef OPTION_DEFAULT_VALUE
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    20
+		options->forward_x11_trusted = 1;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    21
+#else
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    22
 		options->forward_x11_trusted = 0;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    23
+#endif
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    24
 	if (options->forward_x11_timeout == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    25
 		options->forward_x11_timeout = 1200;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    26
 	if (options->exit_on_forward_failure == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    27
@@ -1593,7 +1597,11 @@
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    28
 	if (options->challenge_response_authentication == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    29
 		options->challenge_response_authentication = 1;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    30
 	if (options->gss_authentication == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    31
+#ifdef OPTION_DEFAULT_VALUE
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    32
+		options->gss_authentication = 1;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    33
+#else
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    34
 		options->gss_authentication = 0;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    35
+#endif
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    36
 	if (options->gss_deleg_creds == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    37
 		options->gss_deleg_creds = 0;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    38
 	if (options->password_authentication == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    39
--- orig/servconf.c	Thu Sep  4 17:17:58 2014
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    40
+++ new/servconf.c	Tue Sep  9 17:36:32 2014
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    41
@@ -208,7 +208,11 @@
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    42
 	if (options->print_lastlog == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    43
 		options->print_lastlog = 1;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    44
 	if (options->x11_forwarding == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    45
+#ifdef OPTION_DEFAULT_VALUE
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    46
+		options->x11_forwarding = 1;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    47
+#else
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    48
 		options->x11_forwarding = 0;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    49
+#endif
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    50
 	if (options->x11_display_offset == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    51
 		options->x11_display_offset = 10;
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    52
 	if (options->x11_use_localhost == -1)
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    53
@@ -244,7 +248,11 @@
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    54
 	if (options->kerberos_get_afs_token == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    55
 		options->kerberos_get_afs_token = 0;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    56
 	if (options->gss_authentication == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    57
+#ifdef OPTION_DEFAULT_VALUE
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    58
+		options->gss_authentication = 1;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    59
+#else
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    60
 		options->gss_authentication = 0;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    61
+#endif
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    62
 	if (options->gss_cleanup_creds == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    63
 		options->gss_cleanup_creds = 1;
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    64
 	if (options->password_authentication == -1)
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    65
--- orig/ssh_config.5	Thu Sep  4 17:58:05 2014
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    66
+++ new/ssh_config.5	Tue Sep  9 17:48:39 2014
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    67
@@ -643,8 +643,8 @@
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    68
 token used for the session will be set to expire after 20 minutes.
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    69
 Remote clients will be refused access after this time.
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    70
 .Pp
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    71
-The default is
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    72
-.Dq no .
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    73
+The default on Solaris is
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    74
+.Dq yes .
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    75
 .Pp
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    76
 See the X11 SECURITY extension specification for full details on
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    77
 the restrictions imposed on untrusted clients.
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    78
@@ -673,8 +673,8 @@
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    79
 .Pa /etc/ssh/ssh_known_hosts2 .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    80
 .It Cm GSSAPIAuthentication
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    81
 Specifies whether user authentication based on GSSAPI is allowed.
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    82
-The default is
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    83
-.Dq no .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    84
+The default on Solaris is
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    85
+.Dq yes .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    86
 Note that this option applies to protocol version 2 only.
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    87
 .It Cm GSSAPIDelegateCredentials
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    88
 Forward (delegate) credentials to the server.
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    89
--- orig/sshd_config.5	Thu Sep  4 17:58:07 2014
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
    90
+++ new/sshd_config.5	Tue Sep  9 17:49:58 2014
2072
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    91
@@ -490,8 +490,8 @@
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    92
 .Dq no .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    93
 .It Cm GSSAPIAuthentication
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    94
 Specifies whether user authentication based on GSSAPI is allowed.
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    95
-The default is
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    96
-.Dq no .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    97
+The default on Solaris is
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    98
+.Dq yes .
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
    99
 Note that this option applies to protocol version 2 only.
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   100
 .It Cm GSSAPICleanupCredentials
a9add2444420 19570656 GSSAPIAuthentication option should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents:
diff changeset
   101
 Specifies whether to automatically destroy the user's credentials cache
2206
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   102
@@ -1239,8 +1239,8 @@
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   103
 .Dq yes
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   104
 or
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   105
 .Dq no .
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   106
-The default is
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   107
-.Dq no .
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   108
+The default on Solaris is
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   109
+.Dq yes .
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   110
 .Pp
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   111
 When X11 forwarding is enabled, there may be additional exposure to
e71c20dca64b 19591379 X11Forwarding and ForwardX11Trusted should default to yes
Huie-Ying Lee <huieying.lee@oracle.com>
parents: 2072
diff changeset
   112
 the server and to client displays if the