| Summary: | xdm-1.1.9: sessreg+who not working; Xstartup should exec sessreg | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | xorg | Reporter: | Johannes Dewender <xorg> | ||||||
| Component: | App/xdm | Assignee: | Xorg Project Team <xorg-team> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | Xorg Project Team <xorg-team> | ||||||
| Severity: | normal | ||||||||
| Priority: | medium | Keywords: | patch | ||||||
| Version: | 7.5 (2009.10) | ||||||||
| Hardware: | Other | ||||||||
| OS: | Linux (All) | ||||||||
| Whiteboard: | |||||||||
| i915 platform: | i915 features: | ||||||||
| Attachments: |
|
||||||||
|
Description
Johannes Dewender
2009-11-12 19:18:55 UTC
I also did some further testing on how it should work.
I open a terminal.
who
shows nothing
then:
sudo /usr/bin/sessreg -a -w /var/log/wtmp -u /var/run/utmp -x /etc/X11/xdm/Xservers -l :0 -h haljo jonnyjd
who shows a session for jonnyjd.
Then when I close that terminal and do "who" in a new terminal I don't get anything anymore.
from man utmp:
struct utmp {
short ut_type; /* Type of record */
pid_t ut_pid; /* PID of login process */
...
When init(8) finds that a process has exited, it locates its utmp entry by ut_pid, sets ut_type to DEAD_PROCESS, and clears ut_user, ut_host and ut_time with null bytes.
The above mentioned procedure might not be up to date, because nothing is reset. It's just not used anymore when ut_pid doesn exist.
I use glibc 2.11. That might have an impact on the usage of utmp.
Created attachment 31165 [details] [review] fix: exec sessreg, rathern than just running it in Xstartup Okay, I read a bit in the code and I think doing it the other way around would be easier: In stead of sourcing Xstartup you can also "exec" sessreg. I made a quick patch for the default configuration. Everybody can change the configuration, of course, but it would help a lot if the default configuration is already working. Created attachment 31184 [details] [review] Patch: Exec sessreg in Xstartup Redid the patch with git. Including summary and signed-of. Patch in attachment #31184 [details] [review] seems sane to me. AFAICT the Xstartup script we're shipping in Debian does that already, and who tells me: julien :0 Mar 9 12:28 So, Acked-by: Julien Cristau <jcristau@debian.org> (updating bug description accordingly) Makes sense - pushed to git master. Thanks for the patch. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.