diff options
Diffstat (limited to 'usr.bin/ssh/sshlogin.c')
-rw-r--r-- | usr.bin/ssh/sshlogin.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/usr.bin/ssh/sshlogin.c b/usr.bin/ssh/sshlogin.c index cd21b2e2c2a..a9c7cc91ef9 100644 --- a/usr.bin/ssh/sshlogin.c +++ b/usr.bin/ssh/sshlogin.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sshlogin.c,v 1.31 2015/01/20 23:14:00 deraadt Exp $ */ +/* $OpenBSD: sshlogin.c,v 1.32 2015/12/26 20:51:35 guenther Exp $ */ /* * Author: Tatu Ylonen <ylo@cs.hut.fi> * Copyright (c) 1995 Tatu Ylonen <ylo@cs.hut.fi>, Espoo, Finland @@ -83,7 +83,7 @@ get_last_login_time(uid_t uid, const char *logname, if (fd < 0) return 0; - pos = (long) uid * sizeof(ll); + pos = (off_t)uid * sizeof(ll); r = lseek(fd, pos, SEEK_SET); if (r == -1) { error("%s: lseek: %s", __func__, strerror(errno)); @@ -176,7 +176,7 @@ record_login(pid_t pid, const char *tty, const char *user, uid_t uid, strncpy(ll.ll_host, host, sizeof(ll.ll_host)); fd = open(lastlog, O_RDWR); if (fd >= 0) { - lseek(fd, (off_t) ((long) uid * sizeof(ll)), SEEK_SET); + lseek(fd, (off_t)uid * sizeof(ll), SEEK_SET); if (write(fd, &ll, sizeof(ll)) != sizeof(ll)) logit("Could not write %.100s: %.100s", lastlog, strerror(errno)); close(fd); |