aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--security/ssh/files/patch-af50
-rw-r--r--security/ssh2/files/patch-af50
2 files changed, 70 insertions, 30 deletions
diff --git a/security/ssh/files/patch-af b/security/ssh/files/patch-af
index 1534ce2649fa..c5ae4062d8f1 100644
--- a/security/ssh/files/patch-af
+++ b/security/ssh/files/patch-af
@@ -1,19 +1,39 @@
-*** pty.c.bak Fri Oct 4 17:00:42 1996
---- pty.c Tue Nov 12 03:00:54 1996
+*** sshd.c.orig Fri Oct 4 17:00:42 1996
+--- sshd.c Tue Nov 12 04:23:15 1996
***************
-*** 306,314 ****
---- 306,319 ----
- #else /* not SCO UNIX */
- char buf[64];
- int i;
+*** 2083,2088 ****
+--- 2083,2098 ----
+ printf("Last login: %s from %s\r\n", time_string, buf);
+ }
+
++ #ifdef __FreeBSD__
++ if (command == NULL && !quiet_login)
++ {
++ printf("%s\n\t%s %s\n\n",
++ "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994",
++ "The Regents of the University of California. ",
++ "All rights reserved.");
++ }
++ #endif
++
+ /* Print /etc/motd unless a command was specified or printing it was
+ disabled in server options. Note that some machines appear to
+ print it in /etc/profile or similar. */
+***************
+*** 2099,2104 ****
+--- 2109,2123 ----
+ fclose(f);
+ }
+ }
+ #ifdef __FreeBSD__
-+ const char *ptymajors = "pqrsPQRS";
-+ const char *ptyminors = "0123456789abcdefghijklmnopqrstuv";
-+ #else
- const char *ptymajors =
- "pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ";
- const char *ptyminors = "0123456789abcdef";
++ if (command == NULL && !quiet_login)
++ {
++ sprintf(line, "%s/%.200s", _PATH_MAILDIR, pw->pw_name);
++ if (stat(line, &st) == 0 && st.st_size != 0)
++ printf("You have %smail.\n",
++ (st.st_mtime > st.st_atime) ? "new " : "");
++ }
+ #endif
- int num_minors = strlen(ptyminors);
- int num_ptys = strlen(ptymajors) * num_minors;
+ /* Do common processing for the child, such as execing the command. */
+ do_child(command, pw, term, display, auth_proto, auth_data, ttyname);
diff --git a/security/ssh2/files/patch-af b/security/ssh2/files/patch-af
index 1534ce2649fa..c5ae4062d8f1 100644
--- a/security/ssh2/files/patch-af
+++ b/security/ssh2/files/patch-af
@@ -1,19 +1,39 @@
-*** pty.c.bak Fri Oct 4 17:00:42 1996
---- pty.c Tue Nov 12 03:00:54 1996
+*** sshd.c.orig Fri Oct 4 17:00:42 1996
+--- sshd.c Tue Nov 12 04:23:15 1996
***************
-*** 306,314 ****
---- 306,319 ----
- #else /* not SCO UNIX */
- char buf[64];
- int i;
+*** 2083,2088 ****
+--- 2083,2098 ----
+ printf("Last login: %s from %s\r\n", time_string, buf);
+ }
+
++ #ifdef __FreeBSD__
++ if (command == NULL && !quiet_login)
++ {
++ printf("%s\n\t%s %s\n\n",
++ "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994",
++ "The Regents of the University of California. ",
++ "All rights reserved.");
++ }
++ #endif
++
+ /* Print /etc/motd unless a command was specified or printing it was
+ disabled in server options. Note that some machines appear to
+ print it in /etc/profile or similar. */
+***************
+*** 2099,2104 ****
+--- 2109,2123 ----
+ fclose(f);
+ }
+ }
+ #ifdef __FreeBSD__
-+ const char *ptymajors = "pqrsPQRS";
-+ const char *ptyminors = "0123456789abcdefghijklmnopqrstuv";
-+ #else
- const char *ptymajors =
- "pqrstuvwxyzabcdefghijklmnoABCDEFGHIJKLMNOPQRSTUVWXYZ";
- const char *ptyminors = "0123456789abcdef";
++ if (command == NULL && !quiet_login)
++ {
++ sprintf(line, "%s/%.200s", _PATH_MAILDIR, pw->pw_name);
++ if (stat(line, &st) == 0 && st.st_size != 0)
++ printf("You have %smail.\n",
++ (st.st_mtime > st.st_atime) ? "new " : "");
++ }
+ #endif
- int num_minors = strlen(ptyminors);
- int num_ptys = strlen(ptymajors) * num_minors;
+ /* Do common processing for the child, such as execing the command. */
+ do_child(command, pw, term, display, auth_proto, auth_data, ttyname);