]> git.ipfire.org Git - thirdparty/util-linux.git/commit
write: change determination can user write to a terminal
authorSami Kerola <kerolasa@iki.fi>
Sun, 18 Aug 2013 09:44:13 +0000 (10:44 +0100)
committerSami Kerola <kerolasa@iki.fi>
Thu, 29 Aug 2013 17:14:07 +0000 (18:14 +0100)
commit0233a8ea18bec17dd59cfe1fec8281d2b9c26d22
tree52020d578fc07ebfd17ec3ae7073aaa80fbdf3ff
parentf7afb6b6b850c25e09140e0cd75c6c517f5685c4
write: change determination can user write to a terminal

Earlier test failed when user had write permission, but was not in
special group that owns terminal devices, usually tty.

This made write(1) to fail for root, if the root did not happen to be in
tty group.  In this commit root is granted ot write to anyone, even if
they have mesg(1) turned off.  For an user who is trying to write to own
other session the group write bit is significant only for whether mesg(1)
are enabled.

Signed-off-by: Sami Kerola <kerolasa@iki.fi>
term-utils/write.c