diff options
author | dwcjr <dwcjr@FreeBSD.org> | 2001-06-11 04:08:42 +0800 |
---|---|---|
committer | dwcjr <dwcjr@FreeBSD.org> | 2001-06-11 04:08:42 +0800 |
commit | 95bb99e2afd8c09ca5258fa775f80b42030bec6b (patch) | |
tree | 620bb9bce37a6178a62edcfda25bae6683a1677d /security/openssh-portable | |
parent | f703b24680f2db093b51594e0b729e1dcf5f4720 (diff) | |
download | freebsd-ports-gnome-95bb99e2afd8c09ca5258fa775f80b42030bec6b.tar.gz freebsd-ports-gnome-95bb99e2afd8c09ca5258fa775f80b42030bec6b.tar.zst freebsd-ports-gnome-95bb99e2afd8c09ca5258fa775f80b42030bec6b.zip |
Fix FreeBSD specific patch, exit now if change of password fails.
Submitted by: Udo.Schweigert@cert.siemens.de
Reviewed by: dinoex,will
Diffstat (limited to 'security/openssh-portable')
-rw-r--r-- | security/openssh-portable/Makefile | 2 | ||||
-rw-r--r-- | security/openssh-portable/files/patch-session.c | 22 |
2 files changed, 13 insertions, 11 deletions
diff --git a/security/openssh-portable/Makefile b/security/openssh-portable/Makefile index 645e7dd9828d..534478df36d4 100644 --- a/security/openssh-portable/Makefile +++ b/security/openssh-portable/Makefile @@ -7,7 +7,7 @@ PORTNAME= openssh PORTVERSION= 2.9p1 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= security ipv6 MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/portable/ \ ftp://ftp.op.net/pub/OpenBSD/OpenSSH/portable/ \ diff --git a/security/openssh-portable/files/patch-session.c b/security/openssh-portable/files/patch-session.c index 2fbf15d43128..57febb0f33b7 100644 --- a/security/openssh-portable/files/patch-session.c +++ b/security/openssh-portable/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'", |