- Fix FreeBSD specific patch, exit now if change of password fails.

Forwarded by dwcjr

Submitted by:	Udo.Schweigert@cert.siemens.de
This commit is contained in:
Dirk Meyer 2001-06-10 20:01:52 +00:00
parent 67d366a9a3
commit 3934d71996
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=43776
2 changed files with 6 additions and 4 deletions

View File

@ -7,7 +7,7 @@
PORTNAME= OpenSSH
PORTVERSION= 2.9
PORTREVISION= 1
PORTREVISION= 2
CATEGORIES= security
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \

View File

@ -1,5 +1,5 @@
--- session.c.orig Tue Apr 17 21:34:25 2001
+++ session.c Sat May 26 15:45:15 2001
+++ session.c Sun Jun 10 19:42:13 2001
@@ -58,6 +58,12 @@
#include "canohost.h"
#include "session.h"
@ -84,7 +84,7 @@
close(i);
/* Change current directory to the user\'s home directory. */
@@ -1051,6 +1091,26 @@
@@ -1051,6 +1091,28 @@
* in this order).
*/
if (!options.use_login) {
@ -103,8 +103,10 @@
+ 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__ */