vishalmishra434 / rpms / openssh

Forked from rpms/openssh 3 months ago
Clone
Tomáš Mráz ad07b9
--- openssh-4.5p1/servconf.h.vendor	2006-08-18 16:23:15.000000000 +0200
Tomáš Mráz ad07b9
+++ openssh-4.5p1/servconf.h	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -120,6 +120,7 @@
Tomáš Mráz ad07b9
 	int	max_startups;
Tomáš Mráz ad07b9
 	int	max_authtries;
Tomáš Mráz ad07b9
 	char   *banner;			/* SSH-2 banner message */
Tomáš Mráz ad07b9
+	int	show_patchlevel;	/* Show vendor patch level to clients */
Tomáš Mráz ad07b9
 	int	use_dns;
Tomáš Mráz ad07b9
 	int	client_alive_interval;	/*
Tomáš Mráz ad07b9
 					 * poke the client this often to
Tomáš Mráz ad07b9
--- openssh-4.5p1/sshd_config.vendor	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
+++ openssh-4.5p1/sshd_config	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -106,6 +106,7 @@
Tomáš Mráz ad07b9
 #Compression delayed
Tomáš Mráz ad07b9
 #ClientAliveInterval 0
Tomáš Mráz ad07b9
 #ClientAliveCountMax 3
Tomáš Mráz ad07b9
+#ShowPatchLevel no
Tomáš Mráz ad07b9
 #UseDNS yes
Tomáš Mráz ad07b9
 #PidFile /var/run/sshd.pid
Tomáš Mráz ad07b9
 #MaxStartups 10
Tomáš Mráz ad07b9
--- openssh-4.5p1/sshd.c.vendor	2006-11-07 13:14:42.000000000 +0100
Tomáš Mráz ad07b9
+++ openssh-4.5p1/sshd.c	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -418,7 +418,8 @@
Tomáš Mráz ad07b9
 		major = PROTOCOL_MAJOR_1;
Tomáš Mráz ad07b9
 		minor = PROTOCOL_MINOR_1;
Tomáš Mráz ad07b9
 	}
Tomáš Mráz ad07b9
-	snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor, SSH_VERSION);
Tomáš Mráz ad07b9
+	snprintf(buf, sizeof buf, "SSH-%d.%d-%.100s\n", major, minor,
Tomáš Mráz ad07b9
+		 (options.show_patchlevel == 1) ? SSH_VENDOR_PATCHLEVEL : SSH_VERSION);
Tomáš Mráz ad07b9
 	server_version_string = xstrdup(buf);
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
 	/* Send our protocol version identification. */
Tomáš Mráz ad07b9
@@ -1429,7 +1430,8 @@
Tomáš Mráz ad07b9
 		exit(1);
Tomáš Mráz ad07b9
 	}
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
-	debug("sshd version %.100s", SSH_RELEASE);
Tomáš Mráz ad07b9
+	debug("sshd version %.100s",
Tomáš Mráz ad07b9
+	      (options.show_patchlevel == 1) ? SSH_VENDOR_PATCHLEVEL : SSH_RELEASE);
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
 	/* Store privilege separation user for later use if required. */
Tomáš Mráz ad07b9
 	if ((privsep_pw = getpwnam(SSH_PRIVSEP_USER)) == NULL) {
Tomáš Mráz ad07b9
--- openssh-4.5p1/configure.ac.vendor	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
+++ openssh-4.5p1/configure.ac	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -3729,6 +3729,12 @@
Tomáš Mráz ad07b9
 		fi
Tomáš Mráz ad07b9
 	]
Tomáš Mráz ad07b9
 )
Tomáš Mráz ad07b9
+AC_ARG_ENABLE(vendor-patchlevel,
Tomáš Mráz ad07b9
+  [  --enable-vendor-patchlevel=TAG  specify a vendor patch level],
Tomáš Mráz ad07b9
+  [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.])
Tomáš Mráz ad07b9
+   SSH_VENDOR_PATCHLEVEL="$enableval"],
Tomáš Mráz ad07b9
+  [AC_DEFINE(SSH_VENDOR_PATCHLEVEL,SSH_RELEASE,[Define to your vendor patch level, if it has been modified from the upstream source release.])
Tomáš Mráz ad07b9
+   SSH_VENDOR_PATCHLEVEL=none])
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
 dnl lastlog, [uw]tmpx? detection
Tomáš Mráz ad07b9
 dnl  NOTE: set the paths in the platform section to avoid the
Tomáš Mráz ad07b9
@@ -3978,6 +3984,7 @@
Tomáš Mráz ad07b9
 echo "           Translate v4 in v6 hack: $IPV4_IN6_HACK_MSG"
Tomáš Mráz ad07b9
 echo "                  BSD Auth support: $BSD_AUTH_MSG"
Tomáš Mráz ad07b9
 echo "              Random number source: $RAND_MSG"
Tomáš Mráz ad07b9
+echo "                Vendor patch level: $SSH_VENDOR_PATCHLEVEL"
Tomáš Mráz ad07b9
 if test ! -z "$USE_RAND_HELPER" ; then
Tomáš Mráz ad07b9
 echo "     ssh-rand-helper collects from: $RAND_HELPER_MSG"
Tomáš Mráz ad07b9
 fi
Tomáš Mráz ad07b9
--- openssh-4.5p1/sshd_config.0.vendor	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
+++ openssh-4.5p1/sshd_config.0	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -413,6 +413,11 @@
Tomáš Mráz ad07b9
              Defines the number of bits in the ephemeral protocol version 1
Tomáš Mráz ad07b9
              server key.  The minimum value is 512, and the default is 768.
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
+     ShowPatchLevel
Tomáš Mráz ad07b9
+	     Specifies whether sshd will display the specific patch level of
Tomáš Mráz ad07b9
+	     the binary in the server identification string.  The patch level
Tomáš Mráz ad07b9
+	     is set at compile-time.  The default is M-bM-^@M-^\noM-bM-^@M-^].
Tomáš Mráz ad07b9
+
Tomáš Mráz ad07b9
      StrictModes
Tomáš Mráz ad07b9
              Specifies whether sshd(8) should check file modes and ownership
Tomáš Mráz ad07b9
              of the user's files and home directory before accepting login.
Tomáš Mráz ad07b9
--- openssh-4.5p1/servconf.c.vendor	2006-08-18 16:23:15.000000000 +0200
Tomáš Mráz ad07b9
+++ openssh-4.5p1/servconf.c	2006-12-20 22:08:41.000000000 +0100
Tomáš Mráz ad07b9
@@ -113,6 +113,7 @@
Tomáš Mráz ad07b9
 	options->max_startups = -1;
Tomáš Mráz ad07b9
 	options->max_authtries = -1;
Tomáš Mráz ad07b9
 	options->banner = NULL;
Tomáš Mráz ad07b9
+	options->show_patchlevel = -1;
Tomáš Mráz ad07b9
 	options->use_dns = -1;
Tomáš Mráz ad07b9
 	options->client_alive_interval = -1;
Tomáš Mráz ad07b9
 	options->client_alive_count_max = -1;
Tomáš Mráz ad07b9
@@ -250,6 +251,9 @@
Tomáš Mráz ad07b9
 	if (options->permit_tun == -1)
Tomáš Mráz ad07b9
 		options->permit_tun = SSH_TUNMODE_NO;
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
+	if (options->show_patchlevel == -1)
Tomáš Mráz ad07b9
+		options->show_patchlevel = 0;
Tomáš Mráz ad07b9
+
Tomáš Mráz ad07b9
 	/* Turn privilege separation on by default */
Tomáš Mráz ad07b9
 	if (use_privsep == -1)
Tomáš Mráz ad07b9
 		use_privsep = 1;
Tomáš Mráz ad07b9
@@ -293,6 +297,7 @@
Tomáš Mráz ad07b9
 	sGssAuthentication, sGssCleanupCreds, sAcceptEnv, sPermitTunnel,
Tomáš Mráz ad07b9
 	sMatch, sPermitOpen, sForceCommand,
Tomáš Mráz ad07b9
 	sUsePrivilegeSeparation,
Tomáš Mráz ad07b9
+	sShowPatchLevel,
Tomáš Mráz ad07b9
 	sDeprecated, sUnsupported
Tomáš Mráz ad07b9
 } ServerOpCodes;
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
@@ -390,6 +395,7 @@
Tomáš Mráz ad07b9
 	{ "maxstartups", sMaxStartups, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
 	{ "maxauthtries", sMaxAuthTries, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
 	{ "banner", sBanner, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
+	{ "showpatchlevel", sShowPatchLevel, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
 	{ "usedns", sUseDNS, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
 	{ "verifyreversemapping", sDeprecated, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
 	{ "reversemappingcheck", sDeprecated, SSHCFG_GLOBAL },
Tomáš Mráz ad07b9
@@ -1006,6 +1012,10 @@
Tomáš Mráz ad07b9
 		intptr = &use_privsep;
Tomáš Mráz ad07b9
 		goto parse_flag;
Tomáš Mráz ad07b9
 
Tomáš Mráz ad07b9
+	case sShowPatchLevel:
Tomáš Mráz ad07b9
+		intptr = &options->show_patchlevel;
Tomáš Mráz ad07b9
+		goto parse_flag;
Tomáš Mráz ad07b9
+
Tomáš Mráz ad07b9
 	case sAllowUsers:
Tomáš Mráz ad07b9
 		while ((arg = strdelim(&cp)) && *arg != '\0') {
Tomáš Mráz ad07b9
 			if (options->num_allow_users >= MAX_ALLOW_USERS)
Tomáš Mráz ad07b9
--- openssh-4.5p1/sshd_config.5.vendor	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
+++ openssh-4.5p1/sshd_config.5	2006-12-20 22:06:27.000000000 +0100
Tomáš Mráz ad07b9
@@ -717,6 +717,14 @@
Tomáš Mráz ad07b9
 .It Cm ServerKeyBits
Tomáš Mráz ad07b9
 Defines the number of bits in the ephemeral protocol version 1 server key.
Tomáš Mráz ad07b9
 The minimum value is 512, and the default is 768.
Tomáš Mráz ad07b9
+.It Cm ShowPatchLevel
Tomáš Mráz ad07b9
+Specifies whether
Tomáš Mráz ad07b9
+.Nm sshd
Tomáš Mráz ad07b9
+will display the patch level of the binary in the identification string.
Tomáš Mráz ad07b9
+The patch level is set at compile-time.
Tomáš Mráz ad07b9
+The default is
Tomáš Mráz ad07b9
+.Dq no .
Tomáš Mráz ad07b9
+This option applies to protocol version 1 only.
Tomáš Mráz ad07b9
 .It Cm StrictModes
Tomáš Mráz ad07b9
 Specifies whether
Tomáš Mráz ad07b9
 .Xr sshd 8