[dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
Hello, This patch adds utmpx support in st, which means that st sessions will be visible using who or, who is the correct behaviour of a terminal emulator, but this means that the binary needs have setgid, which is something we have to thing carefully. Other important about

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Christoph Lohmann
Hello. On Tue, 09 Oct 2012 19:09:36 +0200 Roberto E. Vargas Caballero k...@shike2.com wrote: Hello, This patch adds utmpx support in st, which means that st sessions will be visible using who or, who is the correct behaviour of a terminal emulator, but this means that the binary

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Anthony J. Bentley
Roberto E. Vargas Caballero writes: This patch adds utmpx support in st, which means that st sessions will be visible using who or, who is the correct behaviour of a terminal emulator, but this means that the binary needs have setgid, which is something we have to thing carefully.

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
This patch is fixing something st shouldn’t do. In my environment all the environment variables you propose to add are set. That’s something the shell should do and not the terminal emulator. A terminal emulator should be neutral to this. Sorry, but I think you are fixing something

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
Relay in correct values of LOGNAME and USER is a security risk. If st doesn't check against /etc/passwd you can get who(1) shows other user as connected, for example. Usually these variables are set by login(1), and like a terminal emulator is doing the login job, setting these variables are

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Christoph Lohmann
Greetings. On Tue, 09 Oct 2012 19:20:53 +0200 Anthony J. Bentley anth...@cathet.us wrote: Roberto E. Vargas Caballero writes: This patch adds utmpx support in st, which means that st sessions will be visible using who or, who is the correct behaviour of a terminal emulator, but this

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Christoph Lohmann
Hello. On Tue, 09 Oct 2012 19:25:29 +0200 Roberto E. Vargas Caballero k...@shike2.com wrote: This patch is fixing something st shouldn’t do. In my environment all the environment variables you propose to add are set. That’s something the shell should do and not the terminal

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Christoph Lohmann
Greetings. On Tue, 09 Oct 2012 19:31:50 +0200 Roberto E. Vargas Caballero k...@shike2.com wrote: Relay in correct values of LOGNAME and USER is a security risk. If st doesn't check against /etc/passwd you can get who(1) shows other user as connected, for example. Usually these variables

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
That e‐mail has several reason to not support utmpx. The proposed patch has the same size of an equal dbus interface that would call some kind of logind. That’s the kind of cruft people complain about before they start to reinvent it using Javascript or Go. xterm uses libutempter, which

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
And if SHELL is not set, st before this patch segfault. Actually, this is a simple check to just use »/bin/sh«. Which environ‐ ment today does not have SHELL set? The code set SHELL only if is not set (3rd parameter of setenv). SHELL can be unset if a ugly user unset it ;).

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
How is this a possible security risk? St shouldn’t be used to control login shells. It’s there to show escape sequences jump around on a screen. The problem is that the terminal emulation is too much related to the pty stuff. The program who create the master/slave is the responsable

Re: [dev] Adding utmpx stuff

2012-10-09 Thread Roberto E. Vargas Caballero
It is also necessary set WINDOWID, because it is the XWindow ID of the terminal. I suppouse w3m needs this variable to print images in the terminal.