After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 624370 - Bring back the nested login functionality
Bring back the nested login functionality
Status: RESOLVED WONTFIX
Product: gdm
Classification: Core
Component: general
2.30.x
Other Linux
: Normal enhancement
: ---
Assigned To: GDM maintainers
GDM maintainers
Depends on:
Blocks: 624372
 
 
Reported: 2010-07-14 19:18 UTC by Josselin Mouette
Modified: 2014-03-19 19:07 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Initial work for bringing back nested logins (59.34 KB, patch)
2010-07-14 19:18 UTC, Josselin Mouette
none Details | Review
Bring back nested login (78.29 KB, patch)
2010-09-17 20:02 UTC, Josselin Mouette
none Details | Review
Ditch xhost-related code (3.65 KB, patch)
2010-09-17 20:05 UTC, Josselin Mouette
rejected Details | Review
a diff... :0 (80.10 KB, patch)
2011-10-01 17:45 UTC, db
none Details | Review

Description Josselin Mouette 2010-07-14 19:18:22 UTC
Created attachment 165904 [details] [review]
Initial work for bringing back nested logins

It was very useful to be able start a session in a Xnest/Xephyr window.

This patch (by Luca Bruno and myself) contains a working implementation of the nested logins, but with a big issue that I couldn’t debug: the xauth cookie is not passed correctly, therefore the Xnest server accepts unauthenticated connections.

If someone more knowledgeable could point to the problem with the xauth stuff, the missing functionality could finally be re-added.
Comment 1 Brian Cameron 2010-07-20 01:18:48 UTC
If you look at the GDM 2.20 code, you can see in daemon/slave.c how the old GDM handled xnest auth files in the create_temp_auth_file() and set_xnest_parent_stuff() functions, both of which are called by gdm_slave_greeter() and gdm_slave_exec_script() which is the function used to run the Init/PreSession/PostSession scripts.
Comment 2 Josselin Mouette 2010-09-17 20:02:49 UTC
Created attachment 170514 [details] [review]
Bring back nested login

Here is finally a patch that works for GDM 2.30.5.

There is probably still quite some work to get it to work for master, but it is much more solid than the previous version.

Note that it depends on another change, which is ditching all the xhost-related code in gdm-slave.c. It could be done with factoring this code another way, but it seems useless to me and I don’t like the idea.
Comment 3 Josselin Mouette 2010-09-17 20:05:00 UTC
Created attachment 170515 [details] [review]
Ditch xhost-related code
Comment 4 Ray Strode [halfline] 2010-09-20 16:49:25 UTC
Comment on attachment 170515 [details] [review]
Ditch xhost-related code

The xhost code is very important, since xauth cookies are tied to hostname and hostnames tend to change at runtime.
Comment 5 Josselin Mouette 2010-09-20 22:28:14 UTC
(In reply to comment #4)
> (From update of attachment 170515 [details] [review])
> The xhost code is very important, since xauth cookies are tied to hostname and
> hostnames tend to change at runtime.

Is it a reason to allow unauthenticated connections?

Neither of XDM, KDM, Slim, and GDM 2.20 have such a “feature”, and we are not crawling under bug reports caused by changing hostnames.
Comment 6 db 2011-09-28 09:17:39 UTC
Is there a reason this patch hasn't been applied to gdm(2.3) yet? 
Also couldn't the xhost 'feature' be configuration option (if there is a reason for supporting it).
Comment 7 db 2011-10-01 17:45:33 UTC
Created attachment 197969 [details] [review]
a diff... :0

Right ok so I have updated @Josselin Mouette's patch to 3.0.4 (I know this isn't the latest) and added a ENABLE_XHOST_AUTH around the gdm_slave_setup_xhost_auth related code, instead of removing it. 

Other than removing the debug messages, is there anything else that needs to be done?
Comment 8 db 2011-10-01 17:47:37 UTC
Note: XXX: I also added in the patch - the appropriate extra environment vars so that Xephyr would be properly configured (in debian/rules).
Comment 9 Ray Strode [halfline] 2014-03-19 19:07:26 UTC
realistically, this isn't coming back.  logind doesn't support nested sessions, for instance.

I think our answer should be "turn on Xdmcp and run Xephyr -query localhost" for people who want this functionality.