dtlogin: the parent presents the cookie to its own server

With the server running as root it enforces access control (it can read
-auth now), and WaitForServer's XOpenDisplay in the parent had no
authorization: 'Authorization required, but no authorization protocol
specified' and 'Server for display :0 can't be started' (2026-11-18).
SetAuthorization(d) is called before the wait, as the server child already
did.
This commit is contained in:
lotherk committed 2026-11-18 05:29:32 +00:00
1 parent 21de6b6edd
commit 7eb890e507
1 file changed
+7
+7
View File
@@ -1061,6 +1061,13 @@ StartDisplay(
#endif
}
/*
* The server reads its -auth file now (it runs as root) and enforces
* access control; this process has to present the cookie as well.
* Without it: "Authorization required, but no authorization protocol
* specified", "Server for display :0 can't be started" (2026-11-18).
*/
SetAuthorization (d);
if (!WaitForServer (d))
exit (OPENFAILED_DISPLAY);