befd876 logind: do not print wall messages to local pseudoterminals

Authored and Committed by zbyszek 2 years ago
    logind: do not print wall messages to local pseudoterminals
    
    Fixes #23520. Replaces #23555.
    
    The problem started with cdf370626f08ed509a5dde9d5618eed29d625032 and
    90b1ec03b2ce939f589239133a32f4429f2ad6a6 which together started printing the
    wall message in more cases. The motivation for those change was reasonable, but
    this clearly causes problems described in #23520: users are getting unexpected
    wall messages. Xterm, urxvt, (anything using libutempter?), and tmux (in some
    configurations), register local pty sessions in utmp.
    
    So let's try to suppress the message for local pseudo-terminal logins. This
    patch based on #23538, but instead of filtering just on /dev/pts, it uses the
    .ut_addr_v6 to only filter out local entries.
    
    (cherry picked from commit 51a2b575d751c257f2603f12fe9bb883014c37c1)
    
        
file modified
+7 -9