Voltago Advocate


Joined: 02 Sep 2003 Posts: 2593 Location: userland
|
Posted: Sun Feb 22, 2015 10:30 pm Post subject: Weston-terminal bleeds commands to VT with root privileges |
|
|
So I've been playing around with weston (as one does, once or twice a year), and encountered the oddest problem. Before filing a bug though, I'd like some confirmation that I'm not going crazy here or anything. It can be reproduced like this:
1) Install dev-libs/weston
2) Create/choose a weston user, e. g. 'test'
3) Create your XDG_RUNTIME_DIR with owner 'test:users'
4) Set up your XDG_RUNTIME_DIR in /etc/environment
5) Log into a VT (press ALT+CTRL+F1) as root, stop X
6) Start weston via
Code: | weston-launch -u test |
7) Open a terminal (terminal symbol, top left).
8 ) Type
Code: | cd
touch weston.txt
killall weston |
You now may find that both /root and /home/test contain a file called 'weston.txt', the one in /root with owner root:root. This means that everything you execute in weston terminal as 'test' will also be executed as root, and not necessarily from the same working directory, which obviously is pretty dangerous (in fact, you can see your commands printed out among the output from weston-launch on the VT). As of now I haven't got a clue whether the problem is endemic to my setup, or a weston problem or a libinput probem or whatever. Could somebody with five minutes on their hands test if this happens on their machine as well? Thanks.
(Versions 1.6.1 and 1.7.0 show this behavior, weston's rdesktop backend doesn't seem to be affected, and neither are terminal emulators other than weston-terminal.) |
|