summaryrefslogtreecommitdiff
path: root/openbsd-compat
diff options
context:
space:
mode:
Diffstat (limited to 'openbsd-compat')
-rw-r--r--openbsd-compat/bsd-cray.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/openbsd-compat/bsd-cray.c b/openbsd-compat/bsd-cray.c
index 3cef7d15d..a03344f72 100644
--- a/openbsd-compat/bsd-cray.c
+++ b/openbsd-compat/bsd-cray.c
@@ -164,9 +164,10 @@ cray_retain_utmp(struct utmp *ut, int pid)
164 while (read(fd, (char *)&utmp, sizeof(utmp)) == sizeof(utmp)) { 164 while (read(fd, (char *)&utmp, sizeof(utmp)) == sizeof(utmp)) {
165 if (pid == utmp.ut_pid) { 165 if (pid == utmp.ut_pid) {
166 ut->ut_jid = utmp.ut_jid; 166 ut->ut_jid = utmp.ut_jid;
167 strncpy(ut->ut_tpath, utmp.ut_tpath, TPATHSIZ); 167 /* XXX: MIN_SIZEOF here? can this go in loginrec? */
168 strncpy(ut->ut_host, utmp.ut_host, strlen(utmp.ut_host)); 168 strncpy(ut->ut_tpath, utmp.ut_tpath, sizeof(utmp.ut_tpath));
169 strncpy(ut->ut_name, utmp.ut_name, strlen(utmp.ut_name)); 169 strncpy(ut->ut_host, utmp.ut_host, sizeof(utmp.ut_host));
170 strncpy(ut->ut_name, utmp.ut_name, sizeof(utmp.ut_name));
170 break; 171 break;
171 } 172 }
172 } 173 }