Bugzilla – Bug 1224148
sddm-helper should not write utmp entry if utmp file does not exist
Last modified: 2024-05-13 11:59:49 UTC
sddm-helper[1263]: Failed to write utmpx: No such file or directory
JFYI: I am seeing this error message also with the former version lastlog2-1.3.1-1.1.x86_64.
utmp has absolute nothing to do with lastlog/lastlog2.
What should sddm do? Just ignore ENOENT?
(In reply to Fabian Vogt from comment #3) > What should sddm do? Just ignore ENOENT? glibc (and several other implementations I saw) do a "return 0" if the utmp file cannot be open'd, for all reasons. So they do nothing if they cannot open the utmp file RDONLY.
(In reply to Thorsten Kukuk from comment #4) > (In reply to Fabian Vogt from comment #3) > > What should sddm do? Just ignore ENOENT? > > glibc (and several other implementations I saw) do a "return 0" if the utmp > file cannot be open'd, for all reasons. > So they do nothing if they cannot open the utmp file RDONLY. This is about writing, i.e. pututxline. That appears to fail. SDDM does // fill entry ... // write to utmp setutxent(); if (!pututxline (&entry)) qWarning() << "Failed to write utmpx: " << strerror(errno); endutxent(); Should SDDM explicitly ignore ENOENT? Some compile time detection would be fine as well, but I don't see anything fitting.