forked from rpms/openssh
3f55133c24
New upstream release (#1252639) - allow root login in default config Security: Use-after-free bug related to PAM support (#1252853) Security: Privilege separation weakness related to PAM support (#1252854) Security: Incorrectly set TTYs to be world-writable (#1252862)
157 lines
6.8 KiB
Diff
157 lines
6.8 KiB
Diff
diff -up openssh-7.0p1/configure.ac.vendor openssh-7.0p1/configure.ac
|
|
--- openssh-7.0p1/configure.ac.vendor 2015-08-12 11:14:54.102628399 +0200
|
|
+++ openssh-7.0p1/configure.ac 2015-08-12 11:14:54.129628356 +0200
|
|
@@ -4776,6 +4776,12 @@ AC_ARG_WITH([lastlog],
|
|
fi
|
|
]
|
|
)
|
|
+AC_ARG_ENABLE(vendor-patchlevel,
|
|
+ [ --enable-vendor-patchlevel=TAG specify a vendor patch level],
|
|
+ [AC_DEFINE_UNQUOTED(SSH_VENDOR_PATCHLEVEL,[SSH_RELEASE "-" "$enableval"],[Define to your vendor patch level, if it has been modified from the upstream source release.])
|
|
+ SSH_VENDOR_PATCHLEVEL="$enableval"],
|
|
+ [AC_DEFINE(SSH_VENDOR_PATCHLEVEL,SSH_RELEASE,[Define to your vendor patch level, if it has been modified from the upstream source release.])
|
|
+ SSH_VENDOR_PATCHLEVEL=none])
|
|
|
|
dnl lastlog, [uw]tmpx? detection
|
|
dnl NOTE: set the paths in the platform section to avoid the
|
|
@@ -5038,6 +5044,7 @@ echo " Translate v4 in v6 hack
|
|
echo " BSD Auth support: $BSD_AUTH_MSG"
|
|
echo " Random number source: $RAND_MSG"
|
|
echo " Privsep sandbox style: $SANDBOX_STYLE"
|
|
+echo " Vendor patch level: $SSH_VENDOR_PATCHLEVEL"
|
|
|
|
echo ""
|
|
|
|
diff -up openssh-7.0p1/servconf.c.vendor openssh-7.0p1/servconf.c
|
|
--- openssh-7.0p1/servconf.c.vendor 2015-08-11 10:57:29.000000000 +0200
|
|
+++ openssh-7.0p1/servconf.c 2015-08-12 11:15:33.201565712 +0200
|
|
@@ -149,6 +149,7 @@ initialize_server_options(ServerOptions
|
|
options->max_authtries = -1;
|
|
options->max_sessions = -1;
|
|
options->banner = NULL;
|
|
+ options->show_patchlevel = -1;
|
|
options->use_dns = -1;
|
|
options->client_alive_interval = -1;
|
|
options->client_alive_count_max = -1;
|
|
@@ -335,6 +336,8 @@ fill_default_server_options(ServerOption
|
|
options->ip_qos_bulk = IPTOS_THROUGHPUT;
|
|
if (options->version_addendum == NULL)
|
|
options->version_addendum = xstrdup("");
|
|
+ if (options->show_patchlevel == -1)
|
|
+ options->show_patchlevel = 0;
|
|
if (options->fwd_opts.streamlocal_bind_mask == (mode_t)-1)
|
|
options->fwd_opts.streamlocal_bind_mask = 0177;
|
|
if (options->fwd_opts.streamlocal_bind_unlink == -1)
|
|
@@ -407,7 +410,7 @@ typedef enum {
|
|
sIgnoreUserKnownHosts, sCiphers, sMacs, sProtocol, sPidFile,
|
|
sGatewayPorts, sPubkeyAuthentication, sPubkeyAcceptedKeyTypes,
|
|
sXAuthLocation, sSubsystem, sMaxStartups, sMaxAuthTries, sMaxSessions,
|
|
- sBanner, sUseDNS, sHostbasedAuthentication,
|
|
+ sBanner, sShowPatchLevel, sUseDNS, sHostbasedAuthentication,
|
|
sHostbasedUsesNameFromPacketOnly, sHostbasedAcceptedKeyTypes,
|
|
sHostKeyAlgorithms,
|
|
sClientAliveInterval, sClientAliveCountMax, sAuthorizedKeysFile,
|
|
@@ -529,6 +532,7 @@ static struct {
|
|
{ "maxauthtries", sMaxAuthTries, SSHCFG_ALL },
|
|
{ "maxsessions", sMaxSessions, SSHCFG_ALL },
|
|
{ "banner", sBanner, SSHCFG_ALL },
|
|
+ { "showpatchlevel", sShowPatchLevel, SSHCFG_GLOBAL },
|
|
{ "usedns", sUseDNS, SSHCFG_GLOBAL },
|
|
{ "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL },
|
|
{ "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL },
|
|
@@ -1389,6 +1393,10 @@ process_server_config_line(ServerOptions
|
|
multistate_ptr = multistate_privsep;
|
|
goto parse_multistate;
|
|
|
|
+ case sShowPatchLevel:
|
|
+ intptr = &options->show_patchlevel;
|
|
+ goto parse_flag;
|
|
+
|
|
case sAllowUsers:
|
|
while ((arg = strdelim(&cp)) && *arg != '\0') {
|
|
if (options->num_allow_users >= MAX_ALLOW_USERS)
|
|
@@ -2266,6 +2274,7 @@ dump_config(ServerOptions *o)
|
|
dump_cfg_fmtint(sUseLogin, o->use_login);
|
|
dump_cfg_fmtint(sCompression, o->compression);
|
|
dump_cfg_fmtint(sGatewayPorts, o->fwd_opts.gateway_ports);
|
|
+ dump_cfg_fmtint(sShowPatchLevel, o->show_patchlevel);
|
|
dump_cfg_fmtint(sUseDNS, o->use_dns);
|
|
dump_cfg_fmtint(sAllowTcpForwarding, o->allow_tcp_forwarding);
|
|
dump_cfg_fmtint(sAllowAgentForwarding, o->allow_agent_forwarding);
|
|
diff -up openssh-7.0p1/servconf.h.vendor openssh-7.0p1/servconf.h
|
|
--- openssh-7.0p1/servconf.h.vendor 2015-08-11 10:57:29.000000000 +0200
|
|
+++ openssh-7.0p1/servconf.h 2015-08-12 11:14:54.130628355 +0200
|
|
@@ -155,6 +155,7 @@ typedef struct {
|
|
int max_authtries;
|
|
int max_sessions;
|
|
char *banner; /* SSH-2 banner message */
|
|
+ int show_patchlevel; /* Show vendor patch level to clients */
|
|
int use_dns;
|
|
int client_alive_interval; /*
|
|
* poke the client this often to
|
|
diff -up openssh-7.0p1/sshd_config.0.vendor openssh-7.0p1/sshd_config.0
|
|
--- openssh-7.0p1/sshd_config.0.vendor 2015-08-12 11:14:54.125628363 +0200
|
|
+++ openssh-7.0p1/sshd_config.0 2015-08-12 11:14:54.130628355 +0200
|
|
@@ -841,6 +841,11 @@ DESCRIPTION
|
|
Defines the number of bits in the ephemeral protocol version 1
|
|
server key. The default and minimum value is 1024.
|
|
|
|
+ ShowPatchLevel
|
|
+ Specifies whether sshd will display the specific patch level of
|
|
+ the binary in the server identification string. The patch level
|
|
+ is set at compile-time. The default is M-bM-^@M-^\noM-bM-^@M-^].
|
|
+
|
|
StreamLocalBindMask
|
|
Sets the octal file creation mode mask (umask) used when creating
|
|
a Unix-domain socket file for local or remote port forwarding.
|
|
diff -up openssh-7.0p1/sshd_config.5.vendor openssh-7.0p1/sshd_config.5
|
|
--- openssh-7.0p1/sshd_config.5.vendor 2015-08-12 11:14:54.125628363 +0200
|
|
+++ openssh-7.0p1/sshd_config.5 2015-08-12 11:14:54.131628353 +0200
|
|
@@ -1411,6 +1411,13 @@ This option applies to protocol version
|
|
.It Cm ServerKeyBits
|
|
Defines the number of bits in the ephemeral protocol version 1 server key.
|
|
The default and minimum value is 1024.
|
|
+.It Cm ShowPatchLevel
|
|
+Specifies whether
|
|
+.Nm sshd
|
|
+will display the patch level of the binary in the identification string.
|
|
+The patch level is set at compile-time.
|
|
+The default is
|
|
+.Dq no .
|
|
.It Cm StreamLocalBindMask
|
|
Sets the octal file creation mode mask
|
|
.Pq umask
|
|
diff -up openssh-7.0p1/sshd_config.vendor openssh-7.0p1/sshd_config
|
|
--- openssh-7.0p1/sshd_config.vendor 2015-08-12 11:14:54.125628363 +0200
|
|
+++ openssh-7.0p1/sshd_config 2015-08-12 11:14:54.131628353 +0200
|
|
@@ -119,6 +119,7 @@ UsePrivilegeSeparation sandbox # Defaul
|
|
#Compression delayed
|
|
#ClientAliveInterval 0
|
|
#ClientAliveCountMax 3
|
|
+#ShowPatchLevel no
|
|
#UseDNS no
|
|
#PidFile /var/run/sshd.pid
|
|
#MaxStartups 10:30:100
|
|
diff -up openssh-7.0p1/sshd.c.vendor openssh-7.0p1/sshd.c
|
|
--- openssh-7.0p1/sshd.c.vendor 2015-08-12 11:14:54.100628403 +0200
|
|
+++ openssh-7.0p1/sshd.c 2015-08-12 11:14:54.131628353 +0200
|
|
@@ -432,7 +432,7 @@ sshd_exchange_identification(int sock_in
|
|
}
|
|
|
|
xasprintf(&server_version_string, "SSH-%d.%d-%.100s%s%s%s",
|
|
- major, minor, SSH_VERSION,
|
|
+ major, minor, (options.show_patchlevel == 1) ? SSH_VENDOR_PATCHLEVEL : SSH_VERSION,
|
|
*options.version_addendum == '\0' ? "" : " ",
|
|
options.version_addendum, newline);
|
|
|
|
@@ -1749,7 +1749,8 @@ main(int ac, char **av)
|
|
exit(1);
|
|
}
|
|
|
|
- debug("sshd version %s, %s", SSH_VERSION,
|
|
+ debug("sshd version %s, %s",
|
|
+ (options.show_patchlevel == 1) ? SSH_VENDOR_PATCHLEVEL : SSH_VERSION,
|
|
#ifdef WITH_OPENSSL
|
|
SSLeay_version(SSLEAY_VERSION)
|
|
#else
|