]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mesg: avoid 'ttyname failed: Success' message
authorKarel Zak <kzak@redhat.com>
Mon, 27 May 2019 11:07:12 +0000 (13:07 +0200)
committerKarel Zak <kzak@redhat.com>
Mon, 27 May 2019 11:07:12 +0000 (13:07 +0200)
commit2c864ba8fcf50246920d09feaa2b02f3a3dfd52c
treee03eda273424729ccd1820ef89fbaa71c79423f0
parenta6d9d23b5f9e3c1d421c1f32a3f1dffe8452cb74
mesg: avoid 'ttyname failed: Success' message

The ttyname(3) can fail to access /dev/ path, and that will cause function
to fail without setting errno value with result of rather confusing error
message.  Lets start setting stdin permission via /proc when this happens as
a go-around, with hope kernel following symlink does not fail.  Ok, noted,
that hopes of symlink follow working are pretty slim.

Based on patch from Sami Kerola <kerolasa@iki.fi>.

Reference: https://github.com/lxc/lxd/issues/1724
Signed-off-by: Karel Zak <kzak@redhat.com>
term-utils/Makemodule.am
term-utils/mesg.1
term-utils/mesg.c