summaryrefslogtreecommitdiff
path: root/security/hpn-ssh/files/patch-auth.c
blob: 99c9d0c1550ee7afe028b08f092f4cca60e00768 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
--- 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;
 }