]> andersk Git - openssh.git/commitdiff
- (djm) Fix short copy in loginrec.c (based on patch from Phill Camp
authordjm <djm>
Tue, 13 Jun 2000 11:23:17 +0000 (11:23 +0000)
committerdjm <djm>
Tue, 13 Jun 2000 11:23:17 +0000 (11:23 +0000)
   <P.S.S.Camp@ukc.ac.uk>

CREDITS
ChangeLog
configure.in
loginrec.c

diff --git a/CREDITS b/CREDITS
index dab15a3b225557fc85d395164f96dc149f30fc00..8d7014bbfee9ed0ce61a40e42f7b05cef86d09eb 100644 (file)
--- a/CREDITS
+++ b/CREDITS
@@ -47,6 +47,7 @@ Niels Kristian Bech Jensen <nkbj@image.dk> - Assorted patches
 Peter Kocks <peter.kocks@baygate.com> - Makefile fixes
 Phil Hands <phil@hands.com> - Debian scripts, assorted patches
 Phil Karn <karn@ka9q.ampr.org> - Autoconf fix
+Phill Camp <P.S.S.Camp@ukc.ac.uk> - login code fix
 SAKAI Kiyotaka <ksakai@kso.netwk.ntt-at.co.jp> - Multiple bugfixes
 Simon Wilkinson <sxw@dcs.ed.ac.uk> - PAM fixes
 Thomas Neumann <tom@smart.ruhr.de> - Shadow passwords
index b360d361f6178bd3296940fd570dadaf2f4a724d..1baf2347506bd99eedd3a2d22628a48b6714b8a8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,8 @@
  - (djm) Fixes from Andrew McGill <andrewm@datrix.co.za>:
   - Platform define for SCO 3.x which breaks on /dev/ptmx
   - Detect and try to fix missing MAXPATHLEN
+ - (djm) Fix short copy in loginrec.c (based on patch from Phill Camp
+   <P.S.S.Camp@ukc.ac.uk>
 
 20000612
  - (djm) Glob manpages in RPM spec files to catch compressed files
index 3bdf41133b75ef50e5193706b93d527003c1fa2c..0e755e4b70ca1bf036405f9937f197e60c9a1792 100644 (file)
@@ -1162,4 +1162,3 @@ fi
 
 AC_OUTPUT(Makefile ssh_prng_cmds)
 
-
index a60a7c00d14c143076a38f17b127ccd879dcaac7..19c565e8a0d05ff3d9e1dc5cd7ce9ef4452bc657 100644 (file)
@@ -438,7 +438,7 @@ line_fullname(char *dst, const char *src, int dstsize)
        if ((strncmp(src, "/dev/", 5) == 0) || (dstsize < (strlen(src) + 5)))
                strlcpy(dst, src, dstsize);
        else {
-               strlcpy(dst, "/dev/", 5);
+               strlcpy(dst, "/dev/", dstsize);
                strlcat(dst, src, dstsize);
        }
        return dst;
@@ -958,9 +958,9 @@ wtmp_get_entry(struct logininfo *li)
                        li->tv_sec = ut.ut_tv.tv_sec;
 #  endif
 #endif
-                       line_fullname(li->line, ut.ut_line, sizeof(ut.ut_line));
+                       line_fullname(li->line, ut.ut_line, sizeof(li->line));
 #ifdef HAVE_HOST_IN_UTMP
-                       strlcpy(li->hostname, ut.ut_host, sizeof(ut.ut_host));
+                       strlcpy(li->hostname, ut.ut_host, sizeof(li->hostname));
 #endif
                }
                if (lseek(fd, (off_t)(0-2*sizeof(struct utmp)), SEEK_CUR) == -1) {
@@ -1096,9 +1096,9 @@ wtmpx_get_entry(struct logininfo *li)
                        li->tv_sec = utx.ut_time;
 #  endif
 #endif
-                       line_fullname(li->line, utx.ut_line, sizeof(utx.ut_line));
+                       line_fullname(li->line, utx.ut_line, sizeof(li->line));
 #ifdef HAVE_HOST_IN_UTMPX
-                       strlcpy(li->hostname, utx.ut_host, sizeof(utx.ut_line));
+                       strlcpy(li->hostname, utx.ut_host, sizeof(li->hostname));
 #endif
                }
                if (lseek(fd, (off_t)(0-2*sizeof(struct utmpx)), SEEK_CUR) == -1) {
This page took 0.056006 seconds and 5 git commands to generate.