mirror of
https://git.FreeBSD.org/ports.git
synced 2025-02-08 12:01:56 +00:00
Fix FreeBSD specific patch, exit now if change of password fails.
Submitted by: Udo.Schweigert@cert.siemens.de Reviewed by: dinoex,will
This commit is contained in:
parent
3934d71996
commit
1967dc28ba
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43777
@ -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/ \
|
||||
|
@ -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'",
|
||||
|
@ -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/ \
|
||||
|
@ -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'",
|
||||
|
Loading…
x
Reference in New Issue
Block a user