- (bal) [realpath.c] Updated with OpenBSD tree.

This commit is contained in:
Ben Lindstrom 2002-07-07 22:07:10 +00:00
parent e475a3cf3b
commit 8abe736dd7
2 changed files with 5 additions and 4 deletions

View File

@ -4,6 +4,7 @@
s/BROKEN_FD_PASSING/DISABLE_FD_PASSING/
- (tim) [contrib/cygwin/ssh-host-config] sshd account creation fixes
patch from vinschen@redhat.com
- (bal) [realpath.c] Updated with OpenBSD tree.
20020705
- (tim) [configure.ac] AIX 4.2.1 has authenticate() in libs.
@ -1287,4 +1288,4 @@
- (stevesk) entropy.c: typo in debug message
- (djm) ssh-keygen -i needs seeded RNG; report from markus@
$Id: ChangeLog,v 1.2340 2002/07/07 21:07:46 tim Exp $
$Id: ChangeLog,v 1.2341 2002/07/07 22:07:10 mouring Exp $

View File

@ -32,7 +32,7 @@
#if !defined(HAVE_REALPATH) || defined(BROKEN_REALPATH)
#if defined(LIBC_SCCS) && !defined(lint)
static char *rcsid = "$OpenBSD: realpath.c,v 1.6 2002/01/12 16:24:35 millert Exp $";
static char *rcsid = "$OpenBSD: realpath.c,v 1.7 2002/05/24 21:22:37 deraadt Exp $";
#endif /* LIBC_SCCS and not lint */
#include <sys/param.h>
@ -69,7 +69,7 @@ realpath(const char *path, char *resolved)
/* Save the starting point. */
getcwd(start,MAXPATHLEN);
if ((fd = open(".", O_RDONLY)) < 0) {
(void)strcpy(resolved, ".");
(void)strlcpy(resolved, ".", MAXPATHLEN);
return (NULL);
}
close(fd);
@ -129,7 +129,7 @@ loop:
* Save the last component name and get the full pathname of
* the current directory.
*/
(void)strcpy(wbuf, p);
(void)strlcpy(wbuf, p, sizeof wbuf);
if (getcwd(resolved, MAXPATHLEN) == 0)
goto err1;