From: Andrew Morton <akpm@linux-foundation.org>
To: Frank Benkstein <frank@benkstein.net>
Cc: linux-kernel@vger.kernel.org
Subject: Re: VT_PROCESS, VT_LOCKSWITCH capabilities
Date: Wed, 1 Aug 2007 15:19:00 -0700 [thread overview]
Message-ID: <20070801151900.f80722b6.akpm@linux-foundation.org> (raw)
In-Reply-To: <46AFF390.10103@benkstein.net>
On Wed, 01 Aug 2007 04:44:32 +0200
Frank Benkstein <frank@benkstein.net> wrote:
> Frank Benkstein wrote:
> > I wonder why there are different permissions needed for VT_PROCESS
> > (access to the current virtual console) and VT_LOCKSWITCH
> > (CAP_SYS_TTY_CONFIG).
>
> To be more direct:
>
> require CAP_SYS_TTY_CONFIG for VT_SETMODE as its essentially the same as
> VT_LOCKSWITCH and said capability is already required there
>
> diff --git a/drivers/char/vt_ioctl.c b/drivers/char/vt_ioctl.c
> index c6f6f42..7034a68 100644
> --- a/drivers/char/vt_ioctl.c
> +++ b/drivers/char/vt_ioctl.c
> @@ -662,7 +662,7 @@ int vt_ioctl(struct tty_struct *tty, struct file * file,
> {
> struct vt_mode tmp;
>
> - if (!perm)
> + if (!perm || !capable(CAP_SYS_TTY_CONFIG))
> return -EPERM;
> if (copy_from_user(&tmp, up, sizeof(struct vt_mode)))
> return -EFAULT;
>
There's a good risk of breaking stuff with this change. A quick peek
through http://www.google.com/codesearch shows that.
We need good reasons for making that change, and for handling the
subsequent fallout, getting shouted at by aggrieved users, etc.
It's tricky.
next prev parent reply other threads:[~2007-08-01 22:19 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-31 22:22 VT_PROCESS, VT_LOCKSWITCH capabilities Frank Benkstein
2007-08-01 2:44 ` Frank Benkstein
2007-08-01 22:19 ` Andrew Morton [this message]
2007-08-02 10:31 ` Frank Benkstein
2007-08-01 4:49 ` Andrew Morton
2007-08-01 9:53 ` Frank Benkstein
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20070801151900.f80722b6.akpm@linux-foundation.org \
--to=akpm@linux-foundation.org \
--cc=frank@benkstein.net \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox