From 7eb890e5072dedc759281fee68edd64b3bb065bf Mon Sep 17 00:00:00 2001 From: lotherk Date: Wed, 18 Nov 2026 05:29:32 +0000 Subject: [PATCH] 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. --- programs/dtlogin/dm.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/programs/dtlogin/dm.c b/programs/dtlogin/dm.c index 256e2e06..ccbc27ad 100644 --- a/programs/dtlogin/dm.c +++ b/programs/dtlogin/dm.c @@ -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);