summaryrefslogtreecommitdiff
path: root/security/hpn-ssh/files
diff options
context:
space:
mode:
Diffstat (limited to 'security/hpn-ssh/files')
-rw-r--r--security/hpn-ssh/files/patch-auth.c20
-rw-r--r--security/hpn-ssh/files/patch-clientloop.c11
-rw-r--r--security/hpn-ssh/files/patch-cookie66
-rw-r--r--security/hpn-ssh/files/patch-misc.c13
-rw-r--r--security/hpn-ssh/files/patch-session.c102
-rw-r--r--security/hpn-ssh/files/patch-sshconnect.c15
6 files changed, 0 insertions, 227 deletions
diff --git a/security/hpn-ssh/files/patch-auth.c b/security/hpn-ssh/files/patch-auth.c
deleted file mode 100644
index 99c9d0c1550e..000000000000
--- a/security/hpn-ssh/files/patch-auth.c
+++ /dev/null
@@ -1,20 +0,0 @@
---- auth.c.orig Mon Mar 19 23:15:57 2001
-+++ auth.c Fri Jun 1 07:59:43 2001
-@@ -158,6 +158,17 @@
- }
- #endif /* WITH_AIXAUTHENTICATE */
-
-+#ifdef __FreeBSD__
-+ /* Fail if the account's expiration time has passed. */
-+ if (pw->pw_expire != 0) {
-+ struct timeval tv;
-+
-+ (void)gettimeofday(&tv, NULL);
-+ if (tv.tv_sec >= pw->pw_expire)
-+ return 0;
-+ }
-+#endif /* __FreeBSD__ */
-+
- /* We found no reason not to let this user try to log on... */
- return 1;
- }
diff --git a/security/hpn-ssh/files/patch-clientloop.c b/security/hpn-ssh/files/patch-clientloop.c
deleted file mode 100644
index 67fc4dcb4f6b..000000000000
--- a/security/hpn-ssh/files/patch-clientloop.c
+++ /dev/null
@@ -1,11 +0,0 @@
---- clientloop.c.orig Fri Apr 20 09:17:51 2001
-+++ clientloop.c Sat May 26 15:18:51 2001
-@@ -1131,7 +1131,7 @@
-
- if (strcmp(ctype, "forwarded-tcpip") == 0) {
- c = client_request_forwarded_tcpip(ctype, rchan);
-- } else if (strcmp(ctype, "x11") == 0) {
-+ } else if (strcmp(ctype, "x11") == 0 && options.forward_x11) {
- c = client_request_x11(ctype, rchan);
- } else if (strcmp(ctype, "auth-agent@openssh.com") == 0) {
- c = client_request_agent(ctype, rchan);
diff --git a/security/hpn-ssh/files/patch-cookie b/security/hpn-ssh/files/patch-cookie
deleted file mode 100644
index 4b7d3b7c7d73..000000000000
--- a/security/hpn-ssh/files/patch-cookie
+++ /dev/null
@@ -1,66 +0,0 @@
---- channels.c.orig Tue Apr 17 14:55:03 2001
-+++ channels.c Sat Jun 9 06:43:41 2001
-@@ -1612,7 +1612,7 @@
- switch (channels[i].type) {
- case SSH_CHANNEL_AUTH_SOCKET:
- close(channels[i].sock);
-- unlink(channels[i].path);
-+ /* auth_sock_cleanup_proc deletes the socket */
- channel_free(i);
- break;
- case SSH_CHANNEL_PORT_LISTENER:
---- session.c.orig Sun Jun 17 05:40:51 2001
-+++ session.c Sun Aug 19 18:20:27 2001
-@@ -235,6 +235,7 @@
- int success, type, n_bytes, plen, screen_flag, have_pty = 0;
- int compression_level = 0, enable_compression_after_reply = 0;
- u_int proto_len, data_len, dlen;
-+ struct stat st;
-
- s = session_new();
- s->pw = authctxt->pw;
-@@ -317,7 +318,8 @@
- packet_send_debug("X11 forwarding disabled in server configuration file.");
- break;
- }
-- if (!options.xauth_location) {
-+ if (!options.xauth_location ||
-+ (stat(options.xauth_location, &st) == -1)) {
- packet_send_debug("No xauth program; cannot forward with spoofing.");
- break;
- }
-@@ -1384,10 +1386,11 @@
- if (!options.use_login) {
- /* ignore _PATH_SSH_USER_RC for subsystems */
- if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) {
-+ snprintf(cmd, sizeof cmd, "%s -c '%s %s'",
-+ shell, _PATH_BSHELL, _PATH_SSH_USER_RC);
- if (debug_flag)
-- fprintf(stderr, "Running %s %s\n", _PATH_BSHELL,
-- _PATH_SSH_USER_RC);
-- f = popen(_PATH_BSHELL " " _PATH_SSH_USER_RC, "w");
-+ fprintf(stderr, "Running %s\n", cmd);
-+ f = popen(cmd, "w");
- if (f) {
- if (do_xauth)
- fprintf(f, "%s %s\n", s->auth_proto,
-@@ -1707,12 +1710,19 @@
- int
- session_x11_req(Session *s)
- {
-+ struct stat st;
-+
- if (no_x11_forwarding_flag) {
- debug("X11 forwarding disabled in user configuration file.");
- return 0;
- }
- if (!options.x11_forwarding) {
- debug("X11 forwarding disabled in server configuration file.");
-+ return 0;
-+ }
-+ if (!options.xauth_location ||
-+ (stat(options.xauth_location, &st) == -1)) {
-+ packet_send_debug("No xauth program; cannot forward with spoofig.");
- return 0;
- }
- debug("Received request for X11 forwarding with auth spoofing.");
diff --git a/security/hpn-ssh/files/patch-misc.c b/security/hpn-ssh/files/patch-misc.c
deleted file mode 100644
index 0f8ef065fec0..000000000000
--- a/security/hpn-ssh/files/patch-misc.c
+++ /dev/null
@@ -1,13 +0,0 @@
---- misc.c.orig Thu Apr 12 22:09:37 2001
-+++ misc.c Sat May 26 15:39:25 2001
-@@ -111,6 +111,10 @@
- copy->pw_class = xstrdup(pw->pw_class);
- copy->pw_dir = xstrdup(pw->pw_dir);
- copy->pw_shell = xstrdup(pw->pw_shell);
-+#ifdef __FreeBSD__
-+ copy->pw_expire = pw->pw_expire;
-+ copy->pw_change = pw->pw_change;
-+#endif /* __FreeBSD__ */
- return copy;
- }
-
diff --git a/security/hpn-ssh/files/patch-session.c b/security/hpn-ssh/files/patch-session.c
deleted file mode 100644
index 57febb0f33b7..000000000000
--- a/security/hpn-ssh/files/patch-session.c
+++ /dev/null
@@ -1,102 +0,0 @@
---- session.c.orig Sun Jun 10 17:22:44 2001
-+++ session.c Sun Jun 10 17:23:22 2001
-@@ -514,6 +514,13 @@
- log_init(__progname, options.log_level, options.log_facility, log_stderr);
-
- /*
-+ * Using login and executing a specific "command" are mutually
-+ * exclusive, so turn off use_login if there's a command.
-+ */
-+ if (command != NULL)
-+ options.use_login = 0;
-+
-+ /*
- * Create a new session and process group since the 4.4BSD
- * setlogin() affects the entire process group.
- */
-@@ -628,6 +635,13 @@
- /* Child. Reinitialize the log because the pid has changed. */
- log_init(__progname, options.log_level, options.log_facility, log_stderr);
-
-+ /*
-+ * Using login and executing a specific "command" are mutually
-+ * exclusive, so turn off use_login if there's a command.
-+ */
-+ if (command != NULL)
-+ options.use_login = 0;
-+
- /* Close the master side of the pseudo tty. */
- close(ptyfd);
-
-@@ -707,6 +721,11 @@
- time_t last_login_time;
- struct passwd * pw = s->pw;
- pid_t pid = getpid();
-+#ifdef HAVE_LOGIN_CAP
-+ FILE *f;
-+ char buf[256];
-+ char *fname;
-+#endif /* HAVE_LOGIN_CAP */
-
- /*
- * Get IP address of client. If the connection is not a socket, let
-@@ -767,6 +786,21 @@
- printf("Last login: %s from %s\r\n", time_string, hostname);
- }
-
-+#ifdef HAVE_LOGIN_CAP
-+ if (!options.use_login) {
-+ fname = login_getcapstr(lc, "copyright", NULL, NULL);
-+ if (fname != NULL && (f = fopen(fname, "r")) != NULL) {
-+ while (fgets(buf, sizeof(buf), f) != NULL)
-+ fputs(buf, stdout);
-+ fclose(f);
-+ } else
-+ (void)printf("%s\n\t%s %s\n",
-+ "Copyright (c) 1980, 1983, 1986, 1988, 1990, 1991, 1993, 1994",
-+ "The Regents of the University of California. ",
-+ "All rights reserved.");
-+ }
-+#endif /* HAVE_LOGIN_CAP */
-+
- do_motd();
- }
-
-@@ -1376,7 +1410,7 @@
- * initgroups, because at least on Solaris 2.3 it leaves file
- * descriptors open.
- */
-- for (i = 3; i < 64; i++)
-+ for (i = 3; i < getdtablesize(); i++)
- close(i);
-
- /* Change current directory to the user\'s home directory. */
-@@ -1400,6 +1434,28 @@
- * in this order).
- */
- if (!options.use_login) {
-+#ifdef __FreeBSD__
-+ /*
-+ * If the password change time is set and has passed, give the
-+ * user a password expiry notice and chance to change it.
-+ */
-+ if (pw->pw_change != 0) {
-+ struct timeval tv;
-+
-+ (void)gettimeofday(&tv, NULL);
-+ if (tv.tv_sec >= pw->pw_change) {
-+ (void)printf(
-+ "Sorry -- your password has expired.\n");
-+ syslog(LOG_INFO,
-+ "%s Password expired - forcing change",
-+ pw->pw_name);
-+ if (system("/usr/bin/passwd") != 0) {
-+ perror("/usr/bin/passwd");
-+ exit(1);
-+ }
-+ }
-+ }
-+#endif /* __FreeBSD__ */
- /* ignore _PATH_SSH_USER_RC for subsystems */
- if (!s->is_subsystem && (stat(_PATH_SSH_USER_RC, &st) >= 0)) {
- snprintf(cmd, sizeof cmd, "%s -c '%s %s'",
diff --git a/security/hpn-ssh/files/patch-sshconnect.c b/security/hpn-ssh/files/patch-sshconnect.c
deleted file mode 100644
index 0d2e317b7147..000000000000
--- a/security/hpn-ssh/files/patch-sshconnect.c
+++ /dev/null
@@ -1,15 +0,0 @@
---- sshconnect.c.orig Fri Apr 13 01:34:36 2001
-+++ sshconnect.c Fri Jun 1 08:01:05 2001
-@@ -504,10 +504,12 @@
- local = (ntohl(((struct sockaddr_in *)hostaddr)->sin_addr.s_addr) >> 24) == IN_LOOPBACKNET;
- salen = sizeof(struct sockaddr_in);
- break;
-+#ifdef INET6
- case AF_INET6:
- local = IN6_IS_ADDR_LOOPBACK(&(((struct sockaddr_in6 *)hostaddr)->sin6_addr));
- salen = sizeof(struct sockaddr_in6);
- break;
-+#endif
- default:
- local = 0;
- salen = sizeof(struct sockaddr_storage);