dtlogin: the server as root, and /var/dt writable for the session

Two causes of 'the login goes back to the greeter', both measured in the
installed VM 2026-11-18:

- Xservers.src ran the server as the pseudo-user nobody on NetBSD; it could
  not read its own -auth file (0600 root) and the session could not open the
  display.  NetBSD's xdm runs the server as root; NetBSD gets
  local_uid@console root now, as Solaris and OpenBSD already had.
- dm.c's dtMakeDefaultDir made /var/dt/appconfig and appmanager 0755 root;
  dtsession creates its directory there as the user and died with
  'MakeDirectory: /var/dt/appconfig/appmanager/<user>-<host>: Permission
  denied'.  appconfig and appmanager are 0777, tmp is 1777.
This commit is contained in:
lotherk committed 2026-11-18 04:32:38 +00:00
1 parent 03ce0155cc
commit 1f2b96e8c2
2 files changed
+11 -4

No files matched your search

+4 -1
View File
@@ -104,7 +104,10 @@ XCOMM * Local local@console /usr/bin/X :0
#elif defined (__OpenBSD__)
:0 Local local_uid@console root /usr/X11R6/bin/X :0
#elif defined (__NetBSD__)
:0 Local local@console /usr/X11R7/bin/X :0
XCOMM The server runs as root, as it does under NetBSD's xdm: it has to read
XCOMM its -auth file (0600 root) and the console devices; as nobody it could
XCOMM do neither and the session could not open the display (2026-11-18).
:0 Local local_uid@console root /usr/X11R7/bin/X :0
#elif defined (__FreeBSD__)
:0 Local local@console /usr/local/bin/X :0
#else
+7 -3
View File
@@ -1645,9 +1645,13 @@ dtMakeDefaultDir( void )
{
dtmkdir("/var", 0755, 0);
dtmkdir("/var/dt", 0755, 1);
dtmkdir("/var/dt/tmp", 0755, 1);
dtmkdir("/var/dt/appconfig", 0755, 1);
dtmkdir("/var/dt/appconfig/appmanager", 0755, 1);
/* The session's own dtsession creates its directory under appmanager as
* the user; /var/dt/tmp is each session's temporary space. 0755 there
* made "MakeDirectory: ... Permission denied" and the session ended at
* once (measured 2026-11-18). The temporary space is sticky. */
dtmkdir("/var/dt/tmp", 01777, 1);
dtmkdir("/var/dt/appconfig", 0777, 1);
dtmkdir("/var/dt/appconfig/appmanager", 0777, 1);
}
static void