]> andersk Git - openssh.git/blobdiff - loginrec.c
*** empty log message ***
[openssh.git] / loginrec.c
index 6234147ca7196f2626b8874c362ec50358890cf0..844e9668f958f9d97f41f2fb0459dd1aa5d47e91 100644 (file)
@@ -301,8 +301,9 @@ login_get_lastlog(struct logininfo *li, const int uid)
         * reliably search wtmp(x) for the last login (see
         * wtmp_get_entry().) */
        pw = getpwuid(uid);
-       strlcpy(li->username, pw->pw_name, 
-               MIN_SIZEOF(li->username, pw->pw_name));
+       /* No MIN_SIZEOF here - we absolutely *must not* truncate the
+         * username */
+       strlcpy(li->username, pw->pw_name, li->username);
 #endif
        if (getlast_entry(li))
                return li;
This page took 0.042289 seconds and 4 git commands to generate.