bugzilla-daemon at bugzilla.mindrot.org
2010-Sep-13 11:07 UTC
[Bug 1817] New: lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 Summary: lastlog is not recorded with the big uid Product: Portable OpenSSH Version: 5.6p1 Platform: All OS/Version: All Status: NEW Severity: normal Priority: P2 Component: sshd AssignedTo: unassigned-bugs at mindrot.org ReportedBy: jchadima at redhat.com Description of problem: lastlog is not recorded with the big uid (>2147483647). 1569 /* open the file (using filemode) and seek to the login entry */ 1570 static int 1571 lastlog_openseek(struct logininfo *li, int *fd, int filemode) 1572 { ... 1600 if (type == LL_FILE) { 1601 /* find this uid's offset in the lastlog file */ 1602 offset = (off_t) ((long)li->uid * sizeof(struct lastlog)); 1603 1604 if (lseek(*fd, offset, SEEK_SET) != offset) { 1605 logit("%s: %s->lseek(): %s", __func__, 1606 lastlog_file, strerror(errno)); 1607 return (0); 1608 } When uid is 2147483648, offset is 18446743446644326400 at line 1602. uid = 2147483648 (0x80000000) (long)uid = 18446744071562067968 (0xFFFFFFFF80000000) As a result, offset becomes so big value, lseek fails, and lastlog is not recorded. lseek(9, 18446743446644326400, SEEK_SET) = -1 EINVAL (Invalid argument) -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Sep-13 11:09 UTC
[Bug 1817] lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 --- Comment #1 from jchadima at redhat.com 2010-09-13 21:09:31 EST --- Created attachment 1924 --> https://bugzilla.mindrot.org/attachment.cgi?id=1924 Patch solving the problem -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Nov-04 23:48 UTC
[Bug 1817] lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 --- Comment #2 from Damien Miller <djm at mindrot.org> 2010-11-05 10:48:27 EST --- Created attachment 1946 --> https://bugzilla.mindrot.org/attachment.cgi?id=1946 /home/djm/sshd-loginrec-types.diff use correct types for loginrec -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Nov-04 23:49 UTC
[Bug 1817] lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 Darren Tucker <dtucker at zip.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- Attachment #1946| |ok+ Flags| | -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2010-Nov-04 23:53 UTC
[Bug 1817] lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |djm at mindrot.org Status|NEW |RESOLVED Resolution| |FIXED --- Comment #3 from Damien Miller <djm at mindrot.org> 2010-11-05 10:53:01 EST --- correct types patch applied -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
bugzilla-daemon at bugzilla.mindrot.org
2011-Jan-24 01:33 UTC
[Bug 1817] lastlog is not recorded with the big uid
https://bugzilla.mindrot.org/show_bug.cgi?id=1817 Damien Miller <djm at mindrot.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #4 from Damien Miller <djm at mindrot.org> 2011-01-24 12:33:32 EST --- Move resolved bugs to CLOSED after 5.7 release -- Configure bugmail: https://bugzilla.mindrot.org/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are watching the assignee of the bug. You are watching someone on the CC list of the bug.
Maybe Matching Threads
- [Bug 492] New: Spurious error message from loginrec when attempting to login in with the highest uid for the first time.
- [PATCH] openssh - loginrec.c - Non-atomic file operations.
- lastlog_get_entry error on IRIX
- OpenSSH 2.2.0p1 port to QNX 4
- openssh-2.9.9p2 session.c fails on Solaris 7,8 w/ SunPro C