Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CAP_SYS_TTY_CONFIG is needed for vt activation if running without systemd/logind #1022

Closed
gyakovlev opened this issue Dec 29, 2016 · 4 comments

Comments

@gyakovlev
Copy link

HI,

Installed 0.11 on my gentoo machine and got stuck for some time without ability to launch sway.
it seems after dropping privileges sway cannot swtich to vt7.
error I traced was
ioctl(3, VT_ACTIVATE, 0x7) = -1 EPERM (Operation not permitted)

I'm running without systemd, logind, or consolekit if that matters.
tried both SUID and NON-suid bits, no difference..

the following capabilities got me running again
/usr/bin/sway = cap_sys_ptrace,cap_sys_tty_config+ep

Is it specific to my setup or sway drops privileges too early?

It should be fixed or documented.

I can go back and provide strace output if you need that. let me know.

sway-0.11
wlc-0.0.7
wayland-1.12.0

@ddevault
Copy link
Contributor

Do you have a similar problem with orbment?

@gyakovlev
Copy link
Author

you are quick =)
I have not tried orbment, I can try to install it and test but probably it will take a lot of time. not ready for that right now. maybe next few days.
you mean those issues, right?
Cloudef/orbment#82
Cloudef/orbment#102

@gyakovlev
Copy link
Author

gyakovlev commented Dec 29, 2016

ok I tested orbment, it was faster than I imagined.

it opens vt7 for me and displays black desktop and a mouse (SUID, no capabilities set) but input devices don't work, but that's another issue I believe.

@robotanarchy
Copy link
Contributor

I can confirm this on Arch Linux without systemd, and also that it works after running the following setcap command: setcap cap_sys_tty_config=ep /usr/bin/sway

Added this to the wiki.

@gyakovlev gyakovlev changed the title CAP_SYS_TTY_CONFIG is needed for vt activation CAP_SYS_TTY_CONFIG is needed for vt activation if running without systemd/logind Dec 29, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants