Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 604098 - dev-libs/sway-0.11-r1 permission problems without systemd/logind
Summary: dev-libs/sway-0.11-r1 permission problems without systemd/logind
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: AMD64 Linux
: Normal normal (vote)
Assignee: Jasen Borisov
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-12-29 23:02 UTC by Georgy Yakovlev
Modified: 2017-01-03 23:08 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
emerge --info output (emerge--info.txt,5.81 KB, text/plain)
2016-12-29 23:02 UTC, Georgy Yakovlev
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Georgy Yakovlev archtester gentoo-dev 2016-12-29 23:02:06 UTC
Created attachment 457890 [details]
emerge --info output

Hello,

I'm running systemd-less system (which is gentoo default I believe)
as I see from ebuild it should set suid bit, but it does not.
/usr/bin/sway clearly does not have SUID bit after installation.

because of that sway cannot open some /dev/tty* devices on launch.

also, if I set SUID, sway fails to launch at 
ioctl(3, VT_ACTIVATE, 0x7) = -1 EPERM (Operation not permitted)

see upstream bug for more details.
https://github.com/SirCmpwn/sway/issues/1022
for some reason it was closed without explanation.

to work around that issue on systems running without systemd/logind one needs to add cap_sys_tty_config to /usr/bin/sway


Can you please check suid bit settings and consider adding cap_sys_tty_config to FILECAPS if emerging without systemd USE flag?
I'm not sure if it's a big security issue or not, it works for me.

Let me know if you need any logs or straces.
Comment 1 Patrice Clement gentoo-dev 2017-01-03 23:08:46 UTC
commit 768744de39c5ec4b86c5d0213372f844e40841b8 (HEAD -> master, origin/master, origin/HEAD)
Author:     Mykyta Holubakha <hilobakho@gmail.com>
AuthorDate: Sat Dec 31 04:09:16 2016 +0200
Commit:     Patrice Clement <monsieurp@gentoo.org>
CommitDate: Wed Jan 4 00:08:05 2017 +0100

dev-libs/sway: revbump to 0.11-r2.

* preserve SUID bit.
* add cap_sys_tty_config to sway binary.

Gentoo-Bug: https://bugs.gentoo.org/604098

Closes: https://github.com/gentoo/gentoo/pull/3292

dev-libs/sway/{sway-0.11-r1.ebuild => sway-0.11-r2.ebuild} | 8 +-------
dev-libs/sway/sway-9999.ebuild                             | 8 +-------
2 files changed, 2 insertions(+), 14 deletions(-)
rename dev-libs/sway/{sway-0.11-r1.ebuild => sway-0.11-r2.ebuild} (92%)