Re: A requirement for the current user to own ttys
- From: Key Offecka <key offecka gmail com>
- To: Egmont Koblinger <egmont gmail com>
- Cc: mc devel <mc-devel gnome org>
- Subject: Re: A requirement for the current user to own ttys
- Date: Sun, 12 Mar 2017 13:39:20 -0500
Hi,
> What do you mean by "the resource" in the lines above? There are at least two pieces of resource in the game, the tty and the vcsa (maybe more, I don't know). We'd need a much more precise description.
>> if a user doesn't own the tty device but is a member of a group owning the tty should that user have the dumb terminal?
I was talking only about tty devices here. I didn't mention vcs* in any manner.
> On your system where these vcsa devices cannot normally be accessed by a member of the tty group _and_ the real user is not the same as the tty's owner, I'm not convinced yet why permission should be granted.
Why do you think on my system I cannot access vcs* devices. As far as I remember I never said that. I am sorry if didn't make it clear. On my system cons.saver is owned by the vcsa user and has the setuid bit. vcs* devices are owned by the vcsa user as well, and the user has read/write permissions.
Once again, my questions were only about tty devices. I do not know why you're answering questions I never asked.
I am not sure if the same security policy should be applied to vcs* devices. All my questions were only about tty since the access to tty devices causes the issue. There are no problems with vcs* on my system, though some improvements of mc may also be needed here.
At this moment, as far as I can read the C code, vcs* and tty* devices treated differently. There are no special checks on vcs* done at all. So I believe access to the vcs* is relied only on the OS security. There are special checks on tty and from my perspective they are too paranoid since involve only the user owning devices.
|| fstat (console_fd, &st) < 0 || st.st_uid != uid
|| read (vcsa_fd, buffer, buffer_size) != buffer_size
console_fd is a tty device here not vcsa
As I mentioned, I think groups also should be involved in the checks of tty devices. That's it. Nothing more.
Anyway, thank you very much for the discussion. I believe the both sides received all needed information. It's now up to you whether you want to change something in the mc security or not, whether you want to make it less paranoid or not.
--
Best regards,
Konstantín
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]