head	1.7;
access;
symbols
	RELEASE_4_5_0:1.5
	RELEASE_4_4_0:1.5
	RELEASE_4_3_0:1.5
	RELEASE_4_2_0:1.5
	RELEASE_4_1_1:1.4
	RELEASE_4_1_0:1.4
	RELEASE_3_5_0:1.4
	openssh_1_2:1.1.1.1
	OPENBSD:1.1.1;
locks; strict;
comment	@# @;


1.7
date	2002.03.12.17.54.07;	author dinoex;	state dead;
branches;
next	1.6;

1.6
date	2002.03.08.20.51.56;	author dinoex;	state Exp;
branches;
next	1.5;

1.5
date	2000.11.04.23.04.25;	author green;	state Exp;
branches;
next	1.4;

1.4
date	2000.05.13.19.25.57;	author green;	state Exp;
branches;
next	1.3;

1.3
date	2000.04.20.22.24.19;	author green;	state Exp;
branches;
next	1.2;

1.2
date	99.11.17.17.19.28;	author green;	state dead;
branches;
next	1.1;

1.1
date	99.11.08.06.20.53;	author green;	state Exp;
branches
	1.1.1.1;
next	;

1.1.1.1
date	99.11.08.06.20.53;	author green;	state Exp;
branches;
next	;


desc
@@


1.7
log
@Rename Patches to make navigation much more easier.
@
text
@--- auth.c.orig	Fri Mar  1 14:12:10 2002
+++ auth.c	Fri Mar  8 20:57:17 2002
@@@@ -25,7 +25,77 @@@@
 #include "includes.h"
 RCSID("$OpenBSD: auth.c,v 1.35 2002/03/01 13:12:10 markus Exp $");
 
+#if defined(__FreeBSD__) && __FreeBSD__ <= 3
+/*
+ * Copyright (c) 1997 Todd C. Miller <Todd.Miller@@courtesan.com>
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ *    notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ *    notice, this list of conditions and the following disclaimer in the
+ *    documentation and/or other materials provided with the distribution.
+ * 3. The name of the author may not be used to endorse or promote products
+ *    derived from this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
+ * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
+ * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL
+ * THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
+ * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
+ * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
+ * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
+ * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+char *
+dirname(path)
+	const char *path;
+{
+	static char bname[MAXPATHLEN];
+	register const char *endp;
+
+	/* Empty or NULL string gets treated as "." */
+	if (path == NULL || *path == '\0') {
+		(void)strcpy(bname, ".");
+		return(bname);
+	}
+
+	/* Strip trailing slashes */
+	endp = path + strlen(path) - 1;
+	while (endp > path && *endp == '/')
+		endp--;
+
+	/* Find the start of the dir */
+	while (endp > path && *endp != '/')
+		endp--;
+
+	/* Either the dir is "/" or there are no slashes */
+	if (endp == path) {
+		(void)strcpy(bname, *endp == '/' ? "/" : ".");
+		return(bname);
+	} else {
+		do {
+			endp--;
+		} while (endp > path && *endp == '/');
+	}
+
+	if (endp - path + 2 > sizeof(bname)) {
+		errno = ENAMETOOLONG;
+		return(NULL);
+	}
+	(void)strncpy(bname, path, endp - path + 1);
+	bname[endp - path + 1] = '\0';
+	return(bname);
+}
+#else
 #include <libgen.h>
+#endif
 
 #include "xmalloc.h"
 #include "match.h"
@@@@ -141,6 +211,16 @@@@
 			}
 		ga_free();
 	}
+#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;
 }
@


1.6
log
@- add defines for comatibility with older FreeBSD releases 3.x and 2.2.8
	SHUT_RD, SHUT_WR, SHUT_RDWR
	INET_ADDRSTRLEN
- add dirname() from FreeBSD 4.5
- use utimes instead of futimes fore FreeBSD < 4.x
@
text
@@


1.5
log
@Update to OpenSSH 2.2.0.  This is an end-of-life update for the
ports-based OpenSSH.  OpenSSH has been in the base system for more
than long enough to justify not having to maintain two separate
FreeBSD versions of OpenSSH.
@
text
@d1 83
a83 5
--- auth.c.orig	Sat Nov  4 17:30:17 2000
+++ auth.c	Sat Nov  4 17:29:00 2000
@@@@ -111,6 +111,16 @@@@
 				return 0;
 		}
@


1.4
log
@Fix a mistake with pwcopy-related patches.
@
text
@d1 3
a3 11
--- auth.c.orif	Thu Apr 20 17:21:58 2000
+++ auth.c	Thu Apr 20 17:50:06 2000
@@@@ -26,7 +26,6 @@@@
 #include "session.h"
 #include "dispatch.h"
 
-
 /* import */
 extern ServerOptions options;
 extern char *forced_command;
@@@@ -106,6 +105,16 @@@@
d7 1
a7 1
+#ifdef __FreeBSD__
@


1.3
log
@Upgrade to version 1.2.3 with a CVS of a few hours ago.  New stuff in
this release is mostly the support for lots of ssh2.  Note that SSH2 is
not fully supported here yet, but it's mostly there; see README.openssh2.
@
text
@a27 12
@@@@ -523,6 +532,11 @@@@
 	pwcopy.pw_gid = pw->pw_gid;
 	pwcopy.pw_dir = xstrdup(pw->pw_dir);
 	pwcopy.pw_shell = xstrdup(pw->pw_shell);
+#ifdef __FreeBSD__
+	pwcopy.pw_class = xstrdup(pw->pw_class);
+	pwcopy.pw_expire = pw->pw_expire;
+	pwcopy.pw_change = pw->pw_change;
+#endif /* __FreeBSD__ */
 	pw = &pwcopy;
 
 	/*
@


1.2
log
@Thanks to those who replied!  The include (ssl versus openssl) transform
is now done in post-patch.

Submitted by:	Anton Berezin <tobez@@plab.ku.dk>, Christian Weisgerber <naddy@@unix-ag.uni-kl.de>
@
text
@d1 5
a5 6
diff -ru /home/green/ssh/sshconnect.c ./sshconnect.c
--- /home/green/ssh/sshconnect.c	Wed Nov  3 03:36:00 1999
+++ ./sshconnect.c	Mon Nov  8 00:06:40 1999
@@@@ -17,7 +17,7 @@@@
 #include "includes.h"
 RCSID("$Id: sshconnect.c,v 1.25 1999/11/02 19:42:36 markus Exp $");
d7 31
a37 8
-#include <ssl/bn.h>
+#include <openssl/bn.h>
 #include "xmalloc.h"
 #include "rsa.h"
 #include "ssh.h"
@@@@ -28,7 +28,7 @@@@
 #include "uidswap.h"
 #include "compat.h"
d39 1
a39 5
-#include <ssl/md5.h>
+#include <openssl/md5.h>
 
 /* Session id for the current session. */
 unsigned char session_id[16];
@


1.1
log
@Initial revision
@
text
@@


1.1.1.1
log
@Say hello to OpenSSH!  It's more secure, has a better license, and
is actively maintained by members of the OpenBSD project.
@
text
@@
