summaryrefslogtreecommitdiff
path: root/loginrec.c
diff options
context:
space:
mode:
authorandre <andre>2000-06-19 09:11:30 +0000
committerandre <andre>2000-06-19 09:11:30 +0000
commit98cabe05469dd5ed132b47d95177867c70992c8b (patch)
treeac79c90fa09e0f7f97a1d5f844a301a4a24ed875 /loginrec.c
parentb4db42f781babd3935145d99e44a287808ae832d (diff)
*** empty log message ***
Diffstat (limited to 'loginrec.c')
-rw-r--r--loginrec.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/loginrec.c b/loginrec.c
index e51d686bf..8df2e78e2 100644
--- a/loginrec.c
+++ b/loginrec.c
@@ -170,7 +170,7 @@
170#include "xmalloc.h" 170#include "xmalloc.h"
171#include "loginrec.h" 171#include "loginrec.h"
172 172
173RCSID("$Id: loginrec.c,v 1.7 2000/06/19 08:20:03 andre Exp $"); 173RCSID("$Id: loginrec.c,v 1.8 2000/06/19 09:11:30 andre Exp $");
174 174
175/** 175/**
176 ** prototypes for helper functions in this file 176 ** prototypes for helper functions in this file
@@ -301,8 +301,9 @@ login_get_lastlog(struct logininfo *li, const int uid)
301 * reliably search wtmp(x) for the last login (see 301 * reliably search wtmp(x) for the last login (see
302 * wtmp_get_entry().) */ 302 * wtmp_get_entry().) */
303 pw = getpwuid(uid); 303 pw = getpwuid(uid);
304 strlcpy(li->username, pw->pw_name, 304 /* No MIN_SIZEOF here - we absolutely *must not* truncate the
305 MIN_SIZEOF(li->username, pw->pw_name)); 305 * username */
306 strlcpy(li->username, pw->pw_name, li->username);
306#endif 307#endif
307 if (getlast_entry(li)) 308 if (getlast_entry(li))
308 return li; 309 return li;