]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mesg: use only stat() to get the current terminal status
authorKarel Zak <kzak@redhat.com>
Mon, 12 Apr 2021 07:39:59 +0000 (09:39 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Apr 2021 07:39:59 +0000 (09:39 +0200)
commitc0246ce059503bbc078122a50d564ca36a66f348
tree54f96c65a34c8d021d5c714a75f3e65ecc47b440
parent37bd59bd531daa60487d4cbf9d5d0229ebb0a015
mesg: use only stat() to get the current terminal status

open()+stat() does not work for example after su(1) (from root to
non-root). It seems better to use only stat() to get the current
terminal status.

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1906157
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/mesg.c