Re: A requirement for the current user to own ttys

2017-03-12 Thread Key Offecka
urity or not, whether you want to make it less paranoid or not. -- Best regards, Konstantín On 11 March 2017 at 19:57, Egmont Koblinger <egm...@gmail.com> wrote: > Hi, > > On Sun, Mar 12, 2017 at 12:54 AM, Key Offecka <key.offe...@gmail.com> > wrote: > >> >

Re: A requirement for the current user to own ttys

2017-03-11 Thread Key Offecka
Hi, > You did mention "sudo" a couple of times Yes, I did. And maybe even more times, but I never told about extra rights obtained by a user just because of sudoing. > You keep talking about "first" and "second" user, in order to have these you must switch user by some means And I told you, in

Re: A requirement for the current user to own ttys

2017-03-11 Thread Key Offecka
Hi Egmont, > What do you mean the tty owner is the _problem_? What kind of problem? Please excuse me, I wasn't quite correct there. Let's forget about permissions and TTYs. Let's look at the issue from the user point of view. Please consider this case: There is a user, say `echo` and there is

Re: A requirement for the current user to own ttys

2017-03-10 Thread Key Offecka
ope this explains the situation. > > I'm not sure why something is checked twice, but it can easily be in order > to avoid a race condition (or could easily be a harmless bug as well). > > egmont > > > On Fri, Mar 10, 2017 at 1:06 AM, Key Offecka <key.offe...@gmail.com> &g

A requirement for the current user to own ttys

2017-03-09 Thread Key Offecka
Hi, I am looking at the main (int argc, char **argv) function in src/consaver/cons.saver.c There are calls like st.st_uid != uid fstat (console_fd, ) >= 0 && st.st_uid == uid fstat (console_fd, ) < 0 || st.st_uid != uid The last one is especially strange taking into account that it