]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
pam_systemd: set $DBUS_SESSION_BUS_ADDRESS unconditionally 11327/head
authorZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 6 Jan 2019 16:37:00 +0000 (17:37 +0100)
committerZbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
Sun, 6 Jan 2019 16:37:00 +0000 (17:37 +0100)
There's very little lost if the variable is set for a socket that isn't
connectible, but a lot lost (races, ...) if it's not set but the socket exists.

Also, drop the FIXME note, since we don't plan to revert this revert any time
soon.

src/login/pam_systemd.c

index cdec102cea16a238b5c60fa3c702c5d7c8934bf3..d466e509690b7ce1c164bc648d42272086441a38 100644 (file)
@@ -198,18 +198,6 @@ static int export_legacy_dbus_address(
         _cleanup_free_ char *s = NULL;
         int r = PAM_BUF_ERR;
 
-        /* FIXME: We *really* should move the access() check into the
-         * daemons that spawn dbus-daemon, instead of forcing
-         * DBUS_SESSION_BUS_ADDRESS= here. */
-
-        s = strjoin(runtime, "/bus");
-        if (!s)
-                goto error;
-
-        if (access(s, F_OK) < 0)
-                return PAM_SUCCESS;
-
-        s = mfree(s);
         if (asprintf(&s, DEFAULT_USER_BUS_ADDRESS_FMT, runtime) < 0)
                 goto error;