{"guid":"xnGQWqekZAEvp6uwuseIVQ","title":"Y2038: utmp, wtmp and lastlog","subtitle":"How openSUSE solved this","slug":"4578-y2038-utmp-wtmp-and-lastlog","link":"https://c3voc.de","description":"The year 2038 problem (also known as Y2038) is a time formatting bug on Unix systems with representing times after 03:14:07 UTC on 19 January 2038. This happens with a 32bit time_t, not with a 64bit time_t. The general statement so far has always been that on 64bit systems with a 64bit time_t you are safe with respect to the Y2038 problem. But this isn't correct: on bi-arch systems like x86-64 (so which can execute 64bit and 32bit binaries) glibc defines __WORDSIZE_TIME64_COMPAT32, which leads to the fact, that struct utmp (used for utmp, wtmp and btmp) and struct lastlog uses int32_t instead of time_t. So we have a Y2038 problem, which is not easy fixable, as this would require ABI and on disk format changes. In this talk I will speak about the background, which tools are affected and how we solved that in openSUSE by dropping utmp, wtmp, btmp and lastlog completely and make use of systemd-logind and other tools instead.\n\nThe year 2038 problem (also known as Y2038) is a time formatting bug on Unix systems with representing times after 03:14:07 UTC on 19 January 2038. This happens with a 32bit time_t, not with a 64bit time_t. The general statement so far has always been that on 64bit systems with a 64bit time_t you are safe with respect to the Y2038 problem. But this isn't correct: on bi-arch systems like x86-64 (so which can execute 64bit and 32bit binaries) glibc defines __WORDSIZE_TIME64_COMPAT32, which leads to the fact, that struct utmp (used for utmp, wtmp and btmp) and struct lastlog uses int32_t instead of time_t. So we have a Y2038 problem, which is not easy fixable, as this would require ABI and on disk format changes. In this talk I will speak about the background, which tools are affected and how we solved that in openSUSE by dropping utmp, wtmp, btmp and lastlog completely and make use of systemd-logind and other tools instead.","original_language":"eng","persons":["Thorsten Kukuk"],"tags":["osc24","4578","2024","New Technologies"],"view_count":76,"promoted":false,"date":"2024-06-27T15:30:00.000+02:00","release_date":"2024-07-05T00:00:00.000+02:00","updated_at":"2026-03-17T17:45:09.092+01:00","length":1697,"duration":1697,"thumb_url":"https://static.media.ccc.de/media/events/osc/2024/4578-xnGQWqekZAEvp6uwuseIVQ.jpg","poster_url":"https://static.media.ccc.de/media/events/osc/2024/4578-xnGQWqekZAEvp6uwuseIVQ_preview.jpg","timeline_url":"https://static.media.ccc.de/media/events/osc/2024/4578-xnGQWqekZAEvp6uwuseIVQ.timeline.jpg","thumbnails_url":"https://static.media.ccc.de/media/events/osc/2024/4578-xnGQWqekZAEvp6uwuseIVQ.thumbnails.vtt","frontend_link":"https://media.ccc.de/v/4578-y2038-utmp-wtmp-and-lastlog","url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_title":"openSUSE Conference 2024","conference_url":"https://api.media.ccc.de/public/conferences/osc24","related":[],"recordings":[{"size":1002,"length":1697,"mime_type":"video/webm","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_webm-hd.webm","state":"new","folder":"webm-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2024-07-09T17:43:33.632+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/webm-hd/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_webm-hd.webm","url":"https://api.media.ccc.de/public/recordings/78372","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"},{"size":291,"length":1697,"mime_type":"video/webm","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_webm-sd.webm","state":"new","folder":"webm-sd","high_quality":false,"width":720,"height":576,"updated_at":"2024-07-06T03:58:37.005+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/webm-sd/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_webm-sd.webm","url":"https://api.media.ccc.de/public/recordings/78205","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"},{"size":167,"length":1697,"mime_type":"video/mp4","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_sd.mp4","state":"new","folder":"h264-sd","high_quality":false,"width":720,"height":576,"updated_at":"2024-07-06T00:19:19.012+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/h264-sd/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_sd.mp4","url":"https://api.media.ccc.de/public/recordings/78168","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"},{"size":14,"length":1697,"mime_type":"audio/opus","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_opus.opus","state":"new","folder":"opus","high_quality":false,"width":0,"height":0,"updated_at":"2024-07-05T22:02:55.427+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/opus/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_opus.opus","url":"https://api.media.ccc.de/public/recordings/78140","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"},{"size":25,"length":1697,"mime_type":"audio/mpeg","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_mp3.mp3","state":"new","folder":"mp3","high_quality":false,"width":0,"height":0,"updated_at":"2024-07-05T22:02:11.051+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/mp3/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_mp3.mp3","url":"https://api.media.ccc.de/public/recordings/78139","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"},{"size":566,"length":1697,"mime_type":"video/mp4","language":"eng","filename":"osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_hd.mp4","state":"new","folder":"h264-hd","high_quality":true,"width":1920,"height":1080,"updated_at":"2024-07-05T02:10:46.718+02:00","recording_url":"https://cdn.media.ccc.de/events/osc/2024/h264-hd/osc24-4578-eng-Y2038_utmp_wtmp_and_lastlog_hd.mp4","url":"https://api.media.ccc.de/public/recordings/78112","event_url":"https://api.media.ccc.de/public/events/xnGQWqekZAEvp6uwuseIVQ","conference_url":"https://api.media.ccc.de/public/conferences/osc24"}]}