summaryrefslogtreecommitdiff
path: root/security/hpn-ssh/files/patch-session.c
diff options
context:
space:
mode:
authorDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-06-10 20:08:42 +0000
committerDavid W. Chapman Jr. <dwcjr@FreeBSD.org>2001-06-10 20:08:42 +0000
commit1967dc28bac79d595c4d470f89e92acd967ae075 (patch)
treed18a10346cf6f8273c9b8f6248c3ef513924ef16 /security/hpn-ssh/files/patch-session.c
parent- Fix FreeBSD specific patch, exit now if change of password fails. (diff)
Fix FreeBSD specific patch, exit now if change of password fails.
Submitted by: Udo.Schweigert@cert.siemens.de Reviewed by: dinoex,will
Notes
Notes: svn path=/head/; revision=43777
Diffstat (limited to '')
-rw-r--r--security/hpn-ssh/files/patch-session.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/security/hpn-ssh/files/patch-session.c b/security/hpn-ssh/files/patch-session.c
index 2fbf15d43128..57febb0f33b7 100644
--- a/security/hpn-ssh/files/patch-session.c
+++ b/security/hpn-ssh/files/patch-session.c
@@ -1,6 +1,6 @@
---- session.c.orig Tue Apr 17 21:34:25 2001
-+++ session.c Sat May 26 15:45:15 2001
-@@ -461,6 +467,13 @@
+--- 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);
/*
@@ -14,7 +14,7 @@
* Create a new session and process group since the 4.4BSD
* setlogin() affects the entire process group.
*/
-@@ -566,6 +579,13 @@
+@@ -628,6 +635,13 @@
/* Child. Reinitialize the log because the pid has changed. */
log_init(__progname, options.log_level, options.log_facility, log_stderr);
@@ -28,7 +28,7 @@
/* Close the master side of the pseudo tty. */
close(ptyfd);
-@@ -639,6 +659,11 @@
+@@ -707,6 +721,11 @@
time_t last_login_time;
struct passwd * pw = s->pw;
pid_t pid = getpid();
@@ -40,7 +40,7 @@
/*
* Get IP address of client. If the connection is not a socket, let
-@@ -679,6 +704,21 @@
+@@ -767,6 +786,21 @@
printf("Last login: %s from %s\r\n", time_string, hostname);
}
@@ -62,7 +62,7 @@
do_motd();
}
-@@ -1027,7 +1067,7 @@
+@@ -1376,7 +1410,7 @@
* initgroups, because at least on Solaris 2.3 it leaves file
* descriptors open.
*/
@@ -71,7 +71,7 @@
close(i);
/* Change current directory to the user\'s home directory. */
-@@ -1051,6 +1091,26 @@
+@@ -1400,6 +1434,28 @@
* in this order).
*/
if (!options.use_login) {
@@ -90,11 +90,13 @@
+ syslog(LOG_INFO,
+ "%s Password expired - forcing change",
+ pw->pw_name);
-+ if (system("/usr/bin/passwd") != 0)
++ 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)) {
- if (debug_flag)
+ snprintf(cmd, sizeof cmd, "%s -c '%s %s'",