[systemd-devel] [PATCH] logind: add sys_tty_config capability, to let it use VT_ACTIVATE ioctl on "activate" action
Lennart Poettering
lennart at poettering.net
Fri Jan 27 12:41:18 PST 2012
On Wed, 25.01.12 21:20, Mike Kazantsev (mk.fraggod at gmail.com) wrote:
>
> Good day,
>
> Problem is that "systemd-loginctl activate <session-id>" gives
> something like "D-Bus call failed: Operation not permitted", while
> strace of logind process looks like this:
>
> epoll_wait(4, {{EPOLLIN, {u32=3, u64=3}}}, 1, -1) = 1
> epoll_wait(9, {{EPOLLIN, {u32=166352544, u64=166352544}}}, 1, 0) = 1
> recvmsg(8, {msg_name(0)=NULL, msg_iov(1)=[{"l\1\0\1\6\0\0\0\2...
> recvmsg(8, 0xbfc3636c, MSG_CMSG_CLOEXEC) = -1 EAGAIN (Resource temporarily unavailable)
> open("/dev/tty0", O_RDWR|O_NOCTTY|O_LARGEFILE|O_CLOEXEC) = 13
> ioctl(13, SNDCTL_TMR_TIMEBASE or SNDRV_TIMER_IOCTL_NEXT_DEVICE or TCGETS, {B38400 -opost -isig -icanon -echo ...}) = 0
> ioctl(13, VT_ACTIVATE, 0x1) = -1 EPERM (Operation not permitted)
> close(13) = 0
> sendmsg(8, {msg_name(0)=NULL, msg_iov(2)=[{"l\3\1\1\34\0\0\0\243\0...
>
> So it looks like "activate" fails without that capability.
> I'm not sure what it's supposed to do though, and stumbled upon it
> while looking into unrelated issue, so maybe it's supposed to act this
> way.
>
> michich seemed to agree on irc that the cap should be there, but since
> it doesn't seem to be in git yet, I thought I'd mail the patch.
Yupp, makes a lot of sense. Patch applied!
Thanks!
Lennart
--
Lennart Poettering - Red Hat, Inc.
More information about the systemd-devel
mailing list